Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
packages
Maha Hassan
Ranch Hand
Posts: 133
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
javac -cp ".;..;%CLASSPATH%" Package/fileName.java
But when I run it with
java Package.fileName
I get the error ..
What am I missing ??
Thanks
Maha
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Add -cp ".;..;%CLASSPATH%" also when you run the program:
java
-cp ".;..;%CLASSPATH%" Package.fileName
Jesper's Blog
-
Pluralsight Author Page
Maha Hassan
Ranch Hand
Posts: 133
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I tried
java -cp ".;..;%CLASSPATH%" Package.fileName
And it is working perfectly
)
[ September 13, 2007: Message edited by: Maha Hassan ]
I will open the floodgates of his own worst nightmare! All in a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Package Error
Netbeans
Having trouble importing Helliker for a java mp3 player
Cannot build and run Android in NetBeans
Regarding package usage
More...