Eclipse
Eclipse is a free open source project that's used to run many of the major tools in this cookbook: https://www.eclipse.org/downloads/
Launching Notes
- To print console logging, edit the
ini
file and add the following to lines above any-vm
and-vmargs
lines. For example:-startup plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1200.v20200508-1552 -debug -consoleLog -vmargs -Xmx8G
- To print console logging from a terminal without launching a
separate terminal, launch the program using
eclipsec
rather thaneclipse
or the prudct's executable. For example:./eclipsec -debug -consoleLog
- To specify a particular
ini
file rather than the one in the product's directory, use a terminal to launch with the--launcher.ini
argument. For example:./eclipsec --launcher.ini /tmp/eclipse.ini
- To modify the JVM arguments from the command line instead of the
ini
file, use . For example:.\eclipsec.exe -debug -consoleLog -vmargs "-Djava.io.tmpdir=%TEMP%"
- To use JVM arguments from both the command line and the
ini
file, add--launcher.appendVmargs
in theini
file. For example:-startup plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1200.v20200508-1552 --launcher.appendVmargs -debug -consoleLog -vmargs -Xmx8G
- To change the workspace directory, use the
-data
argument. For example:.\eclipsec.exe --launcher.ini C:\eclipse.ini -data "%APPDATA%\Memory Analyzer" -vmargs "-Djava.io.tmpdir=%TEMP%"
- To use system properties such as the user home directory:
-data @user.home/myapp-workspace
Example Windows Launch Script
Also add --launcher.appendVmargs
to the ini
file after the launcher.library+plugins/ lines.
:: Launcher script
:: Comments start with ::
@echo off
set TITLE=Memory Analyzer Tool Launcher
title %TITLE%
echo %TITLE%
set PATH=C:\IEMA\jre\bin;%PATH%
echo Launching the tool. This may take a few minutes depending on available resources.
C:\IEMA\eclipsec.exe --launcher.ini "C:\IEMA\MemoryAnalyzer.ini" -data "%APPDATA%\MAT" -consoleLog -vmargs "-Djava.io.tmpdir=%TEMP%" "-Xshareclasses:name=mat,cacheDir=%APPDATA%\sharedclasses\mat"
echo(
echo Tool completed. Press any key to end this prompt.
echo(
pause
Setting the Java Virtual Machine that Eclipse Uses
Some tool usages require IBM Java to properly run the analysis (e.g. IBM MAT, IBM Java Health Center, etc.). You may specify the JVM that Eclipse uses in the eclipse.ini file. Above the -vmargs line, add the following two lines, replacing the path to IBM Java that you installed:
-vm
/opt/IBM/Java/ibm-java-x86_64-80/bin/
For Windows, IBM Java provides a pre-packaged Eclipse Neon with IBM Java already configured
Open a browser to https://developer.ibm.com/javasdk/downloads/#tab_eclipse
If you are running Windows 32-bit, click on the "Windows on Intel" link:
If you are running Windows 64-bit, click on the "Windows on AMD64/EMT64T" link:
The download will require you to either register for a free IBM ID or use the "Proceed without an IBM id" button and enter your information.
When you get to the download page, the default option is to use the "Download Director" to download the file which is a Java applet that downloads more quickly by using multiple sockets; however, you may choose the simpler option of a direct link by click on the "Download using http" tab.
Extract the .zip file into a directory of your choice.
Go to the "eclipseDevelopmentPackage\eclipse" subdirectory and launch eclipse.exe.
IBM Java on Linux
Open a browser to https://developer.ibm.com/javasdk/downloads/#tab_sdk8
If you are running Linux 32-bit, under the "Linux on Intel" heading, click on the first "Simple unzip with license" link.
If you are running Linux 64-bit, under the "Linux on AMD64/EMT64T" heading, click on the first "Simple unzip with license" link.
Download the package to any directory, most commonly /opt/IBM/Java
From the terminal, add execute permissions and then run
ibm-java-sdk-8.0-3.21-x86_64-archive.bin
:chmod +x ./ibm-java-sdk-8.0-3.21-x86_64-archive.bin ./ibm-java-sdk-8.0-3.21-x86_64-archive.bin
Eclipse Maximum Heap Size
The maximum heap size for Eclipse may be set in the "-vmargs" section of the eclipse.ini file.
Offline Update Site Installation
Using any Eclipse installation, run metadata.repository.mirrorApplication and artifact.repository.mirrorApplication for each update site. For example:
Windows:
> mkdir C:\eclipseupdatesites\dtfj\ > .\eclipse.exe -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/ -destination "file:/C:/eclipseupdatesites/dtfj/" -ignoreErrors > .\eclipse.exe -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/ -destination "file:/C:/eclipseupdatesites/dtfj/" -ignoreErrors
Linux:
$ mkdir -p /tmp/eclipseupdatesites/dtfj/ $ ./eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/ -destination "file:/tmp/eclipseupdatesites/dtfj/" -ignoreErrors $ ./eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/ -destination "file:/tmp/eclipseupdatesites/dtfj/" -ignoreErrors
Transfer the downloaded upatesites above to the target machine.
For each updatesite folder:
- In Eclipse, click Help } Install New Software...
- Click the "Add..." button.
- Enter "Local $NAME" (for example, Local DTJF) for the name, click "Local..." and select the update site folder.
- After you click OK, Eclipse will automatically select the new update site and load available plugins from which you can select the plugins.