subutai-io / peer-os

Subutai is a next generation peer to peer (P2P) cloud computing and Internet of Things platform. Subutai peers collaborate and share resources to create secure virtual environments tying together the shared network and machine resources across peers.
https://subutai.io
Apache License 2.0
63 stars 34 forks source link

Java installation description in Readme.md #2153

Open lbthomsen opened 6 years ago

lbthomsen commented 6 years ago

The approach is slightly messy. Cleaner on Debian/Ubunto would be to use the tools for handling java packages. Assuming jdk-8u152-linux-x64.tar.gz has been downloaded from Oracle, the following steps should work on both Debian and Ubuntu:

sudo apt-get install java-common java-package

Then use make-jpkg to build a Debian file from the downloaded package:

make-jpkg Downloads/jdk-8u152-linux-x64.tar.gz

This will result in a oracle-java8-jdk_8u152_amd64.deb which can simply be installed:

sudo dpkg --install oracle-java8-jdk_8u152_amd64.deb

The java-common provides update-java-alternatives which can be used to switch jvm at any time.

akarasulu commented 6 years ago

Vagrant or Docker image to the rescue?

lbthomsen commented 6 years ago

No, no - this was merely a comment on the readme. The way it is described in the readme will work, but it will confuse matters if a previous debian/ubuntu java is installed already (as in some links will point to different jvms). The approach described above will ensure that it doesn't conflict with Debian's way of doing things.