Group :: Desenvolvimento/Java
RPM: jpicedt
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: jpicedt_1_4_1_03_20071021-unixhome.patch
Download
Download
--- jpicedt-1.4.1.03/jpicedt/jpicedt/MiscUtilities.java 2007-09-02 13:56:00 +0400
+++ jpicedt-1.4.1.03/jpicedt/jpicedt/MiscUtilities.java 2008-08-25 23:22:21 +0400
@@ -432,7 +432,9 @@
* @return the value of the "user.dir" Java property if "lib/jpicedt.jar" or "jpicedt.jar" wasn't found in the command line.
*/
public static String getJPicEdtHome(){
-
+ // a natural place for unix systems
+ if ((new File("/usr/share/jpicedt")).isDirectory()) return "/usr/share/jpicedt";
+
String classpath = System.getProperty("java.class.path"); // e.g. "/usr/lib/java/jre/lib/rt.jar:/home/me/jpicedt/x.y.z/lib/jpicedt.jar"
// File.separator = "/" on Unix, "\\" on Windows,...
int index = classpath.toLowerCase().indexOf("lib"+File.separator+"jpicedt.jar");