Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Trupti Patil   on Apr 01 In Java Category.

  
Question Answered By: Dan Romero   on Apr 01

Your program compiles and runs successfully on my
machine. There is no program error.<br><br>The problem  is
that you are applying some logic that should not be
applied, in this case.<br><br>To compile java  modules, you
MUST supply the .java extension: javac
App.java<br><br>But, to execute, you must NOT supply the .class
extension. Therefore:<br>java App // works<br>java App.class
// throws the error<br><br>Consistency does not hold
in this case.<br><br>Try again and see if that works
for you (removing .class).

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Exception in thread "main" Java.lang.NoClassDefFoundError Or get search suggestion and latest updates.


Tagged: