简体   繁体   English

如何在Spring MVC应用程序中代替Oracle JDK 1.8使用OpenJDK 8?

[英]How to use OpenJDK 8 in Spring MVC application instead of Oracle JDK 1.8?

I have developed a Spring MVC Application using the below tools and technologies and it is working fine without any issue. 我使用以下工具和技术开发了Spring MVC应用程序,并且运行正常,没有任何问题。

  1. Spring Framework (Core, MVC & JDBC) 4.2.5.RELEASE Spring Framework (Core,MVC和JDBC)4.2.5.RELEASE
  2. Java 1.8 Java 1.8
  3. Maven 3.3.9 Maven的3.3.9
  4. Eclipse IDE (Neon 2. Release 4.6.2) Eclipse IDE (Neon 2.版本4.6.2)
  5. Oracle JDBC - ojdbc6 Version: 11.2.0.3 Oracle JDBC -ojdbc6版本:11.2.0.3

Now, I want to use OpenJDK-8 instead of Oracle JDK-8. 现在,我想使用OpenJDK-8代替Oracle JDK-8。 How can we use OpenJDK in Spring MVC Project? 我们如何在Spring MVC Project中使用OpenJDK?

You just need to install OpenJDK on machines, where you want to build and run your projects, set JAVA_HOME to point to OpenJDK and that's it. 您只需要在要构建和运行项目的机器上安装OpenJDK,将JAVA_HOME为指向OpenJDK就可以了。 Same for IDEs (Eclipse). 与IDE(Eclipse)相同。

No need to change maven config since java version is not really depends on JDK vendor. 无需更改maven配置,因为Java版本实际上并不取决于JDK供应商。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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