I have 2 projects at this hierarchy
*Project1
**src
***Class1
*Project2
**src
***Main
Can i access Class1 Class that is in Project1 in Main Class that is in Project2
Is this possible OR not?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes…you can..
1. What you can do is create a jar of the project you’re getting the class from via
Export->Java->JAR fileand put that file into your project. This will let you access the class you need while still keeping your projects self-contained.2. Use
import, and voila….you now have the access…../////////////////////Edited///////////////////////
Use this to import the project in your current project…
In eclipse do this…
Build Path ---> Configure Path ----> Click Project Tab ---> Add the project.But still using
Jaris muchmore easier while importing and exporting..and you can give theversion numbersto jar, and can mention the changes in them…