private String getProfilerString() { // if not enabled -- fagetaboutit if(!profiler.isEnabled()) return ""; List<File> ff = profiler.getNativePath(); return GFLauncherUtils.fileListToPathString(ff); }
List<String> getCommands() { List<String> list = new ArrayList<String>(); String stockNativePathsString = getStockNativePathString(); String prefixFileString = getPrefixString(); String suffixFileString = getSuffixString(); String profilerFileString = getProfilerString(); String libFileString = libDir.getPath(); String lib64FileString = getLib64String(); // bnevins: Very simple to change the order right here in the future! // don't worry about extra PS's --> no problem-o // don't worry about duplicates -- SmartFile will get rid of them... StringBuilder sb = new StringBuilder(); sb.append(prefixFileString).append(PS); sb.append(libFileString).append(PS); sb.append(lib64FileString).append(PS); sb.append(stockNativePathsString).append(PS); sb.append(profilerFileString).append(PS); sb.append(suffixFileString); // this looks dumb but there is a lot of potential cleaning going on here // * all duplicate directories are removed // * junk is removed, e.g. ":xxx::yy::::::" goes to "xxx:yy" String finalPathString = GFLauncherUtils.fileListToPathString(GFLauncherUtils.stringToFiles(sb.toString())); String nativeCommand = "-D" + JAVA_NATIVE_SYSPROP_NAME + "=" + finalPathString; list.add(nativeCommand); return list; }
void setClasspath() throws GFLauncherException { List<File> mainCP = getMainClasspath(); // subclass provides this List<File> envCP = javaConfig.getEnvClasspath(); List<File> sysCP = javaConfig.getSystemClasspath(); List<File> prefixCP = javaConfig.getPrefixClasspath(); List<File> suffixCP = javaConfig.getSuffixClasspath(); List<File> profilerCP = profiler.getClasspath(); // create a list of all the classpath pieces in the right order List<File> all = new ArrayList<File>(); all.addAll(prefixCP); all.addAll(profilerCP); all.addAll(mainCP); all.addAll(sysCP); all.addAll(envCP); all.addAll(suffixCP); setClasspath(GFLauncherUtils.fileListToPathString(all)); }