Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes package Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "package" Watch "package" New topic
Author

package

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
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

Joined: Jan 09, 2001
Posts: 1492
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: package
 
Similar Threads
Timestamp part of java? Import perhaps..
Static Imports
A JNI Question
WA #1.....word association
IBM Test Question #4