Configuring Java

Discover our Public Cloud offer

Shared Hosting for Everyone, imagined by developers, for developers.

Discovering the Public Cloud

Supported Versions

Major versionsCommand
7java or /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

The default version is Java 1.7. This is the version that is especially used when you start java.

Major versions

The default version is Java 14. This is the version that is especially used when you start java.

Binary to use

To use a Java version that is different from the default one:

  • v2017: use /usr/lib/jvm/java-[VERSION]-openjdk-amd64/jre/bin/java (replacing [VERSION] with the desired Java version),
  • v2020:
    • go on Environment > Java,
    • or use JAVA_VERSION=[VERSION] java (replacing [VERSION] with the desired Java version).


Your Java environment starts off empty, with no ready installed libraries.

HTTP deployment

To deploy an HTTP application with Java, create a User program type site in the Web > Sites section.

User Program Site Type
User Program Site Type

You need to specify the command that will start your Java application, for example:

$ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xmx512m -jar jenkins.war --httpListenAddress= --httpPort=$PORT
$ java -Xmx512m -jar jenkins.war --httpListenAddress= --httpPort=$PORT

Your application must absolutely listen to IP and the port shown in the site configuration in the Command field or use the IP and PORT environment variables.