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

Error running Java programs

  • 13-04-2004 12:15pm
    #1
    Closed Accounts Posts: 2,951 ✭✭✭


    Everything was fine until today. Last week i installed the Java Advanced Imaging library on top of the java sdk 1.4.2 Everything ran fine for a while. Now when i try to run a program i get this error

    Exception in thread "main" java.lang.NoClassDefFoundError: hello


    Where hello was the name of the program. Ive tried it with loads of my programs and the same thing. Tried reinstalling sdk 1.4.2 but still no joy. The classpath is set to "C:\ORANT\jbin\ovc.jar" which looks strange to me, the path is set to "C:\j2sdk1.4.2_04\bin"

    Any ideas?
    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 3,548 ✭✭✭Draupnir


    set the classpath to match the path, then it should work


  • Registered Users, Registered Users 2 Posts: 491 ✭✭Silent Bob


    AFAIR on a windows box the current directory isn't added to the classpath. You can add to the classpath on a per-invocation basis by using the -classpath command line argument. It expects a colon separated list of paths.


  • Registered Users, Registered Users 2 Posts: 2,013 ✭✭✭lynchie


    Originally posted by Silent Bob
    AFAIR on a windows box the current directory isn't added to the classpath. You can add to the classpath on a per-invocation basis by using the -classpath command line argument. It expects a colon separated list of paths.

    use a colon to separate the paths under unix, or a semicolon under windows.

    Make sure the directory where hello.class is located is on the classpath or if it is in a jar file ensure that the jar file is on the classpath.

    e.g. if hello.class is in c:\java then run it with java -classpath c:\java hello


Advertisement