Revision: 8764
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=8764&view=rev
Author:   pbianchini
Date:     2013-01-01 17:38:27 +0000 (Tue, 01 Jan 2013)
Log Message:
-----------
Fix for soffice MAC OS X error: soffice[2149:2703] Apple AWT Java VM was loaded 
on first thread -- can't start AWT. 

Modified Paths:
--------------
    trunk/JLanguageTool/src/main/java/org/languagetool/openoffice/Main.java

Modified: 
trunk/JLanguageTool/src/main/java/org/languagetool/openoffice/Main.java
===================================================================
--- trunk/JLanguageTool/src/main/java/org/languagetool/openoffice/Main.java     
2013-01-01 15:32:32 UTC (rev 8763)
+++ trunk/JLanguageTool/src/main/java/org/languagetool/openoffice/Main.java     
2013-01-01 17:38:27 UTC (rev 8764)
@@ -689,10 +689,14 @@
       return false;
     }
     try {
-      for (UIManager.LookAndFeelInfo info : 
UIManager.getInstalledLookAndFeels()) {
-        if ("Nimbus".equals(info.getName())) {
-          UIManager.setLookAndFeel(info.getClassName());
-          break;
+      // do not set look and feel for on Mac OS X as it causes the following 
error:
+      // soffice[2149:2703] Apple AWT Java VM was loaded on first thread -- 
can't start AWT.
+      if(!System.getProperty("os.name").contains("OS X")) {
+        for (UIManager.LookAndFeelInfo info : 
UIManager.getInstalledLookAndFeels()) {
+          if ("Nimbus".equals(info.getName())) {
+            UIManager.setLookAndFeel(info.getClassName());
+            break;
+          }
         }
       }
     } catch (Exception ignored) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to