Java 8 application on EC2

匿名 (未验证) 提交于 2019-12-03 02:49:01

问题:

I was wondering if anyone knows if it will be possible for me to install Java 8 on an EC2 instance. My application is packed as a fat jar with embedded jetty, so the Java 8 runtime alone should be sufficient.

I'm not too familiar with Linux, and I saw that they only had Java 7 support on the default AMI. Is there a simple command I can run to update to Java 8?

回答1:

Java 8 may not be available out-of-the-box on the AMI that you are looking for. However, you can always install it once the instance is created.

e.g. Check this post which explains how to install java 8 on Ubuntu OR check this post which explains how to install Java 8 on RHEL/Fedora/CentOS.



回答2:

check Java current version

java -version 

install Java 1.8

sudo yum install java-1.8.0 

change the Java version

sudo alternatives --config java 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!