jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1836675 - /jmeter/trunk/src/core/org/apache/jmeter/gui/action/Restart.java
Date Wed, 25 Jul 2018 21:30:10 GMT
Author: pmouawad
Date: Wed Jul 25 21:30:10 2018
New Revision: 1836675

URL: http://svn.apache.org/viewvc?rev=1836675&view=rev
Log:
Bug 61635 - Add a menu to restart JMeter
Check we can restart
Bugzilla Id: 61635

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Restart.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Restart.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/Restart.java?rev=1836675&r1=1836674&r2=1836675&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/Restart.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/Restart.java Wed Jul 25 21:30:10 2018
@@ -31,6 +31,7 @@ import javax.swing.JMenuItem;
 import javax.swing.JOptionPane;
 import javax.swing.MenuElement;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.gui.GuiPackage;
 import org.apache.jmeter.gui.plugin.MenuCreator;
 import org.apache.jmeter.util.JMeterUtils;
@@ -81,6 +82,13 @@ public class Restart extends AbstractAct
      *            some custom code to be run before restarting
      */
     public static void restartApplication(Runnable runBeforeRestart) {
+        String javaCommand = System.getProperty(SUN_JAVA_COMMAND);
+        if(StringUtils.isEmpty(javaCommand)) {
+            JOptionPane.showMessageDialog(GuiPackage.getInstance().getMainFrame(), 
+                    JMeterUtils.getResString("restart_error")+":\n This command is only supported
on Open JDK or Oracle JDK" ,  //$NON-NLS-1$  //$NON-NLS-2$
+                    JMeterUtils.getResString("error_title"), JOptionPane.ERROR_MESSAGE);
//$NON-NLS-1$
+            return;
+        }
         // java binary
         String java = System.getProperty("java.home") + "/bin/java";
         // vm arguments



Mime
View raw message