File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes creating a java package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "creating a java package" Watch "creating a java package" New topic
Author

creating a java package

Tex Abrey
Greenhorn

Joined: Oct 04, 2002
Posts: 24
How do you go about creating a java package. I need to create a package for this class so that i can import it into a jsp page.
Thanks
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2853
    
  11

Just put a line at the top of the class definition like:
package mypackage;
Voila, instant package. The package is usually reflected in the file structure, so you may want to put this file into something like src/mypackage/MyClass.java, and the class should definitely go in something like classe/mypackage/MyClass.class.
[ March 26, 2003: Message edited by: Greg Charles ]
 
wood burning stoves
 
subject: creating a java package