Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Jar Files In Referenced Libraries Of A Project Across Computers(jar files not compiling with project on a different computer)
Jar Files In Referenced Libraries Of A Project Across Computers [message #1793146] Tue, 31 July 2018 15:34 Go to next message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Everyone,

How are you? I have a question about making sure that jar files I have added to the referenced libraries of a given java project can compile across platforms on other computers. I have encountered an issue when zipping a project, emailing it and trying to run it on another computer. I realized that I could make the access more generalized for any case of someone else running it. I was wondering how I might be able to allow these files in the project to be accessed on different environments, with the fewest possible changes? I read something about converting the jar files into plug-ins, but was wondering if this was the simplest approach?

Thank you,
Ioannis Nearchou
Re: Jar Files In Referenced Libraries Of A Project Across Computers [message #1793158 is a reply to message #1793146] Tue, 31 July 2018 18:19 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
If the jar files required by your own source code are few and small, then asking JDT to include all referenced jars in your own jar might be the simplest thing that could possibly work. See the help in and around http://help.eclipse.org/photon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-export-runnable-jar.htm&anchor=library-handling

Is your question only about distributing the compiled application? Do you use any build system with dependency management?
Re: Jar Files In Referenced Libraries Of A Project Across Computers [message #1793948 is a reply to message #1793158] Tue, 21 August 2018 02:27 Go to previous message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Stephan,

How are you? Thank you for the reply. I apologize for my own late reply. After your reply, I started looking into build systems and have started learning to use Gradle for dependency management. The focus of this question is distribution, because I want to make sure any dependencies required in my project are present in the hierarchy of the folder and are the most compatible versions relative to the platform someone is using, such as Mars vs. Photon.

As for a simple solution to save time, what is the upper bound on "few" for number of jars in a bundle? I counted nearly 40 jars required by my project. I also recall being able to use configure build path to create a Plug-in Dependencies folder in the build path. I suppose this would be a similar solution to the suggestion you gave about the jar bundling.

The particular problem I have is with a program that is used to load Ecore or UML files, created dynamic EMF models from them, and create OCL constraints that would be saved to instances of these models. To do this, I require jars such as org.eclipse.emf.mapping.ecore2xml_2.9.0.v20170609-0928.jar, but want to make sure they are portable as I zip and export the project from my computer and then unzip and import to another IDE on another computer. I was wondering what are the steps to add jars to a Plug-in Dependencies folder after it is created, instead of referencing local libraries from my file system? Is there also a similarly simple solution when considering dependency management?

Thank you,
Ioannis Nearchou
Previous Topic:Importing Maven projects is not adding Maven dependencies
Next Topic:How to search all references of a method ?
Goto Forum:
  


Current Time: Tue May 07 14:47:18 GMT 2024

Powered by FUDForum. Page generated in 0.03126 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top