@@ -1101,33 +1101,33 @@ protected boolean exportApplication(File destFolder,
11011101
11021102 /// figure out run options for the VM
11031103
1104- List < String > runOptions = new ArrayList < String > ();
1104+ StringList runOptions = new StringList ();
11051105
11061106 // Set memory options, except for ARM where we're more memory-constrained
11071107 // compared to the machine being used to build/export the sketch
11081108 // https://github.com/processing/processing/pull/4406
11091109 if (Preferences .getBoolean ("run.options.memory" ) &&
11101110 !exportVariant .equals ("armv6hf" )) {
1111- runOptions .add ("-Xms" + Preferences .get ("run.options.memory.initial" ) + "m" );
1112- runOptions .add ("-Xmx" + Preferences .get ("run.options.memory.maximum" ) + "m" );
1111+ runOptions .append ("-Xms" + Preferences .get ("run.options.memory.initial" ) + "m" );
1112+ runOptions .append ("-Xmx" + Preferences .get ("run.options.memory.maximum" ) + "m" );
11131113 }
11141114 // https://github.com/processing/processing/issues/2239
1115- runOptions .add ("-Djna.nosys=true" );
1115+ runOptions .append ("-Djna.nosys=true" );
11161116 // https://github.com/processing/processing/issues/4608
11171117 if (embedJava ) {
11181118 // if people don't embed Java, it might be a mess, but what can we do
11191119 if (exportPlatform == PConstants .MACOSX ) {
1120- runOptions .add ("-Djava.ext.dirs=$APP_ROOT/Contents/PlugIns/jdk" + PApplet .javaVersionName + ".jdk/Contents/Home/jre/lib/ext" );
1120+ runOptions .append ("-Djava.ext.dirs=$APP_ROOT/Contents/PlugIns/jdk" + PApplet .javaVersionName + ".jdk/Contents/Home/jre/lib/ext" );
11211121 } else if (exportPlatform == PConstants .WINDOWS ) {
1122- runOptions .add ("-Djava.ext.dirs=%EXEDIR%/java/lib/ext" );
1122+ runOptions .append ("-Djava.ext.dirs=%EXEDIR%/java/lib/ext" );
11231123 } else if (exportPlatform == PConstants .LINUX ) {
1124- runOptions .add ("-Djava.ext.dirs=$APPDIR/java/lib/ext" );
1124+ runOptions .append ("-Djava.ext.dirs=$APPDIR/java/lib/ext" );
11251125 }
11261126 }
11271127
11281128 // https://github.com/processing/processing/issues/2559
11291129 if (exportPlatform == PConstants .WINDOWS ) {
1130- runOptions .add ("-Djava.library.path=\" %EXEDIR%\\ lib\" " );
1130+ runOptions .append ("-Djava.library.path=\" %EXEDIR%\\ lib\" " );
11311131 }
11321132
11331133
@@ -1286,8 +1286,7 @@ protected boolean exportApplication(File destFolder,
12861286 // https://github.com/processing/processing/issues/2349
12871287 pw .print ("$APPDIR/java/bin/" );
12881288 }
1289- String runOptionsStr =
1290- PApplet .join (runOptions .toArray (new String [0 ]), " " );
1289+ String runOptionsStr = runOptions .join (" " );
12911290 pw .print ("java " + runOptionsStr +
12921291 " -Djava.library.path=\" $APPDIR:$APPDIR/lib\" " +
12931292 " -cp \" " + exportClassPath + "\" " +
0 commit comments