Java: Exception in thread main java.lang.NoClassDefFoundError

 


    Exception in thread “main” java.lang.NoClassDefFoundError:When trying to run a Java program, you may get this annoying error. I first got it when running our simple hello world program.
    The error occurs because the classpath is not set up or referenced correctly.
    Executing your program using the following command should correct the problem:
    java -classpath . helloworld
    In this command, helloworld is the name of your compiled class.
    This tells Java that your classpath is your local directory.

Comments

Popular posts from this blog

How to configure Glowroot with Liferay

How to Get Back Asus Zenphone 5 from Soft Brick

How to Unlock Boot Loader of Htc Explorer