Setting Up a Development Environment

Liferay’s development tools help you get started fast. All you need as a prerequisite is a Java Development Kit version 8 (JDK or OpenJDK is fine). Once that’s installed, there are only three steps.

  • Download a Liferay Dev Studio DXP bundle.

  • Unzip the downloaded package to a location on your system.

  • Start Dev Studio DXP.

You’ll follow these steps and then generate a Liferay Workspace for developing your first Liferay DXP application.

Installing a Liferay Dev Studio DXP Bundle

Follow these steps:

  1. Download and install Liferay Dev Studio DXP Installing it is easy: run the installer.

  2. To run Liferay Dev Studio DXP, run the DeveloperStudio executable. On Windows, the installer doesn’t create a menu entry, so you should add a shortcut to it to your desktop or task bar.

The first time you start Liferay Dev Studio DXP, it prompts you to select an Eclipse workspace. If you specify an empty folder, Liferay Dev Studio DXP creates a new workspace in that folder. Follow these steps to create a new workspace:

  1. When prompted, indicate your workspace’s path. Name your new workspace guestbook-workspace and click OK. Windows has path length limitations, so on that OS, you may want to create your workspace the root folder (C:\).

  2. When Liferay Dev Studio DXP first launches, it presents a welcome page. Click the Workbench icon to continue.

Nice job! Your development environment is installed and your Eclipse workspace is set up.

Creating a Liferay Workspace

Now you’ll create another kind of workspace: a Liferay Workspace. Liferay Workspace helps manage Liferay projects by providing various build scripts, properties, and configuration for you. Liferay Workspace uses Blade CLI and Gradle to manage dependencies and organize your build environment. Note that to avoid configuration issues, you can only create one Liferay Workspace for each Eclipse Workspace.

Follow these steps to create a Liferay Workspace in Liferay Dev Studio DXP:

  1. Select FileNewLiferay Workspace Project. Note: you may have to select FileNewOther, then choose Liferay Workspace Project in the Liferay category.

    Figure 1: By selecting Liferay Workspace, you begin the process of creating a new workspace for your Liferay DXP projects.

    Figure 1: By selecting *Liferay Workspace*, you begin the process of creating a new workspace for your Liferay DXP projects.

    A New Liferay Workspace dialog appears, which presents several configuration options.

  2. Give your workspace the name com-liferay-docs-guestbook.

  3. Next, choose your workspace’s location. Leave the default setting checked. This places your Liferay Workspace inside your Eclipse workspace.

  4. For Liferay Version, 7.2 should already be selected.

  5. Leave the rest of the defaults.

  6. Check the Download Liferay bundle checkbox to download and unzip a Liferay DXP instance in your workspace automatically. When prompted, name the server liferay-tomcat-bundle.

  7. Click Finish to create your Liferay Workspace. This may take a while because Liferay Dev Studio DXP downloads the Liferay DXP bundle in the background.

Congratulations! Your development environment is ready! Next, you’ll get started developing your first Liferay DXP application.

« Introduction to Developing a Web ApplicationGenerating the Back-end »
Was this article helpful?
2 out of 2 found this helpful