Skip to content

Installation

Frank Schüssele edited this page Sep 29, 2023 · 77 revisions

Download and Installation

This page explains how you setup a development environment for Ultimate. If you only want to produce a binary and use some of the tools, please have a look at Build and Usage.

Migration from Java 8 to Java 11

Prerequisites

  • Eclipse IDE for RCP and RAP Developers (recommended version 2022-12, there are some issues with newer versions)
    Note: you need to use 4.17 or later because it is the earliest version that supports Java 11
  • Java JDK 11, 12, 13, 14
    Note: Java JRE is not sufficient.
    Note: Java < 11 and Java > 14 will not work.
  • Optional: Maven >=3.6
    Only needed if you want to build Ultimate from the command line.
  • A cloned repository of Ultimate
    Note: Parts of the repository use very long paths. Check our troubleshooting section git clone fails because paths are too long beforehand.

Create Eclipse workspace for Ultimate

  • Eclipse asks you to choose a workspace at startup.
    • Important: Use the directory <ULTIMATE>/trunk/source.
    • If the "Workspace Launcher" dialog is not shown, it can be found by selecting File -> Switch Workspace.
  • Install Maven Tycho connectors
    • First, open Window -> Preferences -> Maven -> Discovery -> Open Catalog.
    • Search for Tycho Configurator and install it.
  • Prevent creation of .gitignore files (see first item here).
  • Set Ant properties:
    • Open the dialog Window -> Preferences -> Ant -> Runtime.
    • Go to the tab Properties and add the following property if it is not already there (:=):
      • workspacedir:=${workspace_loc}
  • Select the correct Java Version
    • Expand Window -> Preferences -> Java
    • In the section Installed JREs: Add the path of your own Java (JDK) Installation (and not the one included in Eclipse) and select it.
    • In the section Compiler: Set the Compiler compliance level to 11
  • Import all Ultimate plugins
    • Choose File -> Import -> General -> Existing Projects into Workspace.
    • In Select root directory, use the directory <ULTIMATE>/trunk/source. In Projects, a list of available projects should appear.
    • Keep everything selected.
    • Click Finish. If plugins starting with Web* have been selected, Eclipse may propose to install "jsNature". You can ignore that.
  • Load new target platform
    • Navigate to the project BA_SiteRepository
    • Open the *.target file that matches your operating system (i.e., for Windows open Ultimate_E4.17_Java11_Win32.target)
    • Select Set as Active Target Platform (its a link in the upper right corner)
    • Wait until the target platform is loaded (this might take some time)
  • Clean and rebuild Ultimate
    • Open Project -> Clean....
    • Select Clean all projects, Start a build immediately, and Build the entire workspace
    • Click Clean

Now the "Package Explorer" view should be filled with the new projects and you should have no errors in the Problems view. Projects starting with Web* might report errors. They need additional dependencies not explained here. You can close these projects because they are not relevant for most users.

If you cannot build Ultimate because some of the projects have errors (errors in projects starting with Web* are not problematic), check the Troubleshooting section.

Create run configuration

  • Open the project BA_SiteRepository.
  • Open the file Debug-E4.product.
  • In tab Overview, section Testing:
    • Click Synchronize.
    • Click Launch an Eclipse application.

As a result, Ultimate with Debug View should start and you should have an entry in your Run Configurations and Run History (accessible via the Run menu) that you can use to run Ultimate from here on.

Close Ultimate and edit the Run Configuration you just created to extend the PATH variable with a path to the SMT solvers we supply.

  • Open the tab Environment.
  • Press button Add...
  • Add a new variable name PATH and enter as value the absolute path on your filesystem to the folder releaseScripts/default/adds.
  • Save your changes.

Different configurations (e.g., command line or CDT plugin) can be run in the same way, just select another .product file.

Custom VM arguments (e.g., more memory)

  • Open the "Run"->"Run Configurations..." dialog.
  • Open the tab "Arguments".
  • Write in field "VM Arguments": -Xmx4096M -Xms1024M.
    • The first argument sets the maximum heap size to 4096M (megabyte) and the second one the initial heap size to 1024M.
    • Never forget the M, otherwise Java uses bytes.
  • -agentlib:hprof=depth=7,cpu=samples can be used for profiling.
  • for more options see http://stas-blogspot.blogspot.de/2011/07/most-complete-list-of-xx-options-for.html or
    • use java -XX:+PrintFlagsFinal to print available -XX options.
    • More diagnostic and experimental options can be added to list with following options:
      • -XX:+UnlockDiagnosticVMOptions
      • -XX:+UnlockExperimentalVMOptions (for Sun)

Next steps

See Usage for working with the developer GUI.
See Eclipse-Settings for more settings recommendations of Eclipse.
See CodingConvention for our coding conventions.

Migration from Java 8 to Java 11

Overview

The next Eclipse version (currently 4.17) already requires Java 11 and most default Java installations are already Java 11. Our dev branch is with and Ultimate version 0.2.0 only usable if you use Java 11 or later.

We did not only migrate Ultimate to Java 11, but we also changed how building and running from Eclipse works. We now use a shared target configuration which is updated from repositories proxied through monteverdi. This leads to a number of improvements:

  • New users do not need to add specific plugins to their Eclipse installation. Having the "Eclipse IDE for RCP and RAP Developers" package is enough.
  • Starting and configuring Run configurations is faster because the target platform is smaller.
  • New run configurations start with a sane(r) default.
  • We can now add Java libraries via manifests (i.e., MANIFEST.MF) as long as they are already wrapped into an OSGi wrapper. We currently only support the libraries provided by the Orbit project (https://www.eclipse.org/orbit/), but other repositories might follow.

Process

Note I used Eclipse 4.16 while testing these steps. If your Eclipse version is older, different things might happen.

  • Install a Java JDK 11 or later (we tested with 11 and 14)
  • Ensure that your JAVA_HOME environment variable points to the new Java 11 installation
  • Update the dev branch of your Ultimate repository to the newest version
  • Delete obsolete Libary plugins: rm -r trunk/source/Library-Batik/ trunk/source/Library-Log4j2/ trunk/source/Library-jdom/ trunk/source/Library-log4j/ trunk/source/Library-xerces/
  • Change your default Java in Eclipse
    • Open Eclipse preferences Window -> Preferences and select Java -> Installed JREs
    • Select Add...
    • Select Standard VM
    • Select Directory and point it to the new JDK directory (for Windows 10, its usually C:\Program Files\Java\jdk-11.0.8)
    • Click Finish
    • Mark the new JDK entry as default by clicking the checkbox besides it.
    • Click Apply and Close
  • Enable new target platform
    • Navigate to the project BA_SiteRepository
    • Open the *.target file that matches your operating system (i.e., for Windows open Ultimate_E4.17_Java11_Win32.target)
    • Select Set as Active Target Platform (its a link in the upper right corner)
    • Wait until the target platform is loaded (this might take some time)
  • Clean and rebuild Ultimate
    • Open Project -> Clean....
    • Select Clean all projects, Start a build immediately, and Build the entire workspace
    • Click Clean
  • Adapt your run configurations
    • Note In particular for JUnit and JUnit Plu-in Test run configurations, it might be easier to delete them and recreate them as needed.
    • Select a run configuration, e.g., Debug-E4.product
    • In Main (or JRE for JUnit run configurations), change Execution environment to JavaSE-11
    • In Plug-ins, click on Add Required Plug-ins
    • Repeat for all run configurations you want to keep
Clone this wiki locally