Skip to content

Commit f0dc231

Browse files
committed
cleaning up #3648
1 parent b24f5d4 commit f0dc231

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

app/src/processing/app/Mode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ public void prepareExportFolder(File targetFolder) {
938938

939939

940940
public String getSearchPath() {
941-
return "";
941+
return null;
942942
}
943943

944944

java/src/processing/mode/java/JavaMode.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,19 +263,13 @@ public boolean handleExportApplication(Sketch sketch) throws SketchException, IO
263263
JavaBuild build = new JavaBuild(sketch);
264264
return build.exportApplication();
265265
}
266-
267-
266+
267+
268268
@Override
269269
public String getSearchPath() {
270-
StringBuilder tehPath = new StringBuilder(System.getProperty("java.class.path"));
271-
272-
// Starting with JDK 1.7, no longer using Apple's Java, so
273-
// rt.jar has the same path on all OSes
274-
tehPath.append(File.pathSeparatorChar
275-
+ System.getProperty("java.home") + File.separator + "lib"
276-
+ File.separator + "rt.jar");
277-
278-
return tehPath.toString();
270+
return System.getProperty("java.class.path") +
271+
File.pathSeparatorChar + System.getProperty("java.home") +
272+
File.separator + "lib" + File.separator + "rt.jar";
279273
}
280274

281275

java/src/processing/mode/java/pdex/ASTGenerator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ protected void done() {
306306
protected void loadJars() {
307307
factory = new ClassPathFactory();
308308

309-
StringBuilder tehPath = new StringBuilder(editor.getMode().getSearchPath());
309+
StringBuilder tehPath = new StringBuilder();
310+
String modeClassPath = editor.getMode().getSearchPath();
311+
if (modeClassPath != null) {
312+
tehPath.append(modeClassPath);
313+
}
310314

311315
if (errorCheckerService.classpathJars != null) {
312316
synchronized (errorCheckerService.classpathJars) {

0 commit comments

Comments
 (0)