- Timestamp:
- 06/30/09 18:05:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/java_source/src/nu/fw/jeti/backend/Start.java
r1014 r1064 56 56 { 57 57 public static final String VERSION = "0.7.7"; 58 //public final static String OS2 = "/2";59 58 public final static String OS2 = ""; 60 59 public static String BUILD_DATE; … … 89 88 ex.printStackTrace(); 90 89 } 91 if(!applet && System.getProperty("jnlpx.home")!=null)webstart = true;92 93 if (urlString == null)urlString = getPath();90 91 if ( urlString == null) 92 urlString = getPath(); 94 93 95 94 if (System.getProperty("file.separator").equals("/")) … … 97 96 pluginPath = urlString.substring(5); 98 97 } 99 else pluginPath = urlString.substring(6); 98 else 99 pluginPath = urlString.substring(6); 100 100 101 pluginPath = pluginPath.replace('/', File.separatorChar); 101 102 102 103 104 if(programURL==null) 105 { 106 try 107 { 108 programURL = new URL(urlString); 109 110 if(webstart || (path!=null&&path.equals("home"))) 111 { 112 path = System.getProperty("user.home")+ File.separatorChar 113 + ".jeti" +File.separatorChar; 114 File dir =new File(path); 115 if(!dir.exists()) 116 { 117 if(!dir.mkdir()) 118 { 119 JOptionPane.showMessageDialog(null, "Directory " + dir + " could not be created, Jeti will close"); 120 System.exit(1); 121 } 122 } 123 dataURL = new URL("file:/"+path); 124 } 125 else if(path!=null) 126 { 127 File dir =new File(path); 128 if(!dir.exists()) 129 { 130 if(!dir.mkdir()) 131 { 132 JOptionPane.showMessageDialog(null, "Directory " + dir + " could not be created, Jeti will close"); 133 System.exit(1); 134 } 135 } 136 dataURL = new URL("file:/"+path); 137 } 138 else 139 { 140 dataURL = programURL; 141 path = pluginPath; 142 } 143 System.out.println(programURL); 144 System.out.println(dataURL); 145 } 146 catch (MalformedURLException ex) 147 { 148 ex.printStackTrace(); 149 } 150 } 151 else 152 { 153 //if programurl null applet or network so use program path as data path 154 dataURL = programURL; 155 path = pluginPath; 156 } 157 103 /** 104 * Se o programurl for null, applet ou network tb usa program path como data path 105 */ 106 107 dataURL = programURL; 108 path = pluginPath; 109 158 110 try 159 111 { … … 162 114 BUILD_DATE = p.getProperty("buildDate"); 163 115 BUILD_NUM = p.getProperty("buildNum"); 164 } catch (Exception e) 116 } 117 catch (Exception e) 165 118 { 166 119 System.out.println("Can't find the version.properties file"); … … 170 123 backend = new Backend(this); 171 124 new Preferences(backend, parser); 172 I18N.init();173 //Preferences.initMessages();174 125 JFrame.setDefaultLookAndFeelDecorated(Preferences.getBoolean("jeti","javadecorations",false)); 175 126 176 if(Preferences.getBoolean("jeti", "nativeLnF", false))177 {178 try179 {180 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());181 } catch (ClassNotFoundException e)182 {183 e.printStackTrace();184 } catch (InstantiationException e)185 {186 e.printStackTrace();187 } catch (IllegalAccessException e)188 {189 e.printStackTrace();190 } catch (UnsupportedLookAndFeelException e)191 {192 e.printStackTrace();193 }194 }195 127 //parse plugins? make better or make comments 196 128 new StatusIcons(parser);
Note: See TracChangeset
for help on using the changeset viewer.