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
    75 times in 56 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
    Vive le pants! directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • MSI X99A Gaming 7
      • CPU:
      • Intel Core i7 5280k
      • Memory:
      • 32GiB ADATA DDR4
      • Storage:
      • Corsair Neutron XT 960GB
      • Graphics card(s):
      • MSI GTX 980 Gaming 4G Twin Frozr 5
      • PSU:
      • Corsair AX860i
      • Case:
      • NZXT H440
      • Operating System:
      • Ubuntu 17.10, Windows 10
      • Monitor(s):
      • Dell U2713HM
      • 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
    Vive le pants! directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • MSI X99A Gaming 7
      • CPU:
      • Intel Core i7 5280k
      • Memory:
      • 32GiB ADATA DDR4
      • Storage:
      • Corsair Neutron XT 960GB
      • Graphics card(s):
      • MSI GTX 980 Gaming 4G Twin Frozr 5
      • PSU:
      • Corsair AX860i
      • Case:
      • NZXT H440
      • Operating System:
      • Ubuntu 17.10, Windows 10
      • Monitor(s):
      • Dell U2713HM
      • 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
  •