wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Packaging help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Packaging help" Watch "Packaging help" New topic
Author

Packaging help

Balaji Anand
Ranch Hand

Joined: Nov 03, 2004
Posts: 146
hi
I have written a java code class1.java and have pacakge test; as the first line.

so from the Current_Directlry i compiled using

1. javac -d test class1.java in this care current_directory\test\test\class1.class is created.
I tried running it using
java test.test.class1
2. javac class1.java in this care current_directory\test\class1.class is created
i tried running it using
java test.class1

In both the cases i am getting a NoClassDefFoundError... Can someone help me on how to compile and run a class inside a package?

Where am i going wrong?
Vidhya
Sanjaya Sugiarto
Ranch Hand

Joined: Mar 25, 2004
Posts: 229
Try: java test/class1


<a href="http://www.wi.hs-furtwangen.de" target="_blank" rel="nofollow">Business Information Technology - Hochschule Furtwangen University, Germany</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Packaging help