Previous


Platform-Specific Details: Compiling a Swing Program

When compiling a Swing program, you must use a class path that includes both the Swing swing.jar file and the JDK classes.zip file.

Solaris
If you've set the JDKHOME and SWINGHOME environment variables:
$JDKHOME/bin/javac -classpath .:$SWINGHOME/swing.jar:$JDKHOME/lib/classes.zip SomeClass.java
Which might result in something like this:
/home/me/jdk1.1.5/bin/javac -classpath .:/home/me/swing-1.0/swing.jar:/home/me/jdk1.1.5/lib/classes.zip SomeClass.java

DOS shell (Windows 95/NT)
If you've set the JDKHOME and SWINGHOME environment variables:
[PENDING: put env variable version of following command here]
%JDKHOME%\bin\javac -deprecation -classpath .;%SWINGHOME%\swing.jar;%JDKHOME%\lib\classes.zip SomeClass
Which might result in something like this:
C:\java\jdk1.1.5\bin\javac -deprecation -classpath .;C:\java\swing-1.0\swing.jar;C:\java\jdk1.1.5\lib\classes.zip SomeClass.java


Previous