Duke said:
Using Eclipse, how do you get an existing java file to become part of
the project, so that other java files can use it (equivalent to
#include in C)? This seems like it should be easier than it is...
Thanks!
You did not specify if this is a java source and or class file. There
are at least three two ways to do what you want to do.
First
- put your target file into a jar file.
- Right click on your Eclipse project and select "Properties"
- Select "Java Build Path"
- Select "Add External Jar" and add that jar file you created
- Your project now has access.
Second
- Select main menu Windows\Preferences\Java\Build Path\Classpath Variables
- Add a path to your external code
- then you can add to your projects
Third
- Create a project in Eclipse for you external code.
- House it here
- Any other project that wants to reference this code the do the
following:
- Right click on your Eclipse project sand select "Properties"
- Select Project references
- Select the project you just created do that
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)