If you've wanted to try some Pro/ENGINEER programming using J-Link (the free Java API), but didn't know how to compile your program, then this article is for you. Forget Netbeans, forget Eclipse, and forget downloading and installing the JDK. Just use Intralink's Java Runtime Environment to compile your apps.
Seriously though, those IDE's are really great programs, but sometimes you can't install them, or they're not available on your system, or you just need something minimal and fast. Fortunately, Intralink contains everything we need to compile J-Link applications: a JRE and tools.jar. tools.jar is the codebase from Javasoft that contains Java compilation code.
Here is a batch file that will compile J-Link Java code on Windows:
rem jlink_javac.bat - Compile JLink Apps using Intralink JDK
java sun.tools.javac.Main -classpath %Proe_Install_Dir%\text\java\pfc.jar -d . %*
Run it like this:
jlink_javac.bat Abc.java Def.java Ghi.java
Here is a C shell script that will compile J-Link Java code on Unix:
# jlink_javac.csh - Compile JLink Apps using Intralink JDK
setenv Proe_Install_Dir /opt/proeWildfire2.0_m200
setenv IL_Install_Dir /opt/proiclient3.3_m021
setenv CLASSPATH $IL_Install_Dir/sun4_solaris/lib/tools.jar
set path=( $IL_Install_Dir/sun4_solaris/jre/bin $path )
java sun.tools.javac.Main -classpath $Proe_Install_Dir/text/java/pfc.jar -d . $*
Run it like this:
jlink_javac.csh Abc.java Def.java Ghi.java
The resulting class files will be in the current directory. While I do use this for my own J-Link code which is typically targeted at Java 1.4.2, it may not work with newer Java versions, nor take advantage of their full capabilities. However, for you command line junkies out there, this is just the recipe.