Extracting Source code for the Java API classes
To extract source code for the Java Class files, check your JDK directory for a src.jar file. In the same directory, enter
jar tf src.jar > srcList.txt
This will create a text file listing all the .java files in the src.jar file.
View the text file to locate the path name of the class you're interested in and then type:
jar xf src.jar file pathname
For example, to extract the Reader.java file
jar xf src.jar src/java/io/Reader.java
Compiling with JDK 1.3 under Win98
If you're having problems compiling check the following:
- you do NOT have CLASSPATH set in your AUTOEXEC.BAT file (JDK 1.3 does not require the DOS environment variable).
If the variable is set because of other programs, make sure it begins with a '.\' to ensure the current directory is always included.
- you are issuing the compile command from within the directory containing the .java source file
- if you are using the javac switch -classpath DO NOT include an ending '\'
JRE can't locate .jar files under Win98
If you've downloaded some .jar files and installed them, as instructed, to the jdk1.3\jre\lib\ext directory but you're still getting ClassDefNotFound errors when you try to run an application that references the jars; check your system for a Java JRE Plug-in. If one exists, copy the .jar files to that ...\jre\lib\ext directory and re-boot.
The Runtime should now be able to find the .jar files properly.
|