This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 2841
    
  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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating a java package
 
Similar Threads
Eclipse - Folder or Package
Downloading the tar package
about package
JavaBeans Activex Bridge
Problem in accessing the in my own package.