You can choose between an automatic installation with the GL4Java Installer and a manual installation !
You must allready have the following installed:
We are looking for libGL.so AND libGLU.so in your library PATH, so please create a symbolic link from the Mesa libs, to the abstract one's !!
UNICEs and WINDOWs users
You CAN (not a must) follow the Installation procedure above, just be sure to copy the libs to your LD_LIBRARY_PATH which should be the path in symbols.mak 'HOME_LIB_DIR' see below (UNICEs) !! Also you should use a symbolic link OR edit CLASSPATH to make 'GL4Java' and 'sun' visible in you CLASSPATH (copy is not recommended - see below !!! ) !
You MUST follow the Installation procedure above, if you want to USE GL4Java with JAVA2-JRE, JAVA2-Plug-In, Netscape 4.5 (Win32/Unix) JVM or MS-JVM/InternetExplorer.
Just procede the Installation procedure AFTER the compilation !
Login as root (or any other), obtain the source archive for GL4Java.
copy the .tar.gz file to a directory such as /usr/local and cd to that directory, then unpack the file:
cd /usr/local ( or where ever you placed the file ) gunzip GL4JavaX.Y.Z-Rn-src.tar.gz ; tar xvf GL4JavaX.Y.Z-Rn-src.tar gunzip GL4JavaX.Y.Z-Rn-doc.tar.gz ; tar xvf GL4JavaX.Y.Z-Rn-doc.tar (optional :-)
X is the major, Y the minor and Z the bugfix library version number, and Rn (e.g. R2) is the release number, where no changes in the libs where made !
A new directory will be created called GL4Java.
Go to the directory GL4Java, which is the root-directory of GL4Java - so we stay here for the following procedures !
You will see some 'symbols.mak.<machine>' files. Choose the right 'symbols.mak.<machine>' file, or create one. Some older actual non-maintained files can be found under symbols.mak-old ! Edit your choosen or created 'symbols.mak.<machine>', so it will fit to your OS configuration - all macros ! Copy the file 'symbols.mak.<your-machine>' to 'symbols.mak'. Do not forget to add your 'HOME_LIB_DIR' (set in symbols.mak) to your LD_LIBRARY_PATH (UNICEs). The created lib will be copied to 'HOME_LIB_DIR' by automatic (via tar - symbolic links are still alive ;-) !
Next - you have to be sure, that the root-directory of GL4Java, where the directories gl4java and sun exists, is in your CLASSPATH. E.g.: Assume you have expanded the package in the directory /usr/local.
For sh/ksh: CLASSPATH=$CLASSPATH:/usr/local/GL4Java or for csh: set CLASSPATH=(/usr/local/GL4Java $CLASSPATH) or for WINDOW's check out your GUI'sThis is evt. obsolete, if you have added the THISDIR path in the CLASSPATH of the symbols.mak's JAVAC definition, look into these files ! You must also use the macro 'DEST_CLASSES_DIR' (symbols.mak), where all generated class-files will be copied into, when created. You can also invoke ´make classcpy´ to force copy all class-files to 'DEST_CLASSES_DIR'. Also the gl4java.jar file is generated there !
Because GL4Java supports Netscape's JVM with JNI, we do try to ask for a privilege to run native DLL's. Because this ask - the 'netscape' package is included in the file capsapi_classes.zip which is used in the JAVAC macro definition in symbols.mak.
This is evt. obsolete, if you have entered the file 'capsapi_classes.zip' in the CLASSPATH of the symbols.mak's JAVAC definition, look into these files !
UNICEs users
Next create the library, class-files and all is needed with (for Unix/X11):
make x11
The Unix makefile-action does the complete creation :-) The default shared-library files for Unice's are :
JVM == 1.1: libGL4JavaJauGljJNI.so JVM == 1.2: libGL4JavaJauGljJNI12.so JVM >= 1.3: libGL4JavaJauGljJNI13.so This *.so files stands for the versions files with all symbolic links, e.g.: libGL4JavaJauGljJNI.so -> libGL4JavaJauGljJNI.so.2.7 libGL4JavaJauGljJNI.so.2.7 -> libGL4JavaJauGljJNI.so.2.7.1 libGL4JavaJauGljJNI.so.2.7.1
They are moved to the HOME_LIB_DIR (see above) or copied with the "-a" option to keep the symbolic links alive !
WINDOWs users
Next create the class-files and all preparations with (Win32):
make w32
The Windows makefile-action only creates the tool (gljni) and all Java classes and C-wrappers. An additional C compiler invocation must be done (see 2.3.4, page ) to create the default shared-library files:
JVM == 1.1: GL4JavaJauGljJNI.dll JVM == 1.2: GL4JavaJauGljJNI12.dll JVM >= 1.3: GL4JavaJauGljJNI13.dll MS-JVM: GL4JavaGljMSJDirect.dll + GL4JavaJauGljJNI.dll
To run GL4Java within MS-JVM and InternetExplorer, please see 2.3.2, page .
UNICEs and WINDOWs users
To run GL4Java within Netscape, please 2.3.2, page .
For a complete description of the makefile invokations see 5.1.1, page .
Next create the demos with.
cd demos make
If all goes well, just type e.g.: 'java glDemosCvs' in this directory, and you should see a demo manager for all the GL4Java demos we have written.
You can also compare the totally native glut version against the java version. The glut versions do exist in the demos path also (under native).
To compile GL4Java, we still use MS Visual C++ 6.0 ! We also assume that Windows is installed under c:/WIN_NT ! The compiler flags are set to Pentium Pro (686 / PII) with the optimizimg Intel compiler !
Also Java2 SDK is installed under c:/java2 ! Also MS Java SDK is installed under c:/MSJAVASDK !
Please check all location in the makefile !
The order of this path is important !
INCLUDEPATH:
c:/projects/java-1.1.X/GL4Java/CClassHeaders; \ c:/projects/java-1.1.X/GL4Java/CNativeCode; \ c:/java2/include; \ c:/java2/include/windows \ <the MSVC60 SDK PATH's ...>
LIBPATH:
c:/WIN_NT/system32; \ <the MSVC60 SDK PATH's ...>
WHERE: Java2 is installed under c:/java2 GL4Java is installed under d:/projects/java-1.1.X/GL4Java