Myeclipse/eclipse configuration in jogl2.0

Source: Internet
Author: User

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();       }    } }

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.