Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Linux Error  (Read 1492 times)
0 Members and 1 Guest are viewing this topic.
Offline dotandcross

Senior Newbie




I'm a Java Bean


« Posted 2003-07-23 13:30:17 »

Redhat 9

export PATH=$PATH:/usr/java/j2sdk1.4.2/bin:/usr/java/j2sdk1.4.2/jre/lib/ext
export CLASSPATH=.:/usr/java/j2sdk1.4.2/jre/lib/ext/jogl.jar

[root@localhost test]# java Gears
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
       at java.lang.Runtime.loadLibrary0(Runtime.java:788)
       at java.lang.System.loadLibrary(System.java:834)
       at net.java.games.jogl.impl.NativeLibLoader$1.run(NativeLibLoader.java:60)
       at java.security.AccessController.doPrivileged(Native Method)
       at net.java.games.jogl.impl.NativeLibLoader.<clinit>(NativeLibLoader.java:46)
       at net.java.games.jogl.impl.GLContext.<clinit>(GLContext.java:51)
       at net.java.games.jogl.impl.x11.X11GLContextFactory.createGLContext(X11GLContextFactory.java:52)
       at net.java.games.jogl.GLCanvas.<init>(GLCanvas.java:72)
       at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:117)
       at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:80)
       at Gears.main(Gears.java:16)
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #1 - Posted 2003-07-23 13:37:55 »

You need to point java to the jogl.so

java -Djava.library.path=/location/of/jogl.so Gears.


EDIT: It's actually libjogl.so not jogl.so my bad.

Don't send a man to do a monkey's work.
Offline sugarshark

Junior Member




Sugar to the sharks.


« Reply #2 - Posted 2003-07-23 13:53:48 »

Hi.

some Linux tipps:

  • No need to include the ext directory in $PATH or $CLASSPATH.
  • your native library must be called libjogl.so
  • the directory where libjogl.so lies needs to be listed in java.library.path
You can also set the environment  variable LD_LIBRARY_PATH to include the directory where your shared library is located. The dynamic linker will look for this variable and include the shared libs found there.

I used to think that the brain was the most wonderful organ in my body.  
Then I realized who was telling me this.
-- Emo Phillips
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline dotandcross

Senior Newbie




I'm a Java Bean


« Reply #3 - Posted 2003-07-23 15:52:19 »

Thanks guys, finally I could run Gears.java in linux! Is a good graphics card really needed for jogl to work in Linux properly??

I tried porting my application over to linux but faced the following error which was non-existence in windows xp

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CD5C437
Function=XVisualIDFromVisual+0x7
Library=/usr/X11R6/lib/libX11.so.6

Current Java thread:
     at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native Method)
     at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:42)
     at net.java.games.jogl.impl.x11.X11OnscreenGLContext.lockSurface(X11OnscreenGLContext.java:167)
     at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:108)
     - locked <0x44487ad8> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
     - locked <0x44487ad8> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
     at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:119)
     at java.awt.Component.setBounds(Component.java:1665)
     at java.awt.BorderLayout.layoutContainer(BorderLayout.java:683)
     - locked <0x448f2d00> (a java.awt.Component$AWTTreeLock)
     at java.awt.Container.layout(Container.java:1017)
     at java.awt.Container.doLayout(Container.java:1007)
     at java.awt.Container.validateTree(Container.java:1089)
     at java.awt.Container.validate(Container.java:1064)
     - locked <0x448f2d00> (a java.awt.Component$AWTTreeLock)
     at java.awt.Window.pack(Window.java:438)
     at cube.<init>(cube.java:164)
     at cube.main(cube.java:440)


I used a GLCanvas, placing it in a JFrame

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
final Container c = getContentPane();
c.setLayout(new BorderLayout());

glc = GLDrawableFactory.getFactory().createGLCanvas(cap);
glc.setSize(640,480);
glc.requestFocus();
glc.addGLEventListener(view);

// Add the Component into the window
c.add( "Center", glc );
pack(); show();
Offline AndersDahlberg

Junior Member





« Reply #4 - Posted 2003-07-23 15:58:06 »

I believe this is because a problem with mixing heavyweight components (GLCanvas) and lightweight (JFrame).

It should Wink work if you change to either using a Frame with GLCanvas or using GLJCanvas (?name?) with a JFrame.

Probably something like
1  
GLDrawableFactory.getFactory().createGLJCanvas(cap); 

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 09:09:19

Riven (13 views)
2014-07-29 09:08:52

Dwinin (12 views)
2014-07-29 01:59:34

E.R. Fleming (31 views)
2014-07-28 18:07:13

E.R. Fleming (12 views)
2014-07-28 18:06:25

pw (42 views)
2014-07-23 16:59:36

Riven (42 views)
2014-07-23 12:16:32

Riven (28 views)
2014-07-23 12:07:15

Riven (29 views)
2014-07-23 11:56:16

ctomni231 (60 views)
2014-07-17 21:55:21
HotSpot Options
by dleskov
2014-07-07 18:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-13 15:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-13 15:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 02:13:37

HotSpot Options
by Roquen
2014-05-15 00:59:54

HotSpot Options
by Roquen
2014-05-06 06:03:10

Escape Analysis
by Roquen
2014-04-29 13:16:43

Experimental Toys
by Roquen
2014-04-28 04:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!