Where lace nessesary files for jogl in Win32?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Where lace nessesary files for jogl in Win32?

giel
I want my Jgrasp (Java IDE) to work with opengl-jogl. I placed this files on csis.pace.edu/~marchese/CG/JOGL/jogl-win32.zip in nessesary jre/lib/ext  and jre/bin folders. But it returns during compilation -- Note: Lesson0.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Despite it display the simple windows despite it do not render the background f.i.
So I downloaded all sources at http://jogamp.org.
But I tried to place these files (according to http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL#Downloading_the_latest_aggregated_autobuild):

gluegen-rt.jar
jogl-all.jar ---> jre/lib/ext

gluegen-java-src.zip
jogl-java-src.zip  ---> jre/lib

gluegen-rt.dll
jogl_desktop.dll  ---> jre/bin

nativewindow_awt.dll
nativewindow_win32.dll
newt.dll    ---> windows/system32

But nothing has not changed. So where I should place this file that files should works correctly.
Would you like to suggest me correct folders. Or waht Is should wright in Path and ClassPath settings of Jgrasp?
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

giel
//Note: Lesson0.java uses or overrides a deprecated API.
//Note: Recompile with -Xlint:deprecation for details. --- Here is such message I do not know how
to launch this -Xlint to check?

I also defined the classpath variable of jars file full path. Then I designed Path variable to
Windows/system32 and jre/bin. But it did not works again. What to do?
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

Wade Walker
Administrator
It's hard to understand from your description, but perhaps your Lesson0.java was written to an older version of JOGL, and is now getting a deprecation error because JOGL's API has changed somewhat. It might help if you added "-Xlint:deprecation" to your Java command line -- that way you could see what deprecated API your code is trying to use.
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

giel
But I neever user Java Commad Line. JGrasp has just Compile, JGrasp Message, I/O, Interaction.
There is Run Argumnets tab but if I place there this command then Run I get the previous resukt not explanation.
import java.awt.*;
import java.awt.event.*;
import net.java.games.jogl.*;
public class Lesson0 {
  public static void main(String[] args){
    Frame frame = new Frame("Hello World");
     GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
    frame.add(canvas);
     frame.setSize(400, 400);
    frame.setBackground(Color.white);
    frame.addWindowListener(new WindowAdapter()
    {
          public void windowClosing(WindowEvent e)
        {
            System.exit(0);
        }
    });
     frame.setVisible(true);
  }
}

It returns just the black background not white. Deprecated is .show() method despite the change to.setVisible(true)--it did not changed anything.
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

Wade Walker
Administrator
The use of "import net.java.games.jogl" looks like your code was originally written to JOGL 1 (the original version of JOGL, maintained by Sun before they went out of business). JOGL 2 is based on JOGL 1, but it's been updated and changed over the years, so some packages are in a different place and some parts of the API are different. You can see examples at http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing of how to use JOGL 2 with the various window toolkits.

If you have a lot of JOGL 1 code lying around and you don't want to convert it to JOGL 2, you might just revert back to JOGL 1 and keep using that if it works for you :)
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

giel
In reply to this post by giel
Maybe my jre 1.6 is outdated for the last march 2015 jogl jars.
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

giel
Lesson0.java:5:
Lesson0.java:1: package javax.media.opengl does not exist
import javax.media.opengl.GL;
Lesson0.java:2: package javax.media.opengl does not exist
import javax.media.opengl.GL2;---maybe really my kre is outdated as 1.6 despite it seems to be 7 version.
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

gouessej
Administrator
In reply to this post by giel
Hi

giel wrote
I want my Jgrasp (Java IDE) to work with opengl-jogl. I placed this files on csis.pace.edu/~marchese/CG/JOGL/jogl-win32.zip in nessesary jre/lib/ext  and jre/bin folders.
Please read the JOGL user's guide, never put the JOGL JARs into the JRE as it can cause some conflicts when running applets and applications based on JOGL. Set the classpath to the directory containing the JARs of JOGL and GlueGen (the JARs containing the Java libraries and those containing the native libraries), you can adapt these instructions to your IDE and look at this comment about JGrasp. Wade is right, your code uses a pre-beta version of JOGL 1 and javax.media.* has been moved to com.jogamp.* in JOGL 2.3.1 as you can see here.

Edit.: You can find a simple example here.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

Wade Walker
Administrator
In reply to this post by Wade Walker
Fixed the wiki example code at http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing to use the new com.jogamp.opengl package instead of the old javax.media.opengl package.

Reply | Threaded
Open this post in threaded view
|

Re: Where lace nessesary files for jogl in Win32?

gouessej
Administrator
Thanks :)
Julien Gouesse | Personal blog | Website