Results 1 to 9 of 9

Thread: Java Linux

  1. #1
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Java Linux

    java version "1.4.2-01"
    Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-01)
    Java HotSpot(TM) 64-Bit Server VM (build Blackdown-1.4.2-01, mixed mode)
    Running on Gentoo

    Im trying to run a java program that I successfully compiled. Everytime I try and do so I get the following...

    Exception in thread "main" java.lang.NoClassDefFoundError: FirstApplet/class

    Generally it (google) says this happens when your CLASSPATH isnt defined properly but I've got it point to the right place (/opt/blackdown-jdk-1.4.2.01/lib) and the jar files are in there too (dt.jar htmlconverter.jar ir.idl orb.idl tools.jar)

    It doesnt even matter if I try to run a java class that doesnt exist, I still get the same error. It doesn't matter if I run it as a user or root.

    Any ideas?

    Ta!

    edit> CLASSPATH=/opt/blackdown-jdk-1.4.2.01/jre/lib - gives the same error
    Last edited by Raz316; 04-04-2005 at 05:15 PM.

  2. #2
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    java -cp . classname
    To err is human. To really foul things up ... you need a computer.

  3. #3
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts
    cheers

    same error

  4. #4
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    68 times in 51 posts
    ok

    set CLASS_PATH not CLASSPATH

    set it it to call out the individual class names then export CLASSPATH
    It is Inevitable.....


  5. #5
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    i may be mistaken, but java 1.5 is less stressy about classpaths - i haven't got one set, but 'java -jar foo.jar' works perfectly.

    worth a try?

  6. #6
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    actually, what is the EXACT invocation you're using to run your app?

  7. #7
    DsW
    DsW is offline
    Senior Member
    Join Date
    Aug 2003
    Location
    Glasgow
    Posts
    292
    Thanks
    0
    Thanked
    0 times in 0 posts
    You may need to include your JARs on your CLASSPATH explicitly - it's not enough to just include the directory that they resides in. I think JARs that are in the JRE/lib/ext are included by default but I've never been 100% sure on that and I'm not sure if that varies across platforms.

    Not a good idea to keep your development JARs in the JRE/SDK tree anyway... but that's by the by..

  8. #8
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts
    sorry kinda forgot about this, but back at work now so ill give it all a try now

  9. #9
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts
    hmm, not too sure whats been going on, but everything is working now. I just ran the command I initially ran 'java FirstApplet' and it worked.

    Maybe the other IT bod did something, sorry for wasting your time everyone and cheers for the posts

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Linux - Anyone educated in it?
    By gamezfreak in forum Software
    Replies: 19
    Last Post: 12-12-2007, 10:42 AM
  2. We heard your feedback on Newegg....
    By DR in forum General Discussion
    Replies: 33
    Last Post: 05-03-2005, 08:13 PM
  3. Tried and tested Gigbit ethernet card (Linux)
    By ikonia in forum Software
    Replies: 3
    Last Post: 26-02-2005, 10:41 AM
  4. Potential HUGE source of free Java games / apps
    By PriestJPN in forum Smartphones and Tablets
    Replies: 4
    Last Post: 03-11-2004, 01:59 AM
  5. audio and video problems, and windows app in linux
    By fedoracore in forum Software
    Replies: 0
    Last Post: 28-01-2004, 05:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •