简体   繁体   English

Heroku运行Java版本“ 1.6.0_27”吗?

[英]Heroku run java version “1.6.0_27”?

I configured my system.properties file with: 我将system.properties文件配置为:

java.runtime.version=1.7
maven.version=3.0.5

Because when I run the command by terminal: 因为当我通过终端运行命令时:

$> heroku run java -version

displays: 显示:

$ heroku run java -version 
Running `java -version` attached to terminal... up, run.4610
Picked up JAVA_TOOL_OPTIONS:  -Djava.rmi.server.useCodebaseOnly=true
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.4) (Ubuntu build 1.6.0_27-b27)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

Because Heroku is displaying version 6 of Java that being conifgured in the system.properties file. 因为Heroku正在显示在system.properties文件中配置的Java版本6。 How to force it to use version 7 of java? 如何强制它使用Java版本7?

After much work, I could understand why the heroku was going back to version 6 of the Java 1.6.0_27. 经过大量工作,我可以理解为什么heroku回到Java 1.6.0_27的版本6。

It was the heroku plugin for Jenkins to build my application reset the buildpack to version 6 of Java. 这是Jenkins构建我的应用程序的heroku插件,将buildpack重置为Java版本6。

Steps to my solution: 解决方案的步骤:

  1. Uninstall heroku plugin for Jenkins (currently in beta) 卸载针对Jenkins的heroku插件(当前处于Beta版)
  2. Check the cedar of heroku with the command: heroku --apps:info 使用以下命令检查heroku的雪松: heroku --apps:info
  3. Install cedar-14 with support for version 7 of java 安装cedar-14并支持Java版本7
  4. Set the build of heroku without the plugin and use maven to deploy in heroku 设置没有插件的heroku构建,并使用maven部署在heroku中

I hope I can help people who are having the same problem. 我希望我能帮助遇到同样问题的人。

And I would like to thank also the codefinger for help. 我还要感谢代码手指的帮助。 Your help was essential so I could solve the problem. 您的帮助至关重要,因此我可以解决问题。 Thank you very much! 非常感谢你!

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

相关问题 Java 1.6.0_27更新后,Heroku应用程序在60秒内无法启动 - After Java 1.6.0_27 update Heroku application does not boot in 60 seconds 用java 1.6.0_45编译的jar会在java 1.6.0环境下运行吗? - Will a jar compiled with java 1.6.0_45 run in java 1.6.0 environment? 使用当前的Java运行时(7u45)进行编译并在运行时版本1.6.0上运行 - Compile with current Java Runtime (7u45) and run on Runtime Version 1.6.0 错误 - Java 运行时环境 6 版本 1.6.0 - Error - Java Runtime Environment 6 version 1.6.0 APNS NetworkIOException SSLHand使用java版本1.6.0_37在Centos中失败 - APNS NetworkIOException SSLHandshake Failure in Centos with java version 1.6.0_37 jre1.6.0_27 HashMap values()源代码 - jre1.6.0_27 HashMap values() sourcecode 安装Java JDK 7之后对于Mac OS X - mvn -version仍然显示java版本1.6.0_31 - After Installing Java JDK 7 For Mac OS X - mvn -version still shows java version 1.6.0_31 JRE版本是1.6.0; 运行Google Plugin for Eclipse需要1.7.0或更高版本 - JRE version is 1.6.0; version 1.7.0 or later is needed to run Google Plugin for Eclipse 运行本地Java Heroku - Run local Java Heroku 如何在Sun Solaris 11上将Java的版本从1.6.0降级到Java 1.5.0 - How can i downgrade the version of java from 1.6.0 to java 1.5.0 on Sun Solaris 11
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM