Tuesday, May 18, 2010

Technical Benefits of C over Java

While C requires more from a programmer, C can do things that Java can't easily do. Build a virtual memory manager, preemptive multi-tasking, a boot loader, a self-contained executable program. We expect an operating system to keep on running after an application crashes. We expect an operating system to reclaim resources after a process ends. We do not yet expect this from Java itself.

Inside Arrays.asList(T… a)

A small article explaining why we cannot add elements to the List returned by Arrays.asList(T... a) method - Inside Java: Arrays.asList(T… a)

Thursday, September 24, 2009

What do you deserve?

"The minute you settle for less than you deserve, you get even less than you settled for."

-- Maureen Dowd

Thursday, September 10, 2009

Weblogic 9.2 and Java 6 runtime

When we try to execute and Weblogic J2EE code in Java 6 Runtime using weblogic 9.2 libraries in a small sample code, we get the following exception :

 
[Root exception is java.rmi.UnmarshalException: failed to unmarshal class weblogic.security.acl.internal.AuthenticatedUser; nested exception is: 
 java.io.StreamCorruptedException: invalid type code: 31]
 at weblogic.management.Helper.getMBeanHomeForName(Helper.java:105)
 at weblogic.management.Helper.getAdminMBeanHome(Helper.java:38)
 at WeblogicMBean.main(WeblogicMBean.java:23)


After some search on google, I found the following link which exactly explains the problem :
Serialization error when client app on JDK1.6 access WebLogic on JDK1.5

I tried the suggested solution by starting JVM with the arguments -> -Dsun.lang.ClassLoader.allowArraySyntax=true
and it worked perfectly fine.