git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3210 small tidies
[jalview.git]
/
src
/
jalview
/
util
/
BrowserLauncher.java
diff --git
a/src/jalview/util/BrowserLauncher.java
b/src/jalview/util/BrowserLauncher.java
index
0bc09cc
..
8119daa
100755
(executable)
--- a/
src/jalview/util/BrowserLauncher.java
+++ b/
src/jalview/util/BrowserLauncher.java
@@
-233,8
+233,17
@@
public class BrowserLauncher
*/
static
{
*/
static
{
+
loadedWithoutErrors = true;
loadedWithoutErrors = true;
+ if (!Platform.isJS())
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ *
+ */
+ {
String osName = System.getProperty("os.name");
if (osName.startsWith("Mac OS"))
String osName = System.getProperty("os.name");
if (osName.startsWith("Mac OS"))
@@
-307,6
+316,7
@@
public class BrowserLauncher
{ // if we haven't hit any errors yet
loadedWithoutErrors = loadClasses();
}
{ // if we haven't hit any errors yet
loadedWithoutErrors = loadClasses();
}
+ }
}
/**
}
/**
@@
-325,6
+335,15
@@
public class BrowserLauncher
*/
private static boolean loadClasses()
{
*/
private static boolean loadClasses()
{
+
+ if (!Platform.isJS())
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ *
+ */
+ {
switch (jvm)
{
case MRJ_2_0:
switch (jvm)
{
case MRJ_2_0:
@@
-507,6
+526,7
@@
public class BrowserLauncher
break;
}
break;
}
+ }
return true;
}
return true;
}
@@
-523,6
+543,14
@@
public class BrowserLauncher
*/
private static Object locateBrowser()
{
*/
private static Object locateBrowser()
{
+ if (!Platform.isJS())
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ *
+ */
+ {
if (browser != null)
{
return browser;
if (browser != null)
{
return browser;
@@
-689,7
+717,10
@@
public class BrowserLauncher
break;
}
break;
}
+ }
+
return browser;
return browser;
+
}
/**
}
/**
@@
-711,6
+742,20
@@
public class BrowserLauncher
*/
public static void openURL(String url) throws IOException
{
*/
public static void openURL(String url) throws IOException
{
+
+ if (Platform.isJS())
+ {
+ Platform.openURL(url);
+ return;
+ }
+ else
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ */
+ {
+
if (!loadedWithoutErrors)
{
throw new IOException(MessageManager
if (!loadedWithoutErrors)
{
throw new IOException(MessageManager
@@
-896,8
+941,10
@@
public class BrowserLauncher
break;
}
break;
}
+ }
}
}
+
/**
* Methods required for Mac OS X. The presence of native methods does not
* cause any problems on other platforms.
/**
* Methods required for Mac OS X. The presence of native methods does not
* cause any problems on other platforms.