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

packages

Maha Hassan
Ranch Hand

Joined: Aug 02, 2005
Posts: 133
Dear All,

I am trying to run a file from a package but it does not run. I get the error of NoClassDefFound.
I compile the file with

But when I run it with

I get the error ..

What am I missing ??

Thanks

Maha
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14149
    
  18

Add -cp ".;..;%CLASSPATH%" also when you run the program:

java -cp ".;..;%CLASSPATH%" Package.fileName


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Maha Hassan
Ranch Hand

Joined: Aug 02, 2005
Posts: 133
I tried
java -cp ".;..;%CLASSPATH%" Package.fileName

And it is working perfectly )
[ September 13, 2007: Message edited by: Maha Hassan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: packages