-
Notifications
You must be signed in to change notification settings - Fork 42
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
-
Eclipse IDE for RCP and RAP Developers 4.17 / 2020-09 or later
Note: you need to use 4.17 or later because it is the earliest version that supports Java 11 - Java JDK 11 or later
Note: Java JRE is not sufficient.
Note: Java < 11 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.
- 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
.
-
Important: Use the directory
- Install Maven Tycho connectors
- First, open
Window
->Preferences
->Maven
->Discovery
->Open Catalog
. - Search for
Tycho Configurator
and install it.
- First, open
- Prevent creation of
.gitignore
files (see first item here). - Set Ant properties:
- Open the dialog
Windowv ->
Preferences->
Ant->
Runtime`. - Go to the tab
Properties
and add the following property if it is not already there (:=):-
workspacedir
:=${workspace_loc}
-
- Open the dialog
- Import all Ultimate plugins
- Choose
File
->Import
->General
->Existing Projects into Workspace
. - In
Select root directory
, use the directory<ULTIMATE>/trunk/source
. InProjects
, a list of available projects should appear. - Keep everything selected.
- Click
Finish
. If plugins starting withWeb*
have been selected, Eclipse may propose to install "jsNature". You can ignore that.
- Choose
- Load new target platform
- Navigate to the project
BA_SiteRepository
- Open the
*.target
file that matches your operating system (i.e., for Windows openUltimate_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)
- Navigate to the project
- Clean and rebuild Ultimate
- Open
Project
->Clean...
. - Select
Clean all projects
,Start a build immediately
, andBuild the entire workspace
- Click
Clean
- Open
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.
- Open the project
BA_SiteRepository
. - Open the file
Debug-E4.product
. - In tab
Overview
, sectionTesting
:- Click
Synchronize
. - Click
Launch an Eclipse application
.
- Click
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 folderreleaseScripts/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.
- 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)
See Usage for working with the developer GUI.
See Eclipse-Settings for more settings recommendations of Eclipse.
See CodingConvention for our coding conventions.
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.
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 selectJava
->Installed JREs
- Select
Add...
- Select
Standard VM
- Select
Directory
and point it to the new JDK directory (for Windows 10, its usuallyC:\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
- Open Eclipse preferences
- Enable new target platform
- Navigate to the project
BA_SiteRepository
- Open the
*.target
file that matches your operating system (i.e., for Windows openUltimate_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)
- Navigate to the project
- Clean and rebuild Ultimate
- Open
Project
->Clean...
. - Select
Clean all projects
,Start a build immediately
, andBuild the entire workspace
- Click
Clean
- Open
- 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
(orJRE
for JUnit run configurations), changeExecution environment
to JavaSE-11 - In
Plug-ins
, click onAdd Required Plug-ins
- Repeat for all run configurations you want to keep
- Home
- Ultimate Development
- Ultimate Build System
- Documentation
- Project Topics