0

I have many projects in a software. Although some files and classes are shared within these projects, there are classes used by most of these projects. How do i creat classes that can be shaed among different projects . Is there anything in java that can function the same as 'modules' in vb.net?
Thanks a lot.

3
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by __avd
0

Create a seperate Project with some classes and then you can import these classes like you import any other class:

import java.util.*

The only difference is that you will be importing your classes with their packages.
You can take the .class files (in their folder/package) or create a jar file with the classes. Then add that to the classpath of the project you want them to be used.

0

Dear,

Create .jar of those classes you want to use them in different projects and append the entry of .jar file CLASSPATH environment variable.

PS:
You can place .jar files in \jdk1.6.0\jre\lib\ext . (shared folder of jvm - am I?, Mr. Ancient Dragon.).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.