Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process 4437-Difference-b Difference b/w jdk 1.1 and 1.2

Have Programming Question? Ask it here!
 
 
 


ram
Difference b/w jdk 1.1 and 1.2
1 Answer(s)      5 years and 8 months ago
Posted in : Development process



Advertisement
View Answers

December 23, 2008 at 4:34 AM


Hi friend,

Changes to CLASSPATH and -classpath

The class path has a default value and can be set by -classpath or CLASSPATH. In 1.1, it worked as follows:

* Class path default - The default value of the class path was (1) the path where Java platform classes resided (classes.zip or rt.jar), and (2) the current working directory (".", read as "dot").
* CLASSPATH - If the environment variable CLASSPATH was set, then the class path would (1) continue to contain classes.zip or rt.jar just the like default plus (2) the newly set value instead of the current working directory. [See Note 1]
* -classpath - If the option -classpath <path> was used, then <path> had to explicitly contain both (1) classes.zip or rt.jar and (2) application classes.

This behavior for -classpath was unfortunate because it meant users had to spell out the path to classes.zip:

C:> java -classpath C:\jdk-path\lib\classes.zip;\app\classes Application

We say unfortunate because this is inherently error-prone; the onus is on the user to ensure that the java command and the classes.zip were from the same JDK version. We ourselves have spent time debugging problems where a 1.1.4 java was trying to run 1.1.3 classes.zip, and this does not work because the native methods do not match.

The good news is that the -classpath option in 1.2 has taken on the same meaning as the CLASSPATH environment variable in 1.2, so you can now conveniently omit having to spell out the path to Java platform classes:

C:> java -classpath C:\app\classes Application

Some developers like to temporarily modify individual Java platform classes such as java\util\Vector.class, for purposes such as adding println statements to understand how the class works. In 1.2, these users would not be able to use the -classpath option to set the path to Java platform classes, as was possible in 1.1. For such uses, the -Xbootclasspath option must be used in 1.2.

Note 1 - Contrary to the bulleted statement above, we have seen users explicitly placing the path to classes.zip in their CLASSPATH environment variable, though this was not at all required.

New Class Search Paths

The earlier section showed that in JDK1.1, there was one search path used to find classes; its value could be set either through the -classpath option or the CLASSPATH environment variable.

In JDK 1.2, there are three search paths that are used to find classes:

1. The first place where java looks for classes is the bootstrap classpath. The value of this path can be examined by calling System.getProperty("sun.boot.class.path"). Note that the prefix "sun." shows that, at least for now, this property is specific to Sun's implementation.
2. The second place where java looks for classes is the extension directories. The list of directories can be examined by calling System.getProperty("java.ext.dirs").
3. The third and last place where java looks for classes is the application classpath. The value of this path can be examined by calling System.getProperty("java.class.path").

For a discussion of the new "extension directories" feature mentioned in item 2, refer to javac and The Extensions Framework documentation.

In 1.2, the argument you specify with the -classpath option is the value of the application classpath; it should contain the path to classes that constitute your application. The bootstrap classpath contains the path to Java platform classes that are contained in a file named rt.jar. This is discussed in the next section.





