我正在使用Eclipse,我没有错误,直到我实际运行它,当我运行它我得到一个JVM错误,我不知道它意味着什么。这是错误:
#
# 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
#
这是实际的代码,它应该只是在Eclipse中打开一个框架,但事实并非如此。怎么了? Javadoc的作用是什么?因为在日食的Javadoc方面我得到“注意:这个元素既没有附加源也没有附加Javadoc,因此找不到Javadoc。”
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);
}
}
答案 0 :(得分:1)
对于初学者,您使用的是不再维护的jogl1。你应该使用jogamp.org的jogl2。然后你应该将代码移植到jogl2。那应该解决它。