Specify the -target 1.5 argument in your javac task.
sorry for the delay, i was very busy at work.
but now i have updated BlendInspect! it is compiled with source 1.5 target and it also features a small particle system to make it easier to find the correct blendmode for your game’s particlesystem!
i would be very happy if you guys (especially those with a mac) could give it a try again and provide a little feedback, if it worked or not. thanks a lot!
website: http://www.embege.com/blendinspect/
webstart: http://www.embege.com/blendinspect/blendinspect.jnlp
got bad version in class file :
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at com.sun.jnlp.JNLPClassLoader.defineClass(JNLPClassLoader.java:314)
at com.sun.jnlp.JNLPClassLoader.access$100(JNLPClassLoader.java:53)
at com.sun.jnlp.JNLPClassLoader$1.run(JNLPClassLoader.java:254)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:247)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at com.sun.jnlp.JNLPClassLoader.loadClass(JNLPClassLoader.java:600)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.javaws.Launcher.continueLaunch(Launcher.java:884)
at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:522)
at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:218)
at com.sun.javaws.Launcher.run(Launcher.java:165)
at java.lang.Thread.run(Thread.java:613)
Java Web Start Error:
null
damned not again!
thank you very much for the feedback.
can i ask you what OS and what JRE-version you have?
thanks!
edit: i also obfuscate the jar using proguard, could that be the problem?
from the proguard docs: "By default, the version numbers of the class files are left unchanged. "
it is Mac OS X and J2SE 1.5 running…
thanks for the information.
anyone got an idea what the problem could be? i am pretty sure i compiled the sources with target 5 and also proguard shouldnt change that.
If you’re using Eclipse and 1.5 jdk, try switching the project over to that and rebuilding everything instead of specifying a target option.
ok thank you! i have uploaded a new version of the jar. could you try again?
thank you very much!
I have good news and bad news.
Bad news it still doesn’t work correctly,
Good news is it no longer crashes, I get the BlendInspect window to pop up on my Mac, but there’s only a small black bar at the top of the window. It still runs fine on my windows machine, so I’m sure where it broke.
thank you very much for the information, and the helpful tips with the java-class-version thing, lhkbob.
but now i have again no idea what the problem with this black bar could be. anyone? thanks a lot!
just have a look to the errors on J2SE 1.5 OSX ppc arch:
Exception in thread "Thread-4" javax.media.opengl.GLException: java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:256)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
at com.sun.opengl.util.Animator.display(Animator.java:144)
at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
at com.sun.opengl.util.j2d.TextureRenderer.sync(TextureRenderer.java:661)
at com.sun.opengl.util.j2d.TextureRenderer.getTexture(TextureRenderer.java:293)
at com.sun.opengl.util.j2d.TextureRenderer.draw3DRect(TextureRenderer.java:499)
at com.sun.opengl.util.j2d.TextRenderer.draw3D(TextRenderer.java:559)
at com.sun.opengl.util.j2d.TextRenderer.draw(TextRenderer.java:491)
at u.display(Unknown Source)
at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:298)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
at com.sun.opengl.util.j2d.TextureRenderer.sync(TextureRenderer.java:661)
at com.sun.opengl.util.j2d.TextureRenderer.getTexture(TextureRenderer.java:293)
at com.sun.opengl.util.j2d.TextureRenderer.beginRendering(TextureRenderer.java:576)
at com.sun.opengl.util.j2d.TextureRenderer.begin3DRendering(TextureRenderer.java:374)
at com.sun.opengl.util.j2d.TextRenderer.beginRendering(TextRenderer.java:685)
at com.sun.opengl.util.j2d.TextRenderer.begin3DRendering(TextRenderer.java:439)
at u.display(Unknown Source)
at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:258)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at apple.awt.ComponentModel.handleEvent(ComponentModel.java:251)
at java.awt.Component.dispatchEventImpl(Component.java:4097)
at java.awt.Component.dispatchEvent(Component.java:3869)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Since your last update. There’s also a black rectangular shape on panel… it somekinda misses the method in OGL as far as I can guess.
thanks very much for the information!
pretty much all of the mac-testers so far, have this problem. does anyone know why this exception is thrown on macs?
it seems it is the textrenderer.
java.lang.NoSuchMethodError: com.sun.opengl.util.texture.Texture.updateSubImage(Lcom/sun/opengl/util/texture/TextureData;IIIIIII)V
btw: it is currently on the opengl.org frontpage
http://www.opengl.org/news/permalink/blendinspect_opengl_blendmode_visualization/
you can also digg it:
http://digg.com/programming/BlendInspect
My best guess as to why that exception is being thrown is that an old version of JOGL was installed in /System/Library/Java/Extensions against the advice of the JOGL User’s Guide.
I don’t have a PPC Mac to test on but actually the app doesn’t work on OS X Intel (Mac Mini – Intel Integrated Graphics). The OpenGL canvas seems to be a small strip in the upper-left corner of the window and the rest of the window is white. Why did you make the window non-resizable? Can you publish the source code for the app so we can try to diagnose what is going wrong with your component hierarchy setup?
Actually I have to take that back. The problem seems to be that I installed the Developer Preview of Java 6 on my Mac Mini and it’s causing problems with Java Web Start.
thanks a lot for your help, Ken.
most of the people that tested it on a mac did report the same problem, so i doubt that the reason is that they installed the jogl manually. i will post the source code as soon as i get home from work.
the reason why the window is not resizable, is that i dont have to care about aspect-ratios, distortions, out-of-bounds objects, overlapping texts, etc… or in other words… lazyness.
sorry for the delay. here are the two relevant classes:
public class MainFrame extends Frame {
private static final long serialVersionUID = 1L;
public static int INIT_WIDTH = 700;
public static int INIT_HEIGHT = 500;
private Animator animator;
private static RenderFrame renderframe;
public MainFrame () {
super("BlendInspect by Matthias Grumet");
setLocationRelativeTo(null);
setResizable(false);
Toolkit.getDefaultToolkit().setDynamicLayout(true);
renderframe = new RenderFrame();
animator = new Animator(renderframe);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
new Thread(new Runnable() {
public void run() {
animator.stop();
System.exit(0);
}
}).start();
}
});
animator.start();
add(renderframe);
setVisible(true);
setInnerSize(INIT_WIDTH, INIT_HEIGHT);
setLocation((int) Math.round(GraphicsEnvironment
.getLocalGraphicsEnvironment().getCenterPoint().getX()
- INIT_WIDTH / 2.0), (int) Math.round(GraphicsEnvironment
.getLocalGraphicsEnvironment().getCenterPoint().getY()
- INIT_HEIGHT / 2.0));
}
}
public class RenderFrame extends GLCanvas implements GLEventListener, MouseMotionListener, MouseListener {
private static final long serialVersionUID = 1L;
private GL gl;
public RenderFrame () {
addGLEventListener(this);
addMouseMotionListener(this);
addMouseListener(this);
}
public void init(GLAutoDrawable drawable) {
gl = drawable.getGL();
gl.glClearColor(0,0,0,1);
gl.glEnable(GL.GL_DEPTH_TEST);
gl.glDisable(GL.GL_ALPHA_TEST);
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glEnable(GL.GL_BLEND);
}
public void display(GLAutoDrawable drawable) {
gl = drawable.getGL();
gl.glClearColor(0,0,0,1);
gl.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_COLOR_BUFFER_BIT);
...
}
public void displayChanged(GLAutoDrawable drawable, boolean arg1, boolean arg2) {}
}
You’re violating the AWT rules about performing all component-related work on the Event Dispatch Thread after the component has been realized. See this article. It applies to Swing but is generally true of the AWT components as well. Add all of the components, set the location of the frame, then make it visible and start your Animator. Follow the example of the JOGL demos.
ok, thanks a lot for the information!
i have uploaded an updated version now! again i would be very grateful for mac-testers! thanks!
I’m still getting the same problem
thanks for testing, lhkbob.
hmmm, i really need to get a mac to debug this problem …