Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add multiple source folders to a JAR?

Tags:

People also ask

How do I add a resource file to a JAR file?

1) click project -> properties -> Build Path -> Source -> Add Folder and select resources folder. 2) create your JAR!

Can jar contain resources?

jar ) contain your executable classes and resource files. A jar can also contain other jar files, which is useful when your program needs some library which is packaged in a jar.

In which folder can we add JAR file?

If you're wanting to include a JAR file to your Eclipse project, you would generally create a 'lib' folder inside the project folder, and put the file in there. You then need to tell eclipse to include it in your class path so your code will compile and run inside eclipse.


I have a large JAR file from a library, the source code of which is scattered across multiple different folders, so I have to merge these folders manually and specify the single merged folder as the source.

Is there any way in Eclipse to link more than one source folder to a specific JAR? I am guessing not and various tricks I have tried do not seem to work, but if anyone knows of one that works, please post it.