changeset 159:270ac3859d2f

JMC-6470: Use the JVM on the path by default for the RCP version of JMC on all platforms Reviewed-by: ghb
author hirt <marcus.hirt@oracle.com>
date Mon, 20 May 2019 12:35:52 +0200
parents 183487546804
children 12cd4d1b437a
files README.md application/org.openjdk.jmc.rcp.product/jmc.product
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Thu May 16 12:33:19 2019 +0200
+++ b/README.md	Mon May 20 12:35:52 2019 +0200
@@ -286,24 +286,26 @@
 Once build has finished the results will be in the `target` directory
 
 ## Running the Locally Built JMC
-The built JMC will end up in the `target` folder in the root. To run it, go to `target/products/org.openjdk.jmc/<platform>` to find the launcher. Don't forget to override the vm flag with the JVM you wish to use for running JMC.
+The built JMC will end up in the `target` folder in the root. The launcher is located in `target/products/org.openjdk.jmc/<platform>`. By default whichever JRE is on the path 
+will be used. Remember to set it to a JDK (rather than a JRE) if you want the launched mission control to automatically discover locally running JVMs. To override which JVM 
+to use when launching, add -vm and the path to a directory where a JDK java launcher is located, for example -vm $JAVA_HOME/bin.
 
 Here is an example for Mac OS X:
 
 ```bash
-target/products/org.openjdk.jmc/macosx/cocoa/x86_64/JDK\ Mission\ Control.app/Contents/MacOS/jmc -vm $JAVA_HOME/bin
+target/products/org.openjdk.jmc/macosx/cocoa/x86_64/JDK\ Mission\ Control.app/Contents/MacOS/jmc
 ```
 
 Here is an example for Linux:
 
 ```bash
-target/products/org.openjdk.jmc/linux/gtk/x86_64/jmc -vm $JAVA_HOME/bin
+target/products/org.openjdk.jmc/linux/gtk/x86_64/jmc
 ```
 
 And here is an example for Windows x64:
 
 ```bash
-target\products\org.openjdk.jmc\win32\win32\x86_64\jmc.exe -vm %JAVA_HOME%\bin
+target\products\org.openjdk.jmc\win32\win32\x86_64\jmc.exe
 ```
 
 ## Using the Built JMC Update Site in Eclipse
--- a/application/org.openjdk.jmc.rcp.product/jmc.product	Thu May 16 12:33:19 2019 +0200
+++ b/application/org.openjdk.jmc.rcp.product/jmc.product	Mon May 20 12:35:52 2019 +0200
@@ -46,13 +46,15 @@
    </configIni>
 
    <launcherArgs>
+      <!-- Note: if embedding a JDK, remember to override the -vm option on the various platforms to 
+           point to the relative path of your embedded JDK. e.g.
+           <programArgsMac>-ws cocoa -vm ../jdk/Contents/Home/bin/</programArgsMac> -->
       <programArgs>--launcher.appendVmargs
       </programArgs>
-      <!-- use default Java from PATH on Linux -->
       <programArgsLin></programArgsLin>
-      <programArgsMac>-ws cocoa -vm ../jdk/Contents/Home/bin/
+      <programArgsMac>-ws cocoa
       </programArgsMac>
-      <programArgsWin>-vm ./
+      <programArgsWin>
       </programArgsWin>
       <vmArgs>-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -XX:FlightRecorderOptions=stackdepth=128 -XX:+FlightRecorder -XX:StartFlightRecording=name=JMC_Default,maxsize=100m -Djava.net.preferIPv4Stack=true -Djdk.attach.allowAttachSelf=true --add-exports=java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports=java.management/sun.management=ALL-UNNAMED --add-exports=java.management/sun.management.counter.perf=ALL-UNNAMED --add-exports=jdk.management.agent/jdk.internal.agent=ALL-UNNAMED --add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED
       </vmArgs>