Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

packages

 
Maha Hassan
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add -cp ".;..;%CLASSPATH%" also when you run the program:

java -cp ".;..;%CLASSPATH%" Package.fileName
 
Maha Hassan
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried
java -cp ".;..;%CLASSPATH%" Package.fileName

And it is working perfectly )
[ September 13, 2007: Message edited by: Maha Hassan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic