• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package

 
Mike Shn
Ranch Hand
Posts: 149
  • 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
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic