Compiling the HelloWorld.java program is simple, but different than the normal Java environment. Instead of using the javac command to do the compiling, you'll want to use lejosc to compile your source file.
The first thing you'll want to do is to open up a DOS prompt, and CD to the directory where your HelloWorld.java file is located. Since my file is located in my c: \Temp directory, I'll open up a DOS window, run my lejos_setup.bat program, then enter:
If you're new to DOS, you may want to enter the DIR command at that point to confirm that your file is in that directory, like this:
Then you can confirm that your Java source code file is in the directory like this:
Next, to compile the program, enter:
If everything goes well, you won't see any output from the command, and this will compile into a HelloWorld.class file (which you can also check with the dir command). You can then download this class file to the RCX, as discussed in the next section.
If you run into errors, they can be caused by a variety of reasons, including:
Hopefully you will not encounter any of those problems, and you're ready to transmit your program to the brick.