Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic J2SE and user ss141213

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


J2SE

Look at the code below where the main() loads a class whose name is specified by first argument. The second argument tells whether the class should be resolved or not. It also contains 5 test classes: A1, A2 and their dependencies: B, B1, B2. We will try to identify how early Bs are needed if I want to use As. class Main {  public static void main(String... args) throws Exception { ...
on Nov 2, 2011
Did you know javap ignores Class-Path manifest attribute where as javac honors it? I didn't. Now I know. I have a jar called foo.jar with following manifest entry: Manifest-Version: 1.0 Class-Path: javax.ejb.jar Created-By: 1.6.0_16 (Sun Microsystems Inc.) javax.ejb.jar contains all the EJB APIs and it is in the same directory as foo.jar. Yet, this is what I see when I run javap: javap -...
on Oct 14, 2009
When my colleague Marina Vatkina sent me some code earlier today hoping a second pair of eyes would spot the obvious error, knowing how thorough Marina typically is, I knew there was no obvious error there. Simplified version of what was being attempted is shown below: import java.io.*; import java.util.*; import java.util.jar.*; public class CreateJarWithManifest { public static void main(...
on Oct 13, 2009
While evaluating a GlassFish bug, I discovered a discrepancy in behavior of Class.getAnnotations() between IBM JRE and Sun JRE. the complex GlassFish issue boiled down to a simple test case as discussed below. The question is what should be the behavior of Class.getAnnotations() if one or more annotation class is not available at runtime. Consider the following test case: // Main.javaimport java....
on Oct 8, 2009
Recently my colleague observed an unusual class loading error while experimenting in GlassFish V3. I really enjoyed analysing the issue and getting to the root of the problem. I will share my experience here. JDK has a portion of OMG CORBA APIs belonging to org.omg.CORBA and similar package names. The bad thing is org.omg.CORBA package is an extensible package in the sense that different OMG...
on May 27, 2009
Earlier I shared the Java/JDK issues that I faced while writing an annotation processor. Today I am going to share my experience of using Maven. The issues have hardly anything to do with the annotation processor itself. If you are curious about what that annotation processor does, please refer to my earlier blog. Now, without wasting much time, let me describe the issues in the order in which I...
on Nov 30, 2007