Sasi Kathimanda
Sasi Kathimanda

Reputation: 1806

Docker containers- running new java8 code on old java6 version

I have a new java8 web application(spring boot) that needs to run on a one of the old environment application boxes which has java 6.

java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)

Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

i am amateur in docker's usage, but heard that you run the app inside the Docker container and give the config you want.In this case i want to run java8 on already installed java6.

please suggest is it possible? if so provide some references to start.

Upvotes: 0

Views: 113

Answers (2)

michael_bitard
michael_bitard

Reputation: 4212

The java6 installed on your old environment doesn't matter.

If you can install docker on that environment, then you can create a docker image which contains java8, put your application in it and launch it on the server.

You can try it by launching

docker run -ti --rm livingobjects/jre8:8u71 java -version

on your "old" server, it will give you an output like this:

java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)

Upvotes: 2

Xiongbing Jin
Xiongbing Jin

Reputation: 12087

There is a detailed guide available at https://spring.io/guides/gs/spring-boot-docker/

Upvotes: 1

Related Questions