Jelastic Java Developer’s Center

Jelastic Cloud is justifiably known as a multilingual platform, as it supports the majority of popular programming languages: Java, PHP, Ruby, Python, Node.js and .NET. Hosting your application, written in any of these languages, becomes very easy and can be done just in a few clicks with Jelastic, as it doesn’t require any code changes and is optimised for automation. Moreover, due to the specifics of the implementation and virtualization technologies used, it offers numerous extra opportunities and configurations for your apps.

This guide will acquaint you with the distinctive features of Java hosting and provide a general overview of Java-related possibilities you receive while working with Jelastic. Use the index below to find the information you are interested in and jump to the corresponding section to get the details, including links to the related instructions and tutorials.

Java Hosting Environment

The first thing you need to do in order to host your Java application, is to create an appropriate environment, i.e. collection of containers intended to work together for serving this app (or part of it). This can be done through the Environment Topology wizard in your Jelastic dashboard: navigate to the Java language tab, pick the desired set of servers required for your app, and preconfigure them according to your needs.

All added servers represents fully isolated containers, located on different hosts for more availability, while isolation eliminates the risks of interfering with one another or by other users. You have an ability to attach the Public IP address to any of these servers for being accessed directly. Otherwise (i.e. if using default settings), the incoming requests sent to your application will be proxied by Shared Resolver.

To get additional information on setting up a suitable environment, see the Create Environment document. It provides details on what can be configured through the environment topology wizard and how it's done.

Java Application Servers

Providing a variety of software stacks, Jelastic supports the following Java application servers:

Use the Java App Server Configuration article to examine how these servers can be configured and find the list of editable config files for each of them.

Instructions on the main extra functionality and possibilities, available to be configured for the abovementioned nodes, are summarised below within this guide.

Java Versions

There are following Java versions available at Jelastic:
  • Java 6 (JDK 1.6.0)
  • Java 7 (JDK 1.7.0, OpenJDK 1.7.0)
  • Java 8 (JDK 1.8.0, OpenJDK 1.8.0, OpenJ9 0.8.0)
  • Java 9 (JDK 9)
  • Java 10 (JDK 10)

Note: Currently, JDK 10 supprort is provided for the Tomcat 8 / 9, TomEE, Maven and SpringBoot stacks only.

You can choose the preferred version while creating an environment, or change it later. These procedures are described in the Java Versions document.

Application Deployment

Once the appropriate environment is created, you can deploy your application into it.

