We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › issue: OpenGL application
Page Index Toggle Pages: 1
issue: OpenGL application (Read 4087 times)
issue: OpenGL application
Dec 3rd, 2006, 12:03am
 
Hi,

I'm writing a program right now that needs to be displayed at fullscreen using OpenGL (in order to support the required 1920x4800 resolution)

The program runs perfectly inside Eclipse 3.2 when I "Run as Java application" (fullscreen, perfect OpenGL renderings) but when I try to run the jar (exported using fatjar), I kept on getting this error:

javax.media.opengl.GLException: java.lang.reflect.InvocationTargetException
       at javax.media.opengl.GLCanvas.disableBackgroundErase(GLCanvas.java:352)
       at javax.media.opengl.GLCanvas.addNotify(GLCanvas.java:154)
       at java.awt.Container.addNotify(Unknown Source)
       at java.awt.Panel.addNotify(Unknown Source)
       at java.awt.Container.addImpl(Unknown Source)
       at java.awt.Container.add(Unknown Source)
       at processing.core.PApplet.main(PApplet.java:6544)
       at SphereMotionApp.main(SphereMotionApp.java:25)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.simontuffs.onejar.Boot.run(Boot.java:243)
       at com.simontuffs.onejar.Boot.main(Boot.java:89)
Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at javax.media.opengl.GLCanvas.disableBackgroundErase(GLCanvas.java:350)
       ... 13 more
Caused by: java.lang.UnsatisfiedLinkError: disableNativeBackgroundErase
       at sun.awt.windows.WCanvasPeer.disableNativeBackgroundErase(Native Method)
       at sun.awt.windows.WCanvasPeer.disableBackgroundErase(Unknown Source)
       at sun.awt.windows.WToolkit.disableBackgroundErase(Unknown Source)


I've searched the forums as well as Google but have not been able to resolve this issue. If anyone can help, it'd be greatly appreciated.

Thanks!

Re: issue: OpenGL application
Reply #1 - Dec 3rd, 2006, 1:03am
 
Forgot to mention the development environment:

PC / XP Pro
processing 0122
Eclipse 3.2 running on Java 1.5.0_10-b03
Project's JRE System Library: j2sdk1.4.2_13

I don't think that full code listing would be relevant here other than that I'm using the following to get the app to run in fullscreen:

Code:

import processing.core.*;

public class SphereMotionApp extends PApplet
{
//...

public static void main(String[] args)
{
PApplet.main(new String[] { "--present", "SphereMotionApp" });
}

//...

}

Re: issue: OpenGL application
Reply #2 - Dec 3rd, 2006, 1:23am
 
that looks like conflicting versions of jogl installed on your system.
Re: issue: OpenGL application
Reply #3 - Dec 3rd, 2006, 11:07pm
 
I have only installed one version of jogl--namely the one that comes with processing. what other versions would i have?

Re: issue: OpenGL application
Reply #4 - Dec 4th, 2006, 7:45am
 
Assuming that there is another version of jogl running--though I did do a search on my harddrives for filenames containing jogl, and there aren't any--how would I go about getting only one version running?

Also, should I use jogl that comes with processing or should I download the latest stable build from jogl's Web site?

s
Re: issue: OpenGL application
Reply #5 - Dec 4th, 2006, 8:03am
 
OK I figured it out. It's silly really:

Although I specified to run the app in Java 1.4.2 in Eclipse, I've forgotten to use the full path to Java 1.4.2 in my batch file. As such, the default java.exe that got run was my default runtime, which is Java 1.5.

It's working as expected right now.

(issue closed)
Re: issue: OpenGL application
Reply #6 - Mar 2nd, 2007, 5:57am
 
Hi seeminglee,

Can you please explain me why do you need to use Java 1.4.2 instead of 1.5? Is there any problem with running Processing in Java 1.5?

Thanks,
Nuno
Re: issue: OpenGL application
Reply #7 - Mar 2nd, 2007, 10:21am
 
There's a bug in Java 1.5.0_10 that makes the version of JOGL which recent versions of Processing use, throw that exception.

the fix is to either get the latest JOGL release, or change to a different version of Java.
Re: issue: OpenGL application
Reply #8 - Mar 3rd, 2007, 4:04pm
 
Thanks.

I'm using 1.5.0_11 in which probably the problem is already corrected, since I didn't get that bug.

Nuno
OpenGL application - SecurityException
Reply #9 - Jun 10th, 2007, 1:45pm
 
hi,
I just had some trouble with using jogl from a standalone jar app. I found the solution to my problem, so I might as well post it here.

my setup:
developing in Jbuilder (foundation)
winXP
processing-0118 core library.
java 1.4.2

when test running from JBuilder, everything worked fine, but when I ran the standalone jar file I created, I kept getting this error :
"java.lang.SecurityException":no manifiest section for signature file..."

the solution to my problem was downloading the JOGL-1.0.0-win binaries from https://jogl.dev.java.net/(sept 06, the 1.1.0 didn't work) and replace the ones that came with processing with these.
I always used java 1.4.2 with openGL, but with these new files it also works with 1.6

hope this helps someone out there.
tim.
Re: issue: OpenGL application
Reply #10 - Jun 10th, 2007, 2:47pm
 
which version of java 1.4.2 are you using? that might be part of your problem.
Re: issue: OpenGL application
Reply #11 - Dec 12th, 2007, 1:45am
 
The version I was having problems with was 1.4.2_04-b05 . (this problem has been solved a long time ago, just posting this for "who knows, someone might find it useful" reasons)
Page Index Toggle Pages: 1