本文介绍了Heroku运行java版本“1.6.0_27”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将system.properties文件配置为:

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

因为当我通过终端运行命令时:

  $> heroku运行java -version 

显示:

  $ heroku运行java -version 
运行附加到终端的`java -version` ...运行.4610
拿起JAVA_TOOL_OPTIONS:-Djava.rmi。 server.useCodebaseOnly = true
java版本1.6.0_27
OpenJDK运行时环境(IcedTea6 1.12.4)(Ubuntu版本1.6.0_27-b27)
OpenJDK 64位服务器虚拟机20.0-b12,混合模式)

因为Heroku显示了在系统中配置的Java版本6 .properties文件。如何强制它使用java的第7版?

解决方案

经过许多工作,我可以理解为什么heroku会回到Java 1.6.0_27的版本6.



这是Jenkins构建我的应用程序的heroku插件,将buildpack重置为Java的第6版。



步骤到我的解决方案:


  1. 卸载用于Jenkins的heroku插件(目前处于测试阶段)

  2. 使用以下命令检查heroku的雪松: heroku --apps:info

  3. 安装支持Java版本7

  4. 设置没有插件的heroku的版本并使用
    部署在heroku中

我希望我可以帮助那些拥有s ame问题。

我还要感谢代码指针寻求帮助。你的帮助是必不可少的,所以我可以解决问题。非常感谢!


I configured my system.properties file with:

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. How to force it to use version 7 of java?

解决方案

After much work, I could understand why the heroku was going back to version 6 of the Java 1.6.0_27.

It was the heroku plugin for Jenkins to build my application reset the buildpack to version 6 of Java.

Steps to my solution:

  1. Uninstall heroku plugin for Jenkins (currently in beta)
  2. Check the cedar of heroku with the command: heroku --apps:info
  3. Install cedar-14 with support for version 7 of java
  4. Set the build of heroku without the plugin and use mavento deploy in 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!

这篇关于Heroku运行java版本“1.6.0_27”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 01:27