Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (512)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 1541 times)
0 Members and 1 Guest are viewing this topic.
Offline dotandcross

Senior Newbie




I'm a Java Bean


« Posted 2003-07-23 11: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 Duke




ooh ooh eee eeee


« Reply #1 - Posted 2003-07-23 11: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 Duke




Sugar to the sharks.


« Reply #2 - Posted 2003-07-23 11: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 13: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 Duke





« Reply #4 - Posted 2003-07-23 13: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.

Longarmx (49 views)
2014-10-17 03:59:02

Norakomi (39 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (35 views)
2014-10-15 16:18:58

TehJavaDev (66 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (55 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (43 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!