Related Tutorials/Questions & Answers:
Difference b/w jdk 1.1 and 1.2 - Development process
Difference b/w jdk 1.1 and 1.2  Can you plz specify the changes/developments that have taken place from JDK 1.1 to JDK 1.2 and which version... the -classpath option or the CLASSPATH environment variable. In JDK 1.2
difference b/w == and equals()
difference b/w == and equals()  what is the difference between == operator and equals()   Hi Friend, The == operator checks if the two objects were actually the same object. This operator looks at the actually memory
Advertisements
diff b/w struts 1.0 and 1.2
diff b/w struts 1.0 and 1.2  diff b/w struts 1.0 and 1.2
difference b/w viewdidload and ViewWillAppear
difference b/w viewdidload and ViewWillAppear   hello all, what is the difference b/w viewdidload and ViewWillAppear ???   hello, when view is loaded then this method run one time but ViewWillAppear run whenever
Difference b/w spring 2.x and 3.x
Difference b/w spring 2.x and 3.x  difference b/w spring 2.x and 3.x
what is difference b/w oracle 8i, 9i and 10g
what is difference b/w oracle 8i, 9i and 10g  what are the difference between oracle 8i,9i and 10g? I am not considering the versions and their supported os, in the interview point of view
Diff b\w C++ & Java
Diff b\w C++ & Java  What is the difference between C++ & Java
diff b/w applet and servlet
diff b/w applet and servlet  what is the difference between applet and servlet?   Difference between servlet and applet: 1)An applet is client side programming whereas servlet is server side programming. 2)Applets run
Underscore b/w consecutive capatalized words
Underscore b/w consecutive capatalized words  I have a text something like this "25km from N of Rio Negro" I want to add underscore between consecutive Capatalized words having space between them. Can some one give me
REQ for connection b/w jdbc and oracle database
REQ for connection b/w jdbc and oracle database    REQ for connection b/w jdbc and oracle database    The Java classes to connect.... b) If you are using oracle thin driver,you have to use: Connection conn
What is the difference between a JDK and a JVM?
What is the difference between a JDK and a JVM?  Hi, What is the difference between a JDK and a JVM? Thanks,   Hi, JDK is stand... to compile your source files using a JVM. For more difference between JDK and JVM
Diff b/w servlet n jsp - Java Interview Questions
Diff b/w servlet n jsp  hii i want to know the difference between servlet and jsp. please give me the details to understand them in correct. thanks in advance  Nothing my friend. Both are same. Only thing
how to establish connection b/w java app and mobile phone
how to establish connection b/w java app and mobile phone  hello, my name is Dhanraj. i'm doing a project in my college. In that project we need to send SMS from our phone to a java application situated on a remote server
difference
difference  difference b/w java and asp.net
what is the difference between jdk 1.4 and 1.5 and 1.6
what is the difference between jdk 1.4 and 1.5 and 1.6  what is the difference between jdk 1.4 and 1.5 and 1.6   Java 1.4 Features - assert keyword - Regular expressions - Exception chaining (allows an exception
jdk
jdk  which is the latest version of jdk and how can i get it to develope applications?   JDK 7 is the latest version. You can download jdk 7 from the given link: Download JDK 7
Difference
Difference  What Is the difference between JDK & SDK
jse and jdk
jse and jdk  SIR PLEASE TELL ME WHAT IS THE DIFFERENCE BETWEEN JDK AND JSE
Struts 1.2 and ajax example
Struts 1.2 and ajax example  Struts 1.2 and ajax example with data from database
jdk 1.6 vs jdk 1.7
jdk 1.6 vs jdk 1.7  What is the difference between jdk 1.6 and 1.7 ?? Package structure and all??   Difference between jdk 1.6 and jdk 1.7.... Java DB is based on the open-source Apache Derby and is supported by Sun. 4)Jdk 6
tabs and struts 1.1 - Struts
tabs and struts 1.1  Hi, i've some questions in developing tabs on struts1.1; what is the best solution, using ajax libraries or using struts layout?? does Struts layout exist on struts 1.1? thanks Syham
difference
difference  what's the difference between mysql and sql
difference
difference  difference between hashtable and hashtree
difference
difference    what is the difference between the JDBC-ODBC bridge, the Native-API-Partly-Java driver, and the JDBC-Net-All-Java Driver is the placement of the database access libraries   Please visit the following link
JSF 1.2 online tutorial
JSF 1.2 online tutorial  Need a perfect online tutorial for JSF 1.2.. Thanks in advance Arjun   Please visit the following link: JSF Tutorials
Jdk 1.7
Jdk 1.7  How many class and packages are avilable in latest jdk 1.7 version
difference
difference  difference between thread and process in java   Difference between Process and Thread: 1)Process is a program under execution whereas Thread is a part of program. 2)Process are heavy weight programs which
difference
difference  difference between Method Overloading and method Overriding   Difference between Method Overloading and Method Overriding: Overriding is the concept of having functions of same name and signature
Doubts on Struts 1.2 - Struts
Doubts on Struts 1.2  Hi, I am working in Struts 1.2. My requirement is to display data in a multiple selected box from database in a JSP page. Can anyone suggest me how to proceed... Thanx in advance  Hi friend
Struts 1.2 Vs Struts 2.0 - Struts
Struts 1.2 Vs Struts 2.0   Hi, Can u give difference between struts 1.2 and struts 2.0 . Thanks prakash  Hi Friend, Please visit the following link: http://www.roseindia.net/struts/struts2/Struts2vsStruts1
Invoke EJB 1.1 through Web Services - WebSevices
Invoke EJB 1.1 through Web Services  I want to know how to invoke remote method in EJB 1.1 through WebServices in OC4J server i.e (9.0.4). I am using Eclipse 3.5 and JDK 1.3. Please help. It is very critical and urgent. Any
Feather Ajax 1.1
Feather Ajax 1.1       Are you wanting to jump on the ajax bandwagon, but you don't want to sacrifice your load time? I've created an easy-to-use ajax library that is less than 1KB. I'll
dynamicaly change URL in struts 1.2
dynamicaly change URL in struts 1.2  I need to change the url dynamically on particular button click. for example:-http://www.roseindia.net/answers/askquestions/askquestion.html exactly same what this URL is showing, instead
Java Programming: Section 1.1
Section 1.1 The Fetch and Execute Cycle: Machine Language A COMPUTER IS A COMPLEX SYSTEM consisting of many different components. But at the heart -- or the brain, if you want -- of the computer is a single component
Struts 1.1 Tutorials
Struts 1.1 Tutorials       This page is giving tutorials on Struts 1.1. Struts 1.1 was the earlier version of Struts framework. It provides many features for the development of robust dynamic web
why jre in jdk
why jre in jdk  why jre in jdk
Java Programming: Section 1.2
Section 1.2 Asynchronous Events: Polling Loops and Interrupts THE CPU SPENDS ALMOST ALL ITS TIME fetching instructions from memory and executing them. However, the CPU and main memory are only two out of many components
Download JDK
Download JDK       What is JDK (Java Development Kit) JDK is a software development program provided by sun Microsystems. Java Development Kit or JDK comes
Installing JSF 1.1 in TOMCAT 5.5.23
Tomcat 5.5.23 Jsf 1.1 Servlet 2.3 Jsp 1.2  The steps required...Installing JSF 1.1 in TOMCAT 5.5.23   ... installation of JSF 1.1 to TOMCAT 5.5.23. Java Server Faces (JSF) requires some
Changing from Struts 1.2 to Struts 2.0 in Application
Changing from Struts 1.2 to Struts 2.0 in Application  Hi All, We have a financial application which is running successfully on struts 1.2 and java 1.4. Since this are old versions and obsoleted from market. We want to use
JDK 1.5 - Java Beginners
JDK 1.5  HI..... this is anand frm bangalore.... i was going through JDK 1.5 static imports and i am stuck upon one thing... Q. using imports... A we have both static n non static members n using class B we want to use non
Java - JDK Tutorials
Java - JDK Tutorials   This is the list of JDK tutorials which... features of Java in your programming. JDK is required to be installed on your... Detecting Thread Deadlocks  Autoboxing Yourself in JDK 1.5 
Difference between http and https
Difference between http and https  Difference b/w HTTP and HTTPS please provide answer in tabular form.   Hi Friend, Differences: 1)HTTP is hyper text transfer protocol which is responsible for transmitting
linux4.2 supported jdk versions - Security
linux4.2 supported jdk versions  linux 4.2 supported jdk versions ?. is it supports to jdk1.6(linu4.1.2)or not? please giive me clarifications
How to install JDK 7 in windows
How to install JDK 7 in windows  Hi, Is there any tutorial for installing JDK 7 on Windows computer here? Thanks   Hi, JDK 7... is easily process. You can ask how to configure JDK from your friend or just read
JDK 1.5 Features Diff - Java Interview Questions
JDK 1.5 Features Diff   Hi Frieds , Can u explain me d difference bn Generics and Autoboxing in jdk 1.5.  Hi Generics?Provides compile-time type safety for collections
how to find jdk path in ubuntu?
how to find jdk path in ubuntu?  How to find out the path of installed jdk in ubuntu? Could anyone tell that command to execute from terminal.. Thanks
install jdk 6 - Java Beginners
install jdk 6  sir i have installed my jdk1.6 but dont know how to run, could you please help me i
i want image upload and download useing STRUTS 1.2 version example..
i want image upload and download useing STRUTS 1.2 version example..  i am fresher of the developer..i want code for above title topic(i want image upload and download useing STRUTS 1.2 version example..)..plz send me code for my
How to download JDK source code?
How to download JDK source code? This articles explains you how you can download the source code of JDK. You will learn how to download JDK source code and the unzip and see the source code of JDK. This tutorial is very useful if you
 

 

 

DMCA.com