unable to execute a jar file - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

unable to execute a jar file

msakilamsakila Posts: 5Member
i was trying to create a Executable jar file.. after creating i was trying to run using the syntax java -jar Myjar.jar.. when i was doing this it shows the error message like "Exception in Thread main java.lang .NoClassDefFoundError" Even when i tried this for a jar file which contains the single class file also I'm gettin the same error..

i hav tried with all possible solutions which i known..
plz give me a solution..


  • tollitolli Posts: 44Member
    i've faced tis pblm with jdk 1.5...u need to change the path ....right click on "my computer" -> go advanced -> Environment Variables ->Edit-> do not erase anything, just add et the end of the line the path to the "bin" of java folder u downloaded to ur C: (example: ;jdk1.5in)

    another thing...u might have an old version...need to download a new one

    I got the jdk1.6 and it worked

  • msakilamsakila Posts: 5Member

    I'm usin jdk1.6.0 only.. i've set the path correctly eventhough am gettin the same error(java.lang.NoClassDefFounError).

    Even i've set with the new path for my jar directory alone.. No change.. plz help me out thru' this..
Sign In or Register to comment.