If you want to load the Java 1.4 SDK only on your home machine, you can use our Web server to compile the final version for Web-based participants to use. I'd be happy to show you how that works in class. Again, the code WILL compile with Java 1.4 but many browsers will not be able to run it compiled with that version (bummer, eh?).
No matter what editor or development environment you use to edit your .java source files, you can always use a command prompt (from your Operating System) to compile your code. So, since that is the most common (and least) denominator, I illustrate that one here.
First, take notice of your hard drive's hierarchy and note where you have put the project code root and subdirectories. Your folders should look something like this example taken from my hard drive:
Note I have made a standalone folder under which all necessary folders reside. I want this code
folder to be the root of my Java compile (since the packages will then be relative to this root). So, when
I go to compile, I open up a command prompt (or command window) and set my classpath to this directory. Use the
set classpath command to set your classpath. This command is different on different operating systems but
for Windows or NT, you would type:
set classpath=.;c:\OWorld\standaloneif you had a file hierarchy like the one you see in the image above.Set your path to point to the Java compiler on your system (you can search for the javac.exe file if you don't know where it is on your system). The path should point to the folder where javac.exe exists: set path=c:\jdk1.3.1\binsets the correct path on my system.Then, change to the directory where your code (.java files) sits waiting. I change one directory at a time in the figure below. Use the cd command to change directories. Now, compile one package at a time. Below, I first compile the client package by changing to the client folder and typing javac *.javaThen, I change to the vnet folder and do the same.Once I've done this for all folders with .java files in them, I have compiled all the code. I can make sure by asking to see the directory of .class files within each folder. I can ignore warnings, but have to address any errors I get during compile. If I get an error, I don't see the .class file I want appearing in the directory with the currrent date and time. Upload your code to your team's directory and see if you can get it to run. Contact me with any questions you might have. |
Good luck. Make sure you get this working soon!