Jelastic provides multiple deployment methods, using:
  • .war, .zip, .jar (for Spring Boot app server) or .ear archives
    • downloaded from a remote URL (http://, https:// or ftp://), or
    • uploaded via the Jelastic dashboard  
  • GIT/SVN remote repository
  • Plugins (Ant Task, Eclipse, IDEA, Maven, NetBeans)

If you’d like to use the archive-based deployment, simply follow the instructions in Upload and Deploy Your Java Application.

If you prefer deployment from GIT/SVN, then navigate to the document Deploy Your Projects via GIT/SVN with Maven. In addition, you can configure an automatic periodic re-deployment of your project from the repository, which is only performed if the repository contains new code changes.

There are also separate instructions for working with Bitbucket GIT repos and managing your projects via Gitblit and WebDAV.

Concerning the plugins, feel free to use any of the following:

Java Hosting Specifications

This section is devoted to the essential specifications of Java applications hosting at Jelastic Cloud.

  • Public IP: One of the most distinctive Jelastic features is an ability to attach the Public IP address to any instance in the environment. This increases stability of your production applications by eliminating a shared infrastructure component from your topology (the Shared Resolver) and routes all of incoming traffic directly to your server instead. Addition of an external IP can also provide remote access to a specific environment node (e.g. a database server) that is not otherwise Internet-accessible, or allow the use of other ports and protocols, which are not supported by the Shared Resolver. For more information on the benefits the Public IP gives you, read the corresponding article in our documentation. As an alternative to Public IP, you can use Endpoints that allow to establish a direct connection to the corresponding node over either raw TCP or UDP protocol.

  • Garbage Collection: Each newly created Java app server container has a unique agent, created by the Jelastic team, that optimises the Garbage Collection (GC) mechanism for cloud hosting in order to find the data objects stored in memory that are surplus to requirements and make their space available for reuse. This saves you money in conjunction with our Automatic Vertical Scaling feature (described below). The default GC agent configurations can be easily customized. More information can be found on the Java Garbage Collection page.

  • Automatic Vertical Scaling: Providing truly elastic hosting, Jelastic is equipped with one more innovative feature - automatic vertical scaling of your application. It is made possible by platform's ability to change the amount of resources (RAM and CPU), provided to any container, on the fly by tracking the incoming load in real time. This feature guarantees you never overpay for unused resources, and ensures very granular and fair pricing. See the full article - Automatic Vertical Scaling.

  • Multiple Middleware Stacks: Jelastic also allows you to change the number of any servers in your environment thanks to the multiple middleware stacks support. To ensure even more reliability and high-availability, all the newly added nodes are created on different hardware nodes. For additional information navigate to the Multi Nodes page.

  • Automatic Horizontal Scaling: The number of the application server nodes can also be scaled automatically by means of tunable triggers. The automatic addition/removal of app servers depends on the resource usage of your application. To find out how to implement this, get acquainted with the Automatic Horizontal Scaling document.

  • WebSockets: Using this technology can make your applications faster and more efficient due to establishing a continuous full duplex connection between client and server. Communication over this TCP-based protocol results in a rapid interaction and ensures streaming through proxies and firewalls, both upstream and downstream at once. Learn how to enable WebSockets support on Jelastic.

Extra Functionality

Jelastic offers significant flexibility and control of your application servers' configuration. This overview of Java computing nodes’ configuration lists the available configuration files and provides the basic information for what you may configure, and where to do so. Also, there is a separate document with information on pre-configured environment variables (including links to guides explaining how to add your own custom environment variables).

And some of the most important features and solutions provided for Java applications hosting on Jelastic Cloud are summarised below.

Domains Management

  • For production purposes, you can bind an external domain name to your application’s URL, i.e. use your own custom domains instead of the default environment domain name. This can be done in two ways: using either CNAME or A Record.
  • With the help of the swapping domains feature, you can upgrade and modify your application with zero downtime so your users won’t notice any interruption. Detailed instructions on this procedure are provided here.
  • Using multiple domains with a single environment increases its usability, efficiency and scalability, whilst simultaneously saving your costs by avoiding a need to set up  separate environments for different apps.


  • SSL / TLS (Secure Sockets Layer / Transport Layer Security) is the industry standard security technology for establishing an encrypted connection between a web server and a browser. This technology ensures that all data passed between them remains private and confidential, i.e. it can’t be intercepted by a third party.
  • You may also place an NGINX-balancer node in front of your application, with the appropriate security configurations set, to restrict application access by source IP address, or limit access by username/password through implementing the basic HTTP authentication. We provide examples of such settings in the Security of App with NGINX Balancer article.
  • One of the most common ways to increase security of your application is using the encryption-decryption services. The Secure Java Encryption and Decryption document contains detailed instructions on this topic and includes an example of a cryptographic Java application.


  • The embedded application server clustering feature provides replication of sessions between pairs of nodes and eliminates the necessity of additional software or Memcached usage for increasing app’s availability. See the corresponding tutorials:

Job Scheduling

  • Jelastic provides the ability to run certain operations at the specified time with the help of job scheduling services, which can be integrated to any Java application. Here are the instructions on how it can be done via Cron and Quartz.

Useful Tools

  • You can use the Java Agent interceptor to deploy your agent-based applications to the Cloud. The workflow is fairly easy - just follow the instruction.
  • The best way to debug your application, running at the Jelastic Platform, is to connect it with code in your IDE. This feature requires Public IP to be enabled on your application server, and minor changes made to the app server’s configuration. Details can be found in our Remote Debugging article.

Java Tutorials

Our documentation also contains numerous tutorials on different Java applications’ deployment. The full list of instructions is available at the Java Tutorials page.

In addition, you can gain the extra availability, redundancy and scalability strengths for your application by means of configuring a clustering solution. A cluster ensures that no server is a single point of failure for an application, and Jelastic's unique Cloud infrastructure ensures that one server’s failure won’t overload the rest of them in the cluster.

Here are a few examples of clustering solutions configuration steps for some popular Java apps: