Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
1 Nedlasting og Installasjonsveiledning for JOGL2: Se veiledning: https://www3.ntu.edu.sg/home/ehchua/programming/opengl/JOGL2.0.html Reference: "Downloading and installing JOGL" @ http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL. Utdrag av veiledning: Step 0: Install JDK Install JDK, an IDE such as Eclipse/NetBeans or a programming text editor (f.eks TextPad). You need a working Java programming environment to write JOGL programs. Step 1: Download JOGL Download the latest "stable" release from JogAMP @ http://jogamp.org/deployment/jogampcurrent/archive (or from JogAMP @ http://jogamp.org ⇒ Builds/Downloads ⇒ Current ⇒ zip). Select "jogamp-all-platforms.7z", which contains the JOGL and gluegen JAR-files, Java Native Library (JNI) for all the platforms (e.g., Win32, Win64, Linux, Mac OS), and source-files. You are also recommended to download the "javadocs" (jogl-javadoc.7z and gluegenjavadoc.7z), "demos" (jogl-demos.7z) and sources. Step 2: Setup JOGL 1. Unzip "jogamp-all-platforms.7z" (you can unzip ".7z" file using WinRAR, WinZip, or http://www.7-zip.org/). o The jogl's and gluegen's jar-files are kept in the "jar" sub-directory. o The Java Native JNI Libraries (".dll" for Windows, ".so" for Linux, or ".jnilib" for MacOS) are kept in the "lib" sub-directories. 2. Create a JOGL binary directory, says "jogl-2.1" - I shall denote the binary directory as $JOGL_HOME. Create sub-directories: "jar", "lib", "src" (optional), "javadoc" (optional) under the $JOGL_HOME (jogl-2.1). Copy the necessary jar-file, native libraries of your operating platform, and source-files into the appropriate sub-directories. Read "http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL". For example, for Win64, copy: "jar\gluegen-rt.jar", "jar\jogl.all.jar", "jar\gluegen-rt-natives-windowsamd64.jar" and "jar\jogl-all-natives-windows-amd64.jar" into "jar"; copy: "lib\windows-amd64\gluegen-rt.dll", "lib\windows-amd64\jogl_desktop.dll", "lib\windows-amd64\nativewindow_awt.dll", "lib\windowsamd64\nativewindow_win32.dll", "lib\windows-amd64\newt.dll" into "lib"; and "gluegen-java-src.zip", "jogl-java-src.zip" into "src". Unzip the javadocs downloaded into "javadoc". 2 Read the "jogl.README.txt". This step is optional, but it is good to organize the JOGL JAR-files and Java Native Libraries for your operating platform in a single directory. Step 3a: Customize for Eclipse 4.3 1. Create a User Library: We shall first create a Eclipse's User Library called "jogl-2.1", which specifies the jar-files, native libraries, javadoc, and source files for the JOGL API. All the JOGL projects can then include this user library in its build path. a. From "Window" menu ⇒ Preferences ⇒ Java ⇒ Build Path ⇒ User Libraries ⇒ New ⇒ In "User library name", enter "jogl-2.1". b. In "User Library" dialog ⇒ Select "jogl-2.1" ⇒ "Add External JAR..." ⇒ Navigate to "$JOGL_HOME\jar", and select "gluegen-rt.jar" and "jogl.all.jar". c. Expand the "jogl.all.jar" node, select "Native library location: (none)" ⇒ "Edit..." ⇒ External Folder... ⇒ select "$JOGL_HOME\lib" to provide the path for the native library code (such as "jogl_desktop.dll" for Windows). Repeat for "gluegen-rt.jar" (for "gluegen-rt.dll"). d. (Optional But Recommended) Expand the "jogl.all.jar" node again ⇒ Select "Javadoc location" ⇒ "Edit..." a. Specify the javadoc's path (either file: or http:) in "Javadoc URL" if you use an unzip version of the javadoc. b. Specify the javadoc's archive file (either zip or jar) in "Javadoc in archive" if you use a zip file. Choose "Validate", which search for an "index.html" file. This is needed for Eclipse to display javadoc information about classes and methods. e. (Optional But Recommended) You may provide the source files by editing "Source attachment" ⇒ "Edit..." ⇒ "External File..." ⇒ Select the source file in zip form. Source is needed only if you are interested to debug into the JOGL source codes. 2. Include the User Library: For EACH JAVA PROJECT created that uses JOGL, rightclick on the project ⇒ "Build Path" ⇒ "Add Libraries" ⇒ Select "User Library" ⇒ Check "jogl-2.1". Read "Java Native Library (JNI) Error" if you encounter error java.lang.UnsatisfiedLinkError: no xxx in java.library.path". "SEVERE: Step 3b: Customize for NetBeans 7.0 (To Check!) There was a so-called "NetBeans OpenGL Pack", but it seems to be out-dated and does not support JOGL 2 (?!). We shall create our own JOGL Library as follows: 1. Create a JOGL Library: a. From "Tool" ⇒ "Library" ⇒ Click "New Libraries..." ⇒ Enter "jogl2.0". b. Click "Add JAR/Folder..." ⇒ Select "jogl.all.jar" and "gluegen-rt.jar". 3 c. Under the "JavaDoc" tab ⇒ Select the JOGL's javadoc. You could use the zip version for better performance. d. Under the "Source" tab ⇒ Select the JOGL's source. You could use the zip version for better performance. 2. Include the JOGL Library: . For EACH of the JOGL project, include the JOGL library. Right-click on the project ⇒ "Properties" ⇒ "Library" ⇒ Under "Compile" tab ⇒ "Add Libraries..." ⇒ Choose the library "jogl2.0" created earlier. a. You also need to include the native library path for each of the project. Right-click the project ⇒ "Set Configuration" ⇒ "Customize..." ⇒ "Run" ⇒ In "VM options", enter "-Djava.library.path=xxx", where xxx is directory path (e.g., d:\bin\jogl2.0\lib), that contains the Java Native JNI Libraries ("*.dll" for Windows, "*.so" for Linux or "*.jnilib" for MacOS). Read "Java encounter java.lang.UnsatisfiedLinkError: no xxx in java.library.path". Native Library (JNI) Error" if you error "SEVERE: Step 3c: Customize for JDK/Editor (Windows) You need to modify two environment variables - CLASSPATH and PATH. Read "Environment Variables For Java Applications" on how to set these environment variables. Modify the CLASSPATH environment variable to include the full-path filenames of "jogl.all.jar" and "gluegen-rt.jar", for example, shell> set classpath=.;$JOGL_HOME\jar\jogl-all.jar;$JOGL_HOME\jar\gluegen-rt.jar;.. where $JOGL_HOME denotes the JOGL installed directory. Take note that you should include the current working directory '.'. .;C:\jogl-2.1\jar\gluegen-rt.jar;C:\jogl-2.1\jar\jogl-all.jar;C:\jogl-2.1\jar\gluegen-rt-nativeswindows-amd64.jar;C:\jogl-2.1\jar\jogl-all-natives-windows-amd64.jar Modified the PATH environment variable to include the full path to the JOGL's "lib" directory for accessing the native libraries (e.g., "jogl_xxx.dll", "gluegen-rt.dll"), for example, shell> set path=$JOGL_HOME\lib;...... ;C:\jogl-2.1\lib; 4 Miljøparametre: Kontrollpanel > Alle kontrollpanelparametre > System System > Advanced > Miljøparametre ClassPath: Legg til: .;C:\jogl-2.1\jar\gluegen-rt.jar;C:\jogl-2.1\jar\jogl-all.jar;C:\jogl-2.1\jar\gluegen-rtnatives-windows-amd64.jar;C:\jogl-2.1\jar\jogl-all-natives-windows-amd64.jar Path: legg til: C:\jogl-2.1\lib;