Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By cleomar

Thread: experiencing problems with java.

  1. #1
    cleomar is offline Member
    Join Date
    Mar 2016
    Posts
    2
    Rep Power
    0

    Default experiencing problems with java.

    experiencing problems with java. how to fix

    java -classpath . helloworld
    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
    Caused by: java.lang.ClassNotFoundException: helloworld
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 23)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 68)
    Could not find the main class: helloworld. Program will exit.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,001
    Rep Power
    33

    Default Re: experiencing problems with java.

    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
    The java program could not find a definition for the helloworld class. Where is the helloworld.class file located? Was it in the folder where the java command was issued?
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    cleomar is offline Member
    Join Date
    Mar 2016
    Posts
    2
    Rep Power
    0

    Default Re: experiencing problems with java.

    java JMXCommandLine.java
    Exception in thread "main" java.lang.NoClassDefFoundError: JMXCommandLine/java
    Caused by: java.lang.ClassNotFoundException: JMXCommandLine.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 23)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 68)
    Could not find the main class: JMXCommandLine.java. Program will exit.
    jack12 likes this.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: experiencing problems with java.

    You need to compile .java files into .class files.

    See here.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Java RPG problems
    By Nickmanzz in forum New To Java
    Replies: 13
    Last Post: 04-13-2011, 09:14 PM
  2. Replies: 9
    Last Post: 03-18-2011, 02:41 PM
  3. Some problems with java
    By JeanNoel 53 in forum New To Java
    Replies: 1
    Last Post: 12-30-2010, 11:24 PM
  4. Replies: 2
    Last Post: 01-16-2010, 04:50 PM
  5. Java Problems
    By xonkie in forum New To Java
    Replies: 6
    Last Post: 12-03-2008, 07:14 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
  •