简体   繁体   中英

How to directly make use of JAR file from main resources folder Java

This might be a slightly unusual question but I have a unique situation where something like this is a good solution for me.

I have a jar file (called engine.jar) within my src/main/resources. How can I directly make use of this jar from my main JAVA class? (add this in the build path?) but....

I have another JAR file (of the exact same name ie engine.jar) within my Maven Dependencies library which has slightly different code. I want to make use of this jar later on in my main class.

How can I accomplish this in Java?

The name of the jar should not matter by itself. Have you tried renaming 'engine.jar' so there is no conflict and then adding it to the build path?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM