My customer accountContact commercialWebmailOVHcloud Blog

Welcome to OVHcloud.

Log in to order, manage your products and services, and track your orders

Log in

Java

Last updated 3rd June 2021

Objective

Java is a general-purpose programming language, and one of the most popular in the world today. Web PaaS supports Java runtimes that can be used with build management tools such as Gradle, Maven, and Ant.

Supported versions

OpenJDK versions:

Grid
11
12
8
13
14

To specify a Java container, use the type property in your .platform.app.yaml.

type: 'java:14'

Support libraries

While it is possible to read the environment directly from your application, it is generally easier and more robust to use the platformsh/config-reader which handles decoding of service credential information for you.

Support build automation

Web PaaS supports the most common project management tools in the Java ecosystem, including:

Other JVM languages

It’s worth remembering that the JVM by its specification does not read Java code, but bytecode. So within the JVM, it’s possible to run several languages. Web PaaS supports several of them, such as Kotlin, Groovy, and Scala, so long as that language works with any build automation that Web PaaS supports.

Article Link
Kotlin and Spring Source
Scala and Spring Source
Groovy and Spring Source

Project templates

A number of project templates for major Java applications are available on GitHub. Not all of them are proactively maintained but all can be used as a starting point or reference for building your own website or web application.

Quarkus

image

QuarkusIO, the Supersonic Subatomic Java, promises to deliver small artifacts, extremely fast boot time, and lower time-to-first-request.

A sample Hello World application is provided as a starting point. It includes a plain REST application. To use Quarkus with services see the example project (https://github.com/platformsh-examples/quarkus).

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Payara Micro

image

This project provides a starter kit for Payara Micro projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

Payara Micro is an Open Source, lightweight Java EE (Jakarta EE) microservices deployments.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Spring MVC, Maven, MongoDB

image

This template demonstrates building a Spring MVC application. It uses Maven to build the application and deploy it to Web PaaS.

A sample Hello World application is provided as a starting point. It includes a MongoDB database, and the sample application shows how to make the database connection. The example code also demonstrates how to access the Web PaaS environment variables using the Web PaaS Config Reader library.

Features

  • Java 11
  • MongoDB 3.6
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Spring Boot, Gradle, Mysql

image

This template demonstrates building a Spring Boot application. It uses Gradle to build the application and deploy it to Web PaaS.

A sample Hello World application is provided as a starting point. It includes an Oracle MySQL database, and the sample application shows how to make the database connection. The example code also demonstrates how to access the Web PaaS environment variables using the Web PaaS Config Reader library.

Features

  • Java 11
  • Oracle MySQL 8.0
  • Automatic TLS certificates
  • Gradle-based build

View the repository on GitHub.

Micronaut

image

This project provides a starter kit for Micronaut projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

Micronaut is a modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Jetty

image

This template provides an Eclipse Jetty Web server and javax.servlet container, plus support for HTTP/2, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. Jetty itself is downloaded on the fly in the build hook based on the provided `pom.xml` file.

Eclipse Jetty is used in a wide variety of projects and products, both in development and production. Jetty can be easily embedded in devices, tools, frameworks, application servers, and clusters.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Apache Tomcat

image

This project provides a starter kit for Apache Tomcat hosted on Web PaaS. Tomcat itself is downloaded on the fly in the build hook based on the provided `pom.xml` file.

Apache Tomcat is an open-source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and WebSocket technologies.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Spring, Kotlin, Maven

image

This template demonstrates building a Spring MVC application in the Kotlin language. It uses Maven to build the application and deploy it to Web PaaS.

>A sample Hello World application is provided as a starting point. It includes an Oracle MySQL database, and the sample application shows how to make the database connection. The example code also demonstrates how to access the Web PaaS environment variables.

Features

  • Java 11
  • MySQL 8.0
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Wildfly

image

This project provides a starter kit for Wildfly Eclipse MicroProfile projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Spring Boot, Maven, Mysql

image

This template demonstrates building a Spring Boot application. It uses Maven to build the application and deploy it to Web PaaS.

A sample Hello World application is provided as a starting point. It includes an Oracle MySQL database, and the sample application shows how to make the database connection. The example code also demonstrates how to access the Web PaaS environment variables using the Web PaaS Config Reader library.

Features

  • Java 11
  • Oracle MySQL 8.0
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Jenkins

image

This project provides a starter kit for Jenkins projects hosted on Web PaaS. The Jenkins `.war` file is downloaded during the build hook and not included in the repository.

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery.

Features

  • Java 11
  • Automatic TLS certificates
  • Jenkins downloaded on the fly during build

View the repository on GitHub.

Thorntail

image

This project provides a starter kit for Thorntail Eclipse MicroProfile projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

Thorntail offers an innovative approach to packaging and running Java EE applications by packaging them with just enough of the server runtime to "java -jar" your application. It's MicroProfile compatible, too.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Helidon

image

This project provides a starter kit for Helidon Eclipse MicroProfile projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

Helidon is a collection of Java libraries for writing microservices that run on a fast web core powered by Netty.

Helidon is designed to be simple to use, with tooling and examples to get you going quickly. Since Helidon is just a collection of libraries running on a fast Netty core, there is no extra overhead or bloat.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

xwiki

image

This project provides a starter kit for XWiki projects hosted on Web PaaS. It includes and automatically configures a PostgreSQL database for storage. XWiki itself is downloaded during the build step. It is run using Jetty.

XWiki is a free wiki software platform written in Java with a design emphasis on extensibility. XWiki is an enterprise wiki. It includes WYSIWYG editing, OpenDocument based document import/export, semantic annotations and tagging, and advanced permissions management.

Features

  • Java 11
  • PostgreSQL 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Open Liberty

image

This project provides a starter kit for Open Liberty Eclipse MicroProfile projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

Apache TomEE

image

This project provides a starter kit for Apache TomEE Eclipse MicroProfile projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

Apache TomEE is the Eclipse MicroProfile implementation that uses several Apache Project flavors such as Apache Tomcat, Apache OpenWebBeans and so on.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.

KumuluzEE

image

This project provides a starter kit for KumuluzEE Eclipse MicroProfile projects hosted on Web PaaS. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Web PaaS Config Reader to simplify accessing Web PaaS environment variables.

KumuluzEE is a lightweight framework for developing microservices using standard Java, Java EE / Jakarta EE technologies and migrating existing Java applications to microservices. KumuluzEE packages microservices as standalone JARs. KumuluzEE microservices are lightweight and optimized for size and start-up time.

Features

  • Java 11
  • Automatic TLS certificates
  • Maven-based build

View the repository on GitHub.


Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.


These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices exclude VAT. VAT may vary according to the customer's country of residence.