Click here for the introduction of AWS cloud 9 https://qiita.com/tu-kun/items/d7b4f1fa19cc93bc5b75
Click here for articles that were used as a reference when installing the java development tool. https://qiita.com/tu-kun/items/91efb172f7dd7501602e
It was easy to understand and was very helpful. Thank you very much.
Install java development tools to learn java.
Author: Fledgling (2nd month of programming learning. Originally Ruby, first java) MacBookpro cloud9
Go through the installation method. The keyword is "java, cloud9". Then, some search results came out.
The one that came out at the top was the AWS official website, so click it. I took a quick look at the contents and basically followed this flow to install. ... but before that.
For the time being, check the installation method article on other than the AWS official website. Of course, I'm not suspicious of the AWS official website.
In my case, in my experience, if I take the lead with just one article, I haven't tried it with very good results. I learned a lot.
From here, install according to the instructions on the AWS official website. If something unexpected happens along the way, I will google again.
・ Confirmation of prerequisite development environment -Check if the java development tool is already installed -Check if the latest security updates and bug fixes are installed -Install Open JDK, a java development tool · Switch or upgrade the default Java development toolset to OpenJDK 8 ・ Version confirmation
First, open a cloud9 terminal and execute the following command.
$ java -version
If the output contains values starting with Java (TM), Java Runtime Environment, Java SE, J2SE, or Java2 -OpenJDK is not installed · Not set as the default Java development toolset In that case, installation is required.
So, if you look at the result after execution ...
java confirmation
$ java -version
java version "1.7.0_181"
OpenJDK Runtime Environment (...)
OpenJDK 64-Bit Server VM (...)
javac confirmation
$ javac -version
javac 1.7.0_181
With this, I was able to confirm that "It is not installed !!".
Make sure you have the latest security updates and bug fixes installed.
Use the update command to run the yum tool (for Amazon Linux) or the apt tool (for Ubuntu Server).
$ cat /proc/version
Linux version 4.14.186-110.268.amzn1.x86_64 (...)
Alright, linux properly. </ Derailment>
Run the yum tool.
sudo yum -y update
Install OpenJDK 8.
sudo yum -y install java-1.8.0-openjdk-devel
Run the update-alternatives command with the --config option.
First, from java.
sudo update-alternatives --config java
When you execute this, near the bottom,
* 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
+ 2 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
Enter to keep the current selection[+], or type selection number:
Is output. This time, I want to put "1.8 ...", so enter "2" after "number:".
Enter to keep the current selection[+], or type selection number:2
Run and complete.
Do javac as well
java -version
javac -version
You have successfully installed the java development tool. There is a continuation in the manual on the AWS official website, but the installation work itself is here.
Recommended Posts