Using the Sun JDK tools
In the JBuilder2/java folder we can find the complete Sun JDK (Java Development Kit).
To use the tools in this JDK from the DOS prompt we must first make sure we set a couple of environment variables.
And luckily for us JBuilder 2 comes with a batch file which takes care of this.
- Go to the DOS prompt.
- Go to the bin folder in our JBuilder 2 folder.
- Execute the setvars batch file.
This batch file takes one required argument: the complete path to our JBuilder 2 folder.
So if we installed JBuilder in for example the folder named D:\Apps\JBuilder2 we must type in the following command at the command-line:
The setvars batch file also takes an optional argument: /a.
If we use this argument the environment variables will be appended to existing environment variables with the same name.
- Now the Sun JDK tools are in the path, so we can execute the different programs from the DOS prompt.
For example to start the Java compiler we would type in:
javac -d ..\myclasses MyClass1.java
Possibly we get a error saying our environment space is too small.
To enlarge the environment we must add a line to config.sys if we are using Windows95/98:
shell=c:\command.com /e:4096 /e
This will create an environment of 4Kb, large enough for the setvars code.
This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.