Is putting external jars in the JAVA_HOME/lib/ext directory a bad thing?

前端 未结 3 1149
再見小時候
再見小時候 2020-11-28 15:19

We have an application which runs in a JRE environment. The application uses some external jars and we have been putting them in the JAVA_HOME/lib/ext folder. This has w

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 15:54

    Yes - it's a bad thing. Think about it: the application depends on the JRE and some extra jars. What if you update the JRE? Then you have to remember to copy the files into the new JRE. What if you need to set up the application on a new system? You have to copy the application there, and then also remember to copy the external jars into the JRE on that system.

    Both those issues wouldn't be an issue at all if you just package the application properly together with the external jars it needs. If you don't see this, then maybe it's not an issue at all. But you should still be grateful for the new guy for sharing his opinion.

提交回复
热议问题