aspose file tools*
The moose likes Beginning Java and the fly likes java.lang.NoClassDefFoundError: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java.lang.NoClassDefFoundError:" Watch "java.lang.NoClassDefFoundError:" New topic
Author

java.lang.NoClassDefFoundError:

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 660

I'm trying to compile my little application from the command line to check if it takes command line parameters, however, it's not compiling.

The source code originally was compiled at C:\Users\Administrator\workspace\ChopLineNumbers\bin\homenetwork\bkr\training (which is my Eclipse workspace sub directory.






1. Source code includes the class ChopLineNumbers


Jon
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38902
    
  23
The problem is not with your code, but with your file structure. You should have a "training" folder, inside a "bkr" folder, inside a "homenetwork" folder, and you invoke that class from just outside the homenetwork folder with the instruction

java homenetwork.bkr.training.ChopLineNumbers

Remember that IDEs can use a different folder structure from what you get at the command line. Resources: Java™ tutorials, and recent thread about a related problem. Please note the link to older threads and look at them; similar problems come up quite frequently.
Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 660

Campbell Ritchie wrote:The problem is not with your code, but with your file structure. You should have a "training" folder, inside a "bkr" folder, inside a "homenetwork" folder, and you invoke that class from just outside the homenetwork folder with the instruction

java homenetwork.bkr.training.ChopLineNumbers

Remember that IDEs can use a different folder structure from what you get at the command line. Resources: Java™ tutorials, and recent thread about a related problem. Please note the link to older threads and look at them; similar problems come up quite frequently.


That's it thanks.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38902
    
  23
 
jQuery in Action, 2nd edition
 
subject: java.lang.NoClassDefFoundError: