|
|
Last updated: 6 Oct 2009
Many Java-related tools are available to use. They
are distributed as Java .jar (Java Archive)
files, and on Windows can be found in this directory:
G:\javatools
You can use these tools by setting your classpath
environment variable
to refer to the the current directory (".") and the directory
containing the tool.
You may also find help here for setting up Eclipse to
use jar files.
The current list of tools is (some have several jar files in the directory):
- ant
Class Path:
G:\javatools\apache-ant-1.7.0\lib\ant.jar
- HttpUnit
Class Path:
G:\javatools\httpunit-1.6.2\lib\httpunit.jar
- JUnit
Class Path:
G:\javatools\junit4.4\junit-4.4.jar
- Xalan-Java
Class Path:
G:\javatools\xalan-j_2_7_0\xalan.jar;G:\javatools\xalan-j_2_7_0\xml-apis.jar
- Xerces-Java
Class Path:
G:\javatools\xerces-2_9_0\xercesImpl.jar;G:\javatools\xerces-2_9_0\xml-apis.jar
- JOGL: Java Bindings for OpenGL -1.1.1
Class Path:
G:\javatools\jogl-1.1.1-windows-i586\lib\jogl.jar
If you want to run the demos, you will need to add to your classpath:
- G:\javatools\jogl-demos\jogl-demos*.jar
- G:\javatools\jogl-1.1.1-windows-i586\lib\gluegen-rt.jar
Setting your classpath to run the demos would look like this:
set classpath=.;G:\javatools\jogl-demos\jogl-demos-data.jar;G:\javatools\jogl-demos\jogl-demos-util.jar;G:\javatools\jogl-demos\jogl-demos.jar;G:\javatools\jogl-1.1.1-windows-i586\lib\jogl.jar;G:\javatools\jogl-1.1.1-windows-i586\lib\gluegen-rt.jar
The JOGL binary files (.dll files) must be in your command PATH --
they are by default in the general development labs. If not, here is how you could
set the PATH environment variable for the current command/DOS prompt:
set path=%path%;g:\javatools
To set up Eclipse in the labs to use JOGL (thanks to student Wilfredo Ortiz
and Dr. Isabelle Bichindaritz):
- add jogl.jar and gluegen-rt.jar as indicated above:
This first step allows compilation to occur.
- right-click on your project
- select Properties
- select Java Build Path
- select Libraries
- select Add Library
- select User Libraries
- click New ...
- enter a name such as jogl
- click Add JARs ...
- browse to folder
G:\javatools\jogl-1.1.1-windows-i586\lib
- select the two jars jogl.jar and gluegen-rt.jar
- click OK then Apply
- To run a program
- select Run Configuration
- select Arguments
- select VM arguments
- add the following line:
-Djava.library.path=G:\javatools\jogl-1.1.1-windows-i586\lib
- JMonkey Engine
To use this in Eclipse:
- Add the jME JARs to your projects build path
- right-click on your project
- select Properties
- select Java Build Path
- click Libraries tab
- click Add Library button
- select User Library
- click User Libraries button
- click New... button
- enter jme for User library name
- select jme
- click Add JARs...
- browse to the folder G:\javatools\jme
- select all the JAR files and click Open button
- click OKs and ultimately click the Finish button
- If you will be using lwjgl.jar:
- expand jme
- right-click on lwjgl.jar
- select Properties
- select Native Library
- click External Folder... button
- browse to G:\javatools\jme
- click OK button
- click Apply button
- click OK button
Using the CLASSPATH Environment Variable
If you use a particular set of classes from one or more jar files regularly,
it is convenient to set your CLASSPATH environment variable once, log off,
then any time afterwards, you just need to invoke javac or java without specifying
the -classpath option (as illustrated in later sections).
- For Windows XP:
- Right-click on the My Computer icon
- Select Properties
- Click on the Advanced tab
- Click on the Environment Variables button
- Create a new or edit the old
CLASSPATH variable for your login account
- Add this as a value:
.;PATH
where "." represents the current directory, and
PATH represents the full path to the jar files you want.
- Click on OK buttons until you have closed the Properties.
- Log off, then log back on to ensure that your environment variables
are set.
Windows Compilation Instructions
On the Windows workstations, substitute the class
paths to the jar files above for the word
"PATH" below.
- From a DOS Prompt:
javac -classpath .;PATH myfile.java
The period (".") represents the current directory, the semicolon (";")
separates paths, and PATH is the collection of Java Archive files
that contain the required classes.
- From TextPad:
You will need to change the default configuration for compiling a Java program.
From the Configure menu, select Preferences, then click on Tools to expand the
list. You should see "Compile Java" -- click on this to see the settings.
In the box called "Parameters", type:
-classpath .;PATH $File
then click on the OK button to save the settings.
Windows Execution Instructions
On the Windows workstations, substitute the paths to the jar files above for
PATH below.
To refer to particular Java archive files when executing a Java program that
includes a reference to them,
you must add the path to your classpath, as follows:
- From a DOS Prompt:
java -classpath .;PATH myfile
The period (".") represents the current directory, the semicolon (";")
separates paths, and PATH
is the collection of Java Archive files
that contain the required runtime classes.
- From TextPad:
You will need to change the default configuration for running a Java program.
From the Configure menu, select Preferences, then click on Tools to expand the
list. You should see Run Java Application
— click on this to see the settings.
In the box called Parameters, type:
-classpath .;PATH $Basename
then click on the OK button to save the settings.
Change Log
6 Oct 2009 |
Updated link for JOGL |
1 Oct 2009 |
Updated JOGL for 1.1.1a, then realized it puts files in old 1.1.1 folder |
2 Oct 2008 |
Updated JOGL documentation for use in Eclipse |
25 Sep 2008 |
Added documentation for JMonkeyEngine |
23 Sep 2008 |
Updated documentation for JOGL 1.1.1 |
11 Sep 2007 |
Updated documentation for latest versions of tools |
21 Dec 2005 |
Updated information; added CLASSPATH environment variable section and
jogl tool spec |
23 Jan 2003 |
Original File |
Hours
|
Support Information
|
News
|
Policies
|
Emergencies
|