jdk and swing.class

D:/programs/jdk1.1.6
As you see, I installed jdk1.1.6 in my D driver.
1. What need I do the next if I want to run my program test.java which is saved in: D:/programs/jdk1.1.6/bin/version1/test.java ?
2. I have downloaded the sun.com.swing.class, could you tell me where I put it?

Who is Participating?

Actually the swing package is much bigger than one class. It is basically a directory with some subdirectories and classes there or a .jar(.zip) archive.
In order to use the JDK and the Swing, after installing the two things, you have to modify your CLASSPATH environment variable to point to something like:
d:\programs\jdk1.1.6\lib\classes.zip;d:\programs\swing-1.2-beta\swingall.jar
Also, you have to add the d:\progrms\jdk1.1.6\bin to the PATH environment variable.

The you go to your project directory and:
javac test.java

or in case you didn't set the CLASSPATH environment variable
javac -classpath "d:\programs\jdk1.1.6\lib\classes.zip;d:\programs\swing-1.2-beta\swingall.jar" test.java

Hi diakov:
Could you please tell me more detail how I need to do in case I needn't modify the PATH environment variable? The one I downloaded is swing103.zip.
1. Can I save my programs under any directory on the same driver?
2. Which directory can I compile my programs? Under jdk or swing?

Hi leeann,
Unzip the swing103.zip somewhere. Letsay d:\programs\swing
If you are under Windows, you open the control pannel, then System, then go to Environment. There you can define two variables:
- name
PATH

- value (%PATH% means you include the old path)
%PATH%;d:\programs\jdk1.1.6;

After you did this you have to close all DOS boxes and open new ones. Then type:
SET | more
to see the environment and check whether this variables are visible and with the altered by you values. If not, reboot the machine. Under NT the reboot is not needed.

After this is done, in any box and from any directory on any drive, you can compile your programs. It does not matter where they are situated. Most commonly, your program resides in one directory somewhere. When you compile it there, if no particular output directory is specified for the .class files, they will be generated in the same directory and if any classes are declared in a package, the some subdirectories will be created and the class files will be put there. The subdirectory names for the package myPackage1.Subpackage1 are myPackage1\Subpackage1 and the .class files will be stored there.

I believe the path to the swing .zip library is not correct or something. look at the file swingall, I think it is a .jar file, not a .zip file. Please, be acurate with this.
Could you try the -classpath option from the command prompt? It will be something like:

In my example, I didn't put the file name in the path. This is a line from the command line. I started the java compiler from a specific directory with the parameter -classpath and provided the class archives, then I pointed out which file the compiler to compile. And then I hit enter. You can try to do the same with the correspondently substituted paths and file names, for your case.