I want to give my project to someone else. I want it to run on her computer
regardless of the version of java she has, or even if she does not have the
the extra jars used by my project. There is an "src" folder with my source code.
There is also "JRE System Library" (JSL) and "Referenced Libraries" (RL).
I manually copied the contents of RL inside a lib folder that i made in my project.
I want to use the jars in lib in my build path. But I dont see the lib folder (or its jars) when
I use the "configure build path" option. How do I add the Jars in that lib folder to build path.
Once that is done, I want to do the same for JSL.
If the above things can be done, then will my program be able to work in a system, even
if it does not have jars installed ?
In Eclipse, there is an option - create executable jar. Inside that, it asks whether you want to package class files, or required jars, or nothing at all.
If you choose to package required jars, then size of your jar would be quite big, but it will contain a lib folder, inside which, required jars would be copied - and classpath would be accordingly set in manifest file.
However, while doing this with third party jars, make sure that you are not breaking anything legal (i.e. you are packaging only free jars etc. - for it is illegal to deliver non-free third party jars with your application).