Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Hubert Klein Ikkink (aka Mr.Haki) - Communications Officer
 Mr.Haki's JBuilder Jar #29
See Also: JBuilder Papers

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.

  1. Go to the DOS prompt.
  2. Go to the bin folder in our JBuilder 2 folder.
  3. 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:
      setvars d:\apps\jbuilder2
    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.
  4. 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.