For jogl2.0 configuration, it is successfully configured in myeclipse. The configuration method is shared as an image.
Step 1: Download jogl-2.0-windows-i586.zip
Step 2: unzip the ZIP file and add the following path to the environment variable path: % jogl-2.0-windows-i586 % \ Lib (this indicates you should understand it, the path of the entire lib file in the compressed package must be included in the path)
Step 3: In the Lib file, there are four jar packages, and the path must be written to classpath. The jar package name is as follows:
Jogl. All. Jar
Nativewindow. All. Jar
Gluegen-rt.jar
Newt. All. Jar (optional)
Because jogl2.0 has a major change compared with jogl1.1, do not make a mistake in the above four jar packages. As for how to add it to classpath, I believe that anyone who has learned a little bit about Java environment configuration should know it. I will not be embarrassed.
At this point, we may feel that the environment has been configured. At the beginning, I thought so too, but this is not the case. I ran the following program in myeclipse and started to display"No jogl in Java. Library. Path"
Last step: Right-click your project name-properties-Java build path (Row 3)-libraries-addexternal jars-Add the above four packages. Click "order ".
And Export "-select all.
Run your program again. It should be OK.
.
The running result is as follows:
Run the program code:
publicclass HelloWorld { publicstaticvoid main(String[] args) { // TODO Auto-generatedmethod stub try { System.loadLibrary("jogl"); System.out.println("HelloWorld"); @SuppressWarnings("unused") GLCapabilities caps = new GLCapabilities(null); System.out.println("HelloJOGL"); }catch(Exception e) { e.printStackTrace(); } } }