aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes [eclipse]: how to import packages from different project? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "[eclipse]: how to import packages from different project?" Watch "[eclipse]: how to import packages from different project?" New topic
Author

[eclipse]: how to import packages from different project?

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
hello all-
I have two separate projects on eclipse. I try not to open both at the same time because it becomes really slow. But one of my projects require packages from the other, so I have to open the second project so Eclipse recognize the new classes that I'm importing/using.
If I open my properties for my project, you can only add folders for your source path that belongs for _that_ project, not from external ones. When you open the other project, I can tick the "required projects on the build path" option, but this is not exactly what I want. I don't want to open it just to use that.
any ideas?


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
How about just jar'ing up the other project's classes and importing that .jar file into the project at hand?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Originally posted by Lasse Koskela:
How about just jar'ing up the other project's classes and importing that .jar file into the project at hand?

I used this approach for a project and found it to be acceptable. An approach that I am considering for my next project is to use any to perform my builds instead of the Eclipse build system. I've recently discovered the Ant view and it seems like the ideal approach to project dependecies.


Matthew Phillips
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [eclipse]: how to import packages from different project?