Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Problem with running java from cmd line

  • 05-01-2006 2:56am
    #1
    Closed Accounts Posts: 201 ✭✭


    I have a problem with running the following command from command line in windows "java <java class file name> "
    I navigate to the directory where the class file is located in cmd line and then try to execute it and it gives

    Exception in thread "main" java.lang.NoClassDefFoundError: <java class file name>

    even though the .class file is right there in the directory that i am executing the java command from
    Any ideas???
    Is it something to do with setting the classpath ??


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    type in

    set classpath=%CLASSPATH%;.

    then try. Also check the file to see if it has a package name if it doesn't work.


Advertisement