Shawon Saha
Posted on March 27, 2021
At first, make sure you have java installed on your system. To check that open Terminal (ctrl + alt + t) and run java -version
If you don't see any version then you have to install OpenJDK on your system. To do that run these two commands
sudo apt-get install openjdk-11-jre
sudo apt-get install openjdk-11-jdk
and check your java -version
again.
Once you successfully install java on your system then you have to install JOGL. To do that run this command on terminal.
sudo apt-get install libjogl2-java
After installing JOGL install eclipse
Now Open Eclipse and Create a Java project and give your project a name.
You can also find it under File > New > Java Project
After giving a nice name in your project Click Next
From the Libraries select Classpath and click Add External JARs
Navigate to /usr/share/java/
and choose these two files jogl2.jar
and gluegen2-rt.jar
.If you import correctly then You should see those file's paths under Classpath. Now click Finish (You can skip creating Module).
Now expand your project from the sidebar and right-click on src then Create a new class
If everything is done correctly a Canvas window will pop up after running your JOGL code!
Posted on March 27, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.