File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package

 
Mike Shn
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I wrote a porgram at the beginning of a class I have
package mypackage:
Bit it gives me an error incorrect path.
Why is that?

Thanks
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
When you place a package statement inside a *.java file the file must be placed into a subdirectory of that same name when you want to run it. Then when you run it you should type:
java mypackage.className
Regards,
Manfred.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic