Java 8 application on EC2

后端 未结 4 1649
孤街浪徒
孤街浪徒 2020-12-02 17:26

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

相关标签:
4条回答
  • 2020-12-02 17:59

    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.

    0 讨论(0)
  • 2020-12-02 18:02
    1. Donwload Linux version of JRE from below link to your windows machine as it has browser. Note that if you are using this EC2 instance as server you just need JRE and not complete JDK. https://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html
    2. Tranfer downloaded .tar.gz file using winscp to your EC2 instance.
    3. Run "tar zxvf jre-8uversion-linux-i586.tar.gz" on your EC2 instance. For more info https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jre.html#CFHBHAGI
    0 讨论(0)
  • 2020-12-02 18:05

    Installing JDK 8:

    Step 1: Check the Java Version

         java -version
    

    Step 2: Download RPM package of Oracle JDK (8u121)

         wget --no-check-certificate --no-cookies --header "Cookie:oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.rpm
    

    Step 4: Install JDK 8

         sudo yum install -y jdk-8u141-linux-x64.rpm
    

    Step 5: Verify oracle JDK version

         java -version
    

    Installing JRE 1.8

       sudo yum install java-1.8.0
    

    change the Java version

      sudo alternatives --config java
    
    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题