jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "creating a java package" Watch "creating a java package" New topic

creating a java package

Tex Abrey

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.
Greg Charles

Joined: Oct 01, 2001
Posts: 2955

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
It's not a secret anymore!