作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
任何帮助,不胜感激。
问题: Ubuntu 11.10与Java的JOGL配合不好
建立的摘要:
cd ~/workspace/projectname/src/packagename/
javac T1.java
并收到32错误,抱怨找不到软件包。至此,我意识到这不是一个月食问题。
rambo@rambo-ThinkPad-SL510:~/librambo/jar$ javac T1.java
T1.java:3: package javax.media.opengl does not exist
import javax.media.opengl.*;
^
T1.java:4: package javax.media.opengl.awt does not exist
import javax.media.opengl.awt.GLCanvas;
^
T1.java:5: package com.jogamp.opengl.util does not exist
import com.jogamp.opengl.util.*;
^
T1.java:6: package javax.media.opengl.glu does not exist
import javax.media.opengl.glu.GLU;
^
T1.java:7: package com.jogamp.opengl.util.gl2 does not exist
import com.jogamp.opengl.util.gl2.GLUT;
^
T1.java:9: cannot find symbol
symbol: class GLEventListener
public class T1 extends Frame implements GLEventListener, ActionListener {
^
T1.java:17: cannot find symbol
symbol : class GLCanvas
location: class T1
private GLCanvas canvas;
^
T1.java:75: cannot find symbol
symbol : class GLAutoDrawable
location: class T1
public void display(GLAutoDrawable drawable) {
^
T1.java:81: cannot find symbol
symbol : class GLAutoDrawable
location: class T1
public void dispose(GLAutoDrawable drawable) {
^
T1.java:85: cannot find symbol
symbol : class GLAutoDrawable
location: class T1
public void init (GLAutoDrawable drawable) {
^
T1.java:92: cannot find symbol
symbol : class GLAutoDrawable
location: class T1
public void reshape (GLAutoDrawable drawable, int x, int y, int width, int height) {
^
T1.java:115: cannot find symbol
symbol : class GLU
location: class Scene
private GLU glu = new GLU();
^
T1.java:116: cannot find symbol
symbol : class GLUT
location: class Scene
private GLUT glut = new GLUT();
^
T1.java:133: cannot find symbol
symbol : class GL2
location: class Scene
public void render(GL2 gl) {
^
T1.java:145: cannot find symbol
symbol : class GL2
location: class Scene
private void drawAxes(GL2 gl) {
^
T1.java:20: cannot find symbol
symbol : variable GLProfile
location: class T1
GLProfile.initSingleton(true);
^
T1.java:29: cannot find symbol
symbol : class GLProfile
location: class T1
GLProfile glp = GLProfile.getDefault();
^
T1.java:29: cannot find symbol
symbol : variable GLProfile
location: class T1
GLProfile glp = GLProfile.getDefault();
^
T1.java:30: cannot find symbol
symbol : class GLCapabilities
location: class T1
GLCapabilities caps = new GLCapabilities(glp);
^
T1.java:30: cannot find symbol
symbol : class GLCapabilities
location: class T1
GLCapabilities caps = new GLCapabilities(glp);
^
T1.java:31: cannot find symbol
symbol : class GLCanvas
location: class T1
canvas = new GLCanvas(caps);
^
T1.java:56: cannot find symbol
symbol : class FPSAnimator
location: class T1
FPSAnimator animator = new FPSAnimator(canvas, 60);
^
T1.java:56: cannot find symbol
symbol : class FPSAnimator
location: class T1
FPSAnimator animator = new FPSAnimator(canvas, 60);
^
T1.java:76: cannot find symbol
symbol : class GL2
location: class T1
GL2 gl = drawable.getGL().getGL2();
^
T1.java:86: cannot find symbol
symbol : class GL2
location: class T1
GL2 gl = drawable.getGL().getGL2();
^
T1.java:93: cannot find symbol
symbol : class GL2
location: class T1
GL2 gl = drawable.getGL().getGL2();
^
T1.java:99: cannot find symbol
symbol : variable GL2
location: class T1
gl.glMatrixMode(GL2.GL_PROJECTION);
^
T1.java:108: cannot find symbol
symbol : variable GL2
location: class T1
gl.glMatrixMode(GL2.GL_MODELVIEW);
^
T1.java:115: cannot find symbol
symbol : class GLU
location: class Scene
private GLU glu = new GLU();
^
T1.java:116: cannot find symbol
symbol : class GLUT
location: class Scene
private GLUT glut = new GLUT();
^
T1.java:134: cannot find symbol
symbol : variable GL2
location: class Scene
gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
^
T1.java:148: cannot find symbol
symbol : variable GL2
location: class Scene
gl.glBegin(GL2.GL_LINES);
^
32 errors
参考资料
rambo@rambo-ThinkPad-SL510:~/libme$ javac T1.java
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:30: package android.content does not exist
import android.content.*;
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:31: package android.content.pm does not exist
import android.content.pm.*;
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:32: package android.util does not exist
import android.util.Log;
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:37: cannot find symbol
symbol : class PackageInfo
location: class jogamp.common.os.android.PackageInfoUtil
public static final PackageInfo getPackageInfo(String packageName) {
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:41: cannot find symbol
symbol : class Context
location: class jogamp.common.os.android.PackageInfoUtil
public static final PackageInfo getPackageInfo(Context ctx, String packageName) {
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:41: cannot find symbol
symbol : class PackageInfo
location: class jogamp.common.os.android.PackageInfoUtil
public static final PackageInfo getPackageInfo(Context ctx, String packageName) {
^
/home/rambo/libme/jogamp/common/os/android/StaticContext.java:30: package android.content does not exist
import android.content.*;
^
/home/rambo/libme/jogamp/common/os/android/StaticContext.java:31: package android.util does not exist
import android.util.Log;
^
/home/rambo/libme/jogamp/common/os/android/StaticContext.java:34: cannot find symbol
symbol : class Context
location: class jogamp.common.os.android.StaticContext
private static Context context = null;
^
/home/rambo/libme/jogamp/common/os/android/StaticContext.java:37: cannot find symbol
symbol : class Context
location: class jogamp.common.os.android.StaticContext
public static final synchronized void setContext(Context ctx) {
^
/home/rambo/libme/jogamp/common/os/android/StaticContext.java:41: cannot find symbol
symbol : class Context
location: class jogamp.common.os.android.StaticContext
public static final synchronized Context getContext() {
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:44: cannot find symbol
symbol : class PackageInfo
location: class jogamp.common.os.android.PackageInfoUtil
final PackageInfo pi = ctx.getPackageManager().getPackageInfo(packageName, PackageManager.GET_META_DATA);
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:44: cannot find symbol
symbol : variable PackageManager
location: class jogamp.common.os.android.PackageInfoUtil
final PackageInfo pi = ctx.getPackageManager().getPackageInfo(packageName, PackageManager.GET_META_DATA);
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:45: cannot find symbol
symbol : variable Log
location: class jogamp.common.os.android.PackageInfoUtil
if(DEBUG) Log.d(MD.TAG, "getPackageInfo("+packageName+"): "+pi);
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:47: cannot find symbol
symbol : variable Log
location: class jogamp.common.os.android.PackageInfoUtil
} catch (Exception e) { if(DEBUG) { Log.d(MD.TAG, "getPackageInfo("+packageName+")", e); } }
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:49: cannot find symbol
symbol : variable Log
location: class jogamp.common.os.android.PackageInfoUtil
if(DEBUG) Log.d(MD.TAG, "getPackageInfo("+packageName+"): NULL");
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:54: cannot find symbol
symbol : class PackageInfo
location: class jogamp.common.os.android.PackageInfoUtil
final PackageInfo pInfo = getPackageInfo(packageName);
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:58: cannot find symbol
symbol : class PackageInfo
location: class jogamp.common.os.android.PackageInfoUtil
final PackageInfo pInfo = getPackageInfo(packageName);
^
/home/rambo/libme/jogamp/common/os/android/PackageInfoUtil.java:60: cannot find symbol
symbol : variable Log
location: class jogamp.common.os.android.PackageInfoUtil
if(DEBUG) Log.d(MD.TAG, "getPackageInfoVersionName("+packageName+"): "+s);
^
/home/rambo/libme/jogamp/common/os/android/StaticContext.java:38: cannot find symbol
symbol : variable Log
location: class jogamp.common.os.android.StaticContext
if(DEBUG) Log.d(MD.TAG, "setContext("+ctx+")");
^
Note: /home/rambo/libme/javax/media/opengl/awt/GLCanvas.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
20 errors
删除android文件夹无济于事。
rambo@rambo-ThinkPad-SL510:~$ /usr/lib/nux/unity_support_test -p
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon HD 4500 Series
OpenGL version string: 3.3.11005 Compatibility Profile Context
Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes
Unity 3D supported: yes
最佳答案
我修好了它! = D
您是否遇到同样的问题?
症状
sudo apt-get install gcc libgl1-mesa-dev libglu1-mesa-dev xorg-dev libice-dev libsm-dev libx11-dev libxext-dev libxxf86vm-dev libxinerama-dev libxrandr-dev libxrender-dev
sudo add-apt-repository ppa:eclipse-team/debian-package
sudo apt-get update
sudo apt-get install ant
java -version
sudo update-alternatives --config java
cd ~
mkdir hera
cd hera/
git clone git://jogamp.org/srv/scm/gluegen.git gluegen
git clone git://jogamp.org/srv/scm/jogl.git jogl
gksu gedit /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:~/.rvm/bin
echo $PATH
关于java - 如何在Ubuntu 11.10上获得JOGL的工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7810504/
我是一名优秀的程序员,十分优秀!