简体   繁体   中英

java -jar classpath refers jar inside ear

I have one big app.ear file which contains all my jar. now i am having another healthcheck.jar which will check the database up or not by connecting to database. now database client is inside the ear file, again i don't want to put the client jars(database client, hibernates jars etc) into healthcheck.jar.

is their a way so that i can exclude packaging database client jar from healthcheck.jar and refer it while run time from inside app.ear i'e

java -jar healthcheck.jar -classpath app.ear/hibernate.jar

Both are stored in common folder.

Instead of bundling in the jar file you could add app1jar.jar as an endorsed jar to the container. It's then available to all installed apps.

https://docs.oracle.com/cd/E17904_01/web.1111/e13706/libraries.htm#WLPRG332

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