[Beginner] Install java development tool in cloud9 development environment.


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.

What is this article


Install java development tools to learn java.

【Development environment】

Author: Fledgling (2nd month of programming learning. Originally Ruby, first java) MacBookpro cloud9

Preliminary research (until installation work)


Go through the installation method. The keyword is "java, cloud9". Then, some search results came out.

[AWS official website anyway]

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.

[Let's look at other articles]

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.

Start work

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

Hmm? Switching work ... Is it the end of installation? That's right (← I saw the article). Once installed, the "switch" task is waiting. Don't dust it too soon. That's what I often do.

[Confirmation of prerequisite development environment]

  1. There is an existing AWS cloud9 EC2 development environment. → YES

What is EC2? I'm using cloud9, but I don't understand. That is me. Abbreviation for "Amazon Elastic Compute Cloud" "Elastic": Elastic, elastic One of the systems available on AWS. You can build a virtual server. The specifications can be changed according to the user's needs. </ Derailment>

  1. There is an AWS Cloud9 IDE already open in the existing environment. → YES

[Check if java development tool is already installed]

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 !!".

[Check if the latest security updates and bug fixes are 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).   In my case, "Amazon linux" was good? ?? Check it just in case.

 $ 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 Open JDK, a java development tool]

Install OpenJDK 8.

sudo yum -y install java-1.8.0-openjdk-devel

[Switch or upgrade the default Java development toolset to OpenJDK 8]

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

[Check version]

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

[Beginner] Install java development tool in cloud9 development environment.
Install Java development environment on Mac
Build Java 8 development environment on AWS Cloud9
Java application development environment created in VM environment
Java development environment memo
java development environment construction
Points stuck in building VSCode & Java development environment
Java development environment construction on Mac-JDK Install (2020 preservation version)
Java development environment (Mac, Eclipse)
JavaFX environment construction in Java 13
First Java development in Eclipse
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.
[Eclipse Java] Development environment setting memo
Solve AtCoder Beginner Contest 150 in java
Java Spring environment in vs Code
Prepare Java development environment with Atom
Solve AtCoder Beginner Contest 153 in java
Play Framework 2.6 (Java) development environment creation
Install CentOS Stream 8 in Hyper-V environment
About the current development environment (Java 8)
Solve AtCoder Beginner Contest 175 in java
Install laravel/Dusk in docker environment (laravel6)
Build Java development environment (for Mac)
Solve AtCoder Beginner Contest 160 in java
Solve AtCoder Beginner Contest 152 in java
Java development environment (Mac, VS Code)
Solve AtCoder Beginner Contest 156 in java
Install Cloud9 on Raspberry pi 4 and set up Rails development environment
Let me do VS Code Remote Development + Java development in Proxy environment
Install Rails in the development environment and create a new application
Java container performance degradation in Menicoa environment
Prepare Java development environment with VS Code
WSL2 + Ubuntu 20.04 Install Vivado in LTS environment
[Processing x Java] Construction of development environment
java beginner 4
Building a Lambda development environment in Eclipse
Java development environment construction memo on Mac
java beginner 3
What is Java and Development Environment (MAC)
Build a Java development environment on Mac
Spring Boot + Docker Java development environment construction
Install ruby serial port in WSL environment
Install the IBM Cloud CLI in the container
[Personal memo] Java development environment is ready
[Mac] Install Java in Visual Studio Code
Install Docker and create Java runtime environment
[Note] Execute java program in the integrated development environment Eclipse-I tried using git
Deploy Java application developed in IntelliJ IDEA environment to Alibaba Cloud ECS instance
[CentOS8] Since the javac command could not be used, install the java development environment.
Just install Laravel8 on docker in PHP8 environment
Java Development Basics ~ Development Environment Settings and Project Creation ~
When there are environment variables in Java tests
[Java] Build Java development environment on Ubuntu & check execution
Build Java environment and output hello world [Beginner]
How to install Titan2D (v4.2.0) in virtual environment
Solution for NetBeans 8.2 not working in Java 9 environment
JAVA + STS (Spring Tool Suite) environment construction procedure
Try using GCP's Cloud Vision API in Java
Basics of threads and Callable in Java [Beginner]
Allow development in Eclipse environment using iPLAss SDK
Build a development environment for Docker, java, vscode