简体   繁体   中英

Java library maintenance/changes possible without impact to application using it?

I have a project (main application) that uses a library jar file rev1.0 (added as a referenced library in the Java build path).

I have created my main application as a runnable jar using the export feature in eclipse. The application is to be used by others in the same host.

I am curious if I have updated my library jar to rev1.1 with bug fixes etc, is there a way to deploy the updated jar/library without re-exporting the main application as a jar? I tried re-exporting the main application and it works.

If the main application references the other JAR directly and is not a "fat JAR" that includes the other within its own JAR, then yes, you can update the other until some significant breaking change happens (rename a package, remove a method/class, etc).

You will need to restart the main application to pick up new changes in the other, though

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