Changeset 1756


Ignore:
Timestamp:
11/07/06 10:39:48 (13 years ago)
Author:
curtis
Message:

Add explicit check and error reporting for Java3D.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/apps/slim/SlimPlotter.java

    r1741 r1756  
    124124    progress.setMillisToDecideToPopup(0); 
    125125    int p = 0; 
     126 
     127    // check for required libraries 
     128    try { 
     129      Class.forName("javax.vecmath.Point3d"); 
     130    } 
     131    catch (Throwable t) { 
     132      String os = System.getProperty("os.name").toLowerCase(); 
     133      String url = null; 
     134      if (os.indexOf("windows") >= 0 || 
     135        os.indexOf("linux") >= 0 || os.indexOf("solaris") >= 0) 
     136      { 
     137        url = "https://java3d.dev.java.net/binary-builds.html"; 
     138      } 
     139      else if (os.indexOf("mac os x") >= 0) { 
     140        url = "http://www.apple.com/downloads/macosx/apple/" + 
     141          "java3dandjavaadvancedimagingupdate.html"; 
     142      } 
     143      else if (os.indexOf("aix") >= 0) { 
     144        url = "http://www-128.ibm.com/developerworks/java/jdk/aix/index.html"; 
     145      } 
     146      else if (os.indexOf("hp-ux") >= 0) { 
     147        url = "http://www.hp.com/products1/unix/java/java2/java3d/downloads/" + 
     148          "index.html"; 
     149      } 
     150      else if (os.indexOf("irix") >= 0) { 
     151        url = "http://www.sgi.com/products/evaluation/6.5_java3d_1.3.1/"; 
     152      } 
     153      JOptionPane.showMessageDialog(null, 
     154        "SlimPlotter requires Java3D, but it was not found." + 
     155        (url == null ? "" : ("\nPlease install it from:\n" + url)), 
     156        "SlimPlotter", JOptionPane.ERROR_MESSAGE); 
     157      System.exit(3); 
     158    } 
    126159 
    127160    // parse command line arguments 
Note: See TracChangeset for help on using the changeset viewer.