[jbosstools-commits] JBoss Tools SVN: r43505 - in trunk/vpe/plugins: org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 7 08:57:01 EDT 2012
Author: yradtsevich
Date: 2012-09-07 08:57:01 -0400 (Fri, 07 Sep 2012)
New Revision: 43505
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-12467 : Unable to Run Browsersim in Windows7 64b + JRE7 32b
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java 2012-09-07 11:58:37 UTC (rev 43504)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java 2012-09-07 12:57:01 UTC (rev 43505)
@@ -35,6 +35,12 @@
&& error.getMessage() != null // Apple Application Support is not installed
&& error.getMessage().contains("Safari must be installed to use a SWT.WEBKIT-style Browser")) { //$NON-NLS-1$
message = Messages.ExceptionNotifier_APPLE_APPLICATION_SUPPORT_IS_NOT_FOUND;
+ } else if (PlatformUtil.OS_WIN32.equals(os) && PlatformUtil.ARCH_X86.equals(arch) // Eclipse 32-bit on Windows and
+ && error.getMessage() != null // Apple Application Support is not installed and
+ && error.getMessage().contains("No more handles [Failed to load the swt-webkit library]") // Safari libs cannot be loaded and //$NON-NLS-1$
+ && "1.7".equals(System.getProperty("java.specification.version"))) { //Java version is 1.7 //$NON-NLS-1$ //$NON-NLS-2$
+ // see JBIDE-12467: Unable to Run Browsersim in Windows7 64b + JDK7 32b
+ message = Messages.ExceptionNotifier_JRE_1_7_IS_NOT_SUPPORTED_ON_WINDOWS;
} else if (PlatformUtil.OS_LINUX.equals(os) && error.getMessage() != null) { // Linux - probably WebKitGTK is not installed
message = MessageFormat.format(Messages.ExceptionNotifier_BROWSERSIM_IS_FAILED_TO_START_ON_LINUX, error.getMessage());
} else { // everything else
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2012-09-07 11:58:37 UTC (rev 43504)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2012-09-07 12:57:01 UTC (rev 43505)
@@ -17,7 +17,6 @@
*/
public class Messages {
private static final String BUNDLE_NAME = Messages.class.getName().toString().toLowerCase();
-
public static String BrowserSim_ABOUT;
public static String BrowserSim_ABOUT_MESSAGE;
@@ -49,6 +48,7 @@
public static String ExceptionNotifier_APPLE_APPLICATION_SUPPORT_IS_NOT_FOUND;
public static String ExceptionNotifier_BROWSERSIM_IS_FAILED_TO_START;
public static String ExceptionNotifier_BROWSERSIM_IS_FAILED_TO_START_ON_LINUX;
+ public static String ExceptionNotifier_JRE_1_7_IS_NOT_SUPPORTED_ON_WINDOWS;
public static String ExceptionNotifier_OK;
public static String ExceptionNotifier_ONLY_32_BIT_ECLIPSE_IS_SUPPORTED_ON_WINDOWS;
public static String ManageDevicesDialog_ADD;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties 2012-09-07 11:58:37 UTC (rev 43504)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties 2012-09-07 12:57:01 UTC (rev 43505)
@@ -35,6 +35,9 @@
ExceptionNotifier_BROWSERSIM_IS_FAILED_TO_START_ON_LINUX=BrowserSim is failed to start with the following error\:\n"{0}"\n\
Please note that WebKitGTK 1.2.0 or newer must be installed and available in the library load path.\n\
If not, use your package manager to install libwebkitgtk.\nAlso see <a href\="https\://community.jboss.org/docs/DOC-18100">BrowserSim FAQ</a>.
+ExceptionNotifier_JRE_1_7_IS_NOT_SUPPORTED_ON_WINDOWS=JRE 7 is not supported by BrowserSim on Windows.\n\
+Please either run Eclipse with JDK 7, or with JRE/JDK 6.\n\
+Also see <a href\="https\://community.jboss.org/docs/DOC-18100">BrowserSim FAQ</a>.
ManageDevicesDialog_ADD=Add
ManageDevicesDialog_ALWAYS_TRUNCATE=Always truncate
ManageDevicesDialog_CANCEL=Cancel
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2012-09-07 11:58:37 UTC (rev 43504)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2012-09-07 12:57:01 UTC (rev 43505)
@@ -55,6 +55,20 @@
String classPath = getClassPathString();
String javaCommand = System.getProperty("java.home") + "/bin/java"; //$NON-NLS-1$ //$NON-NLS-2$
+ // This is a workaround for JDK 7: JBIDE-12467 Unable to Run Browsersim in Windows7 64b + JRE7 32b
+ // On Windows and Java 7 the 'java.home' variable always points to JRE, but 'eclipse.vm' may point to JDK,
+ // if it is specified explicitly in the inclipse.ini.
+ boolean isJava1_7 = "1.7".equals(System.getProperty("java.specification.version")); //$NON-NLS-1$ //$NON-NLS-2$
+ if (Platform.OS_WIN32.equals(Platform.getOS()) && isJava1_7) {
+ String eclipseVm = System.getProperty("eclipse.vm");
+ if (eclipseVm != null) {
+ if (eclipseVm.endsWith("java") || eclipseVm.endsWith("java.exe")
+ || eclipseVm.endsWith("javaw") || eclipseVm.endsWith("javaw.exe")) {
+ javaCommand = eclipseVm;
+ }
+ }
+ }
+
List<String> commandElements = new ArrayList<String>();
commandElements.add(javaCommand);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
More information about the jbosstools-commits
mailing list