0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tomcatのシェルスクリプトをjava8で実行させる

Posted at

tomcatを起動してknowledge.warをデプロイするときにエラーになってしまう。

tomcatのcatalina.yyyy-mm-dd.logを見ると


19-Jan-2017 15:41:20.568 情報 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64/jre


jdk1.7が使用されているようでした。
もともとインストールされていたjava7が邪魔して認識されないようです。
そこで

/opt/apache-tomcat*/bin/startup.shとcatalina.shの先頭に以下を追加。

JAVA_HOME=/usr/java/jdk1.8.0_73
PATH=$JAVA_HOME/bin:$PATH

19-Jan-2017 17:03:30.561 情報 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/jdk1.8.0_73/jre


上手くjava8が認識されるようになりました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?