Friday, June 30, 2006

JVM - Heart of Java

We all know that Java Virtual Machine is a virtual machine means a software that executes Java ByteCode. It is the one who provides Java and WORA (Write once, run anywhere) architecture.

Starting with J2SE 5.0, changes to the JVM specification have been developed under the Java Community Process, JCP as JSR 924.

It's a matter of month, Sun going to make Java open source. The hottest debatable issue is of JVM, becasue experts have the opinion that for each problem statement developers will change the JVM according to their convience. Let's see Sun is going to do something for it. This particular concern is relatively big since there already a number of competing Java VM's and few of which are fully compatible.

Some of the open source implementations of JVM like Kaffee and Waba are comparable to closed source implementations of Sun's Java HotSpot, Blackdown and BEA systems. Anyway the current issue for Sun is to retain the Java, Platform indepedent which may be at stake after making Open Java.

Talking about the secure execution of remote code, Java follow "sandbox" mechanism, which is desgined to protect the user from misbehaving or malicoius code. Publisher can apply for a certificate with which to digitally sign applets as "safe", giving them permission to break out the sandbox and access to sys local file.

Thursday, June 29, 2006

Bad One ...

Week back, I cleared my Sun Java Certification. Score was bad enough to be mentioned here. 2-3 days I spent in thinking the reason for my bad performance !

There are many :) !
Abhishek, who also went with me for the exam also not able to score a good one, told me that enough of delay is one of the biggest factor for the bad performance. Agreed !

I was preparing for it from last 3-4 month and I guess 1 month back I was on the peak of the excitement for the exam and that was the best time to deliver it.

Anyway nothing to sorrow, but of course have to learn from my stupid decisions.

Thought to start preparation for SCWCD, but its better to have a rest ! Transferring to mumbai, I don't think so I will get chance for preparation but I will do my best for it !

Saturday, June 17, 2006

Add dynamic Java code to your application

Got a very nice article of Dynamic Java Programing:

Write code that can respond to changes at runtime
SummaryDid you ever wish your Java code could be dynamic like JavaServer Pages? That it could be modified and recompiled at runtime, with your application updating itself on the fly? This article shows you how to make your code dynamic. As such, some of your source code will be deployed, instead of compiled binary code. Any changes to the source code will cause it to be recompiled and the class to be reloaded. Your application will then run on the new class, and users will see the change immediately. This article covers not only runtime source compilation and class reloading, but also a design that separates the dynamic code from its caller. The caller holds a static reference to the dynamic code, and no matter how the dynamic code reloads at runtime, the caller can always access the up-to-date class without updating the reference. In this way, dynamic code changes are transparent to the client.

JavaServer Pages (JSP) is a more flexible technology than servlets because it can respond to dynamic changes at runtime. Can you imagine a common Java class that has this dynamic capability too? It would be interesting if you could modify the implementation of a service without redeploying it and update your application on the fly.
The article explains how to write dynamic Java code. It discusses runtime source code compilation, class reloading, and the use of the Proxy design pattern to make modifications to a dynamic class transparent to its caller.

For whole doc: http://www.javaworld.com/javaworld/jw-06-2006/jw-0612-dynamic.html

Have fun with Java !