LoginSignup
1
0

More than 5 years have passed since last update.

Amazon Linux に jenv を入れる

Posted at
yum install java-1.7.0-openjdk.x86_64
yum install java-1.8.0-openjdk.x86_64

git clone https://github.com/gcuisinier/jenv.git ~/.jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(jenv init -)"' >> ~/.bash_profile
jenv add /usr/lib/jvm/jre-1.7.0-openjdk.x86_64
jenv add /usr/lib/jvm/jre-1.8.0-openjdk.x86_64
jenv versions
* system (set by /home/ec2-user/.jenv/version)
  1.7
  1.7.0.121
  1.8
  1.8.0.121
  openjdk64-1.7.0.121
  openjdk64-1.8.0.121
jenv global 1.7
jenv versions
  system
* 1.7 (set by /home/ec2-user/.jenv/version)
  1.7.0.121
  1.8
  1.8.0.121
  openjdk64-1.7.0.121
  openjdk64-1.8.0.121
java -version
java version "1.7.0_121"
OpenJDK Runtime Environment (amzn-2.6.8.1.69.amzn1-x86_64 u121-b00)
OpenJDK 64-Bit Server VM (build 24.121-b00, mixed mode)
1
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
1
0