Izzy Nakash
Izzy Nakash

Reputation: 187

Why won't this JOGL program run?

I am using Eclipse, i have no errors until i actually run it, when i run it i get a JVM Error and i have no idea what it means. Here is the error.:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:3174), pid=20996, tid=20564
#  Error: ShouldNotReachHere()
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed mode windows-amd64 )
# An error report file with more information is saved as:
# C:\xampp\htdocs\android\FireRunn\hs_err_pid20996.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

And this is the actual code which is supposed to simply open a frame in Eclipse, but it doesn't. Whats Wrong? And what is the role of a Javadoc? because in the Javadoc side of eclipse i get "Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found."

import javax.media.opengl.*;
import java.awt.Color;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.media.opengl.GLCapabilities;
public class Forest{//open forest



    public static void main(String[] args) {
        Frame frame = new Frame("Hello World");

        GLCapabilities glcapabilities = new GLCapabilities();
        GLCanvas glcanvas = new GLCanvas(glcapabilities);
        frame.add(glcanvas);

        frame.setSize(300, 300);
        frame.setBackground(Color.WHITE);

        frame.addWindowListener(new WindowAdapter() {

            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });//close forest
        frame.setVisible(true);
    }
}

Upvotes: 0

Views: 285

Answers (1)

Pixelapp
Pixelapp

Reputation: 161

For starters, you are using jogl1 which is not maintained anymore. You should be using jogl2 from jogamp.org. Then you should port your code to jogl2. That should fix it.

Upvotes: 1

Related Questions