2. Installation and Setup

Minimum software requirements are as follows:

Java SE Development Kit (JDK) 8

Install JDK 8 and check it by running the following command in the console:

java -version

The command should return the Java version, e.g. 1.8.0_152.

Warning

Java 9 is not supported yet. You can build and run CUBA applications only on Java 8.

In order to build and run projects outside Studio, you need to set the path to the JDK root directory in the JAVA_HOME environment variable, e.g. C:\Program Files\Java\jdk1.8.0_152.

  • On Windows, you can do this at ComputerPropertiesAdvanced System SettingsAdvancedEnvironment variables. The value of the variable should be added to the System variables list.

  • On macOS, it is recommended to set JAVA_HOME in ~/.bash_profile:

    export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

    If you install Java 9 on macOS, CUBA Studio and applications won’t start, regardless of the JAVA_HOME value. In this case, see the troubleshooting section below.

Java IDE

IntelliJ IDEA or Eclipse. We recommend using IntelliJ IDEA (Community or Ultimate).

Database

In the most basic scenario, the built-in HyperSQL (http://hsqldb.org) can be used as the database server. This is sufficient for exploring the platform capabilities and application prototyping. For building production applications, it is recommended to install and use one of the full-featured DBMS supported by the platform, like PostgreSQL for instance.

Web browser

The web interface of the platform-based applications supports all popular browsers, including Google Chrome, Mozilla Firefox, Safari, Opera 15+, Internet Explorer 9+, Microsoft Edge.

Troubleshooting
  1. If you install Java 9 on macOS for some reason, CUBA Studio and applications won’t start. To recover from this situation, do the following:

    1. Make you JDK 9 installation not used by default throughout the system: rename /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Info.plist file into Info.plist.disabled (replace jdk-9.0.1.jdk with the actual version of your JDK 9).

    2. Replace JavaAppletPlugin.plugin installed by Java 9 to the one from Java 8:

      • Remove or rename /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

      • Install JDK 8 again, it will re-create the plugin.

    3. Make sure you have specified JAVA_HOME with -v 1.8 argument as shown above. Re-login or source .bash_profile after making changes.

  2. Make sure your environment does not contain CATALINA_HOME, CATALINA_BASE and CLASSPATH variables. They may cause problems starting Apache Tomcat web server which is used at development time. Reboot your computer after removing the variables.