Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
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  
  Cannot get ANY Java(3d,ogl) to work, errors  (Read 1524 times)
0 Members and 1 Guest are viewing this topic.
Offline Daem0hn

Senior Newbie




I Am New To This So Please Bare With Me


« Posted 2004-01-08 00:02:09 »

im new to the whole java3d / jogl / jsdl /lwjgl scene, and i am having alot of trouble just getting the demos to run.
My specs are

Gentoo linux 1.4
Athlon XP 2000+
nVidia geForce MX440

using the Netbeans IDE
j2sdk 1.4.2


at first i tried to get java3d working, it was packaged in a .bin installer file, so i did as the readme suggested and placed the installer in the j2sdk1.4.2 folder, then ran it, everything seemed to extract properly

i launched netbeans, browsed through the demos until i found the HelloUniverse demo, ran it, recieved the error:
Exception in thread "main" java.lang.NoClassDefFoundError: HelloUniverse

this had me puzzled, due to the fact that i had followed the readme precisely, i then went to console,

changed directory to my j2sdk/demo.java3d folder
java HelloUniverse

same error

i have also tried using JOGL and its respective demos with the same result


EDIT: i have just ensured that the path to the .jar files is included in my CLASSPATH

EDIT 2: Java Console Output

Exception in thread "main" java.lang.NoClassDefFoundError: demo/java3d/HelloUniverse/HelloUniverse (wrong name: HelloUniverse)
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #1 - Posted 2004-01-08 04:39:09 »

If you look at the HelloUniverse source, theres no package. So you have to change to the HelloUniverse directory or make sure to have it in the classpath

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Daem0hn

Senior Newbie




I Am New To This So Please Bare With Me


« Reply #2 - Posted 2004-01-08 05:56:57 »

thanks, that, seemed to work, it came up with a different error, which, i assume is because some .jar files arent where they should be

Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/Node

i was browzing through the .jar files and although i can find a javax subdir, there is no media inside it

i am quite new to both java3d and java (been programming a fw months now), so any help would be appreciated
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #3 - Posted 2004-01-08 06:00:21 »

I cannot help in detail now, but it really seems to be a classpath problem.

Look for j3dcore.jar, j3dutil.jar and j3daudio.jar.
Normally they are located in the lib/ext directory somewhere in the JRE or JDK. They need to be found!

j3dcore contains that class you are currently missing.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #4 - Posted 2004-01-08 06:29:53 »

Does look like a classpath problem, open the three jars Herk mentioned (j3dcore.jar, j3dutil.jar and j3daudio.jar) in the filesystems in netbeans to compile. I never managed to get 3d apps to work from netbeans well. Any apps that write to sysout slow down horrendously in most IDE's i've tried (especially if it writes many debug messages per frame for example). I found the best thing to do was run it from an ant script and dump the output to log files.

HTH

Endolf

Offline Daem0hn

Senior Newbie




I Am New To This So Please Bare With Me


« Reply #5 - Posted 2004-01-08 09:11:21 »

thank you for your continued persistance with my questions, now it can find the classes correctly, there is one more error that it is coming up with, i have no clue why this occurs:

Exception in thread "main" java.lang.NoClassDefFoundError: demo/java3d/HelloUniverse/HelloUniverse (wrong name: HelloUniverse)
       at java.lang.ClassLoader.defineClass0(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


i have the jars mounted in netbeans, aswell as included in my class path

EDIT: i have been playing with jogl
when ever i goto run a jogl program the error
no jogl in java.library.path
is given, i assume that this means the jogl jar isnt in the library path, is this the same as CLASSPATH?

thanks in advance for your continued persistance
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #6 - Posted 2004-01-08 12:16:02 »

Still the same problem.

In NetBeans, make sure to mount the subdirectory demo/java3d/HelloUniverse as well and compile the class the from there! NetBeans takes the mountpoint as basis for the classpath!

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Daem0hn

Senior Newbie




I Am New To This So Please Bare With Me


« Reply #7 - Posted 2004-01-08 23:21:00 »

thank you for your continued persistance, i didnt know that netbeans operated that way, i have it working now, thanks Smiley
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.

Nickropheliac (9 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (27 views)
2014-08-22 19:31:30

atombrot (40 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (34 views)
2014-08-16 06:22:17

Tekkerue (24 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (71 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!