Changeset 779 for java/installer2/src/net/oni2
- Timestamp:
- Apr 3, 2013, 12:41:21 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/backend/Paths.java
r778 r779 36 36 return new File(wd); 37 37 } else { 38 return getJarPath().getParentFile(); 38 String jarPath = Paths.class.getProtectionDomain().getCodeSource() 39 .getLocation().getPath(); 40 String decodedPath = null; 41 try { 42 decodedPath = URLDecoder.decode(jarPath, "UTF-8"); 43 } catch (UnsupportedEncodingException e) { 44 e.printStackTrace(); 45 } 46 return new File(decodedPath).getParentFile().getParentFile(); 39 47 } 40 48 } … … 44 52 */ 45 53 public static File getJarPath() { 46 String jarPath = Paths.class.getProtectionDomain().getCodeSource() 47 .getLocation().getPath(); 48 String decodedPath = null; 49 try { 50 decodedPath = URLDecoder.decode(jarPath, "UTF-8"); 51 } catch (UnsupportedEncodingException e) { 52 e.printStackTrace(); 53 } 54 return new File(decodedPath).getParentFile(); 54 return new File(getInstallerPath(), "bin"); 55 55 } 56 56
Note:
See TracChangeset
for help on using the changeset viewer.