Skip to content

Commit 8103fec

Browse files
committed
add the Contents/Java folder to java.library.path on OS X
1 parent 4ed8a49 commit 8103fec

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

core/src/processing/core/PApplet.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10025,6 +10025,24 @@ static public void runSketch(final String[] args,
1002510025
// Remove 60fps limit on the JavaFX "pulse" timer
1002610026
System.setProperty("javafx.animation.fullspeed", "true");
1002710027

10028+
// In an exported application, add the Contents/Java folder to the
10029+
// java.library.path, so that native libraries work properly.
10030+
// Without this, the library path is only set to Contents/MacOS
10031+
// where the launcher binary lives.
10032+
if (platform == MACOSX) {
10033+
URL coreJarURL =
10034+
PApplet.class.getProtectionDomain().getCodeSource().getLocation();
10035+
// The jarPath from above will/may be URL encoded (%20 for spaces)
10036+
String coreJarPath = urlDecode(coreJarURL.getPath());
10037+
if (coreJarPath.endsWith("/Contents/Java/core.jar")) {
10038+
// remove the /core.jar part from the end
10039+
String javaPath = coreJarPath.substring(0, coreJarPath.length() - 9);
10040+
String libraryPath = System.getProperty("java.library.path");
10041+
libraryPath += File.pathSeparator + javaPath;
10042+
System.setProperty("java.library.path", libraryPath);
10043+
}
10044+
}
10045+
1002810046
// Catch any HeadlessException to provide more useful feedback
1002910047
try {
1003010048
// Call validate() while resize events are in progress

core/todo.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
X Incomplete text rendering of strings with consecutive line breaks
33
X https://github.com/processing/processing/issues/3736
44
X https://github.com/processing/processing/pull/3737
5+
X add the Contents/Java folder to java.library.path on OS X
6+
X allows exported applications to use the Sound library
57

8+
andres
9+
X P2D: error calling surface.setTitle()
10+
o https://github.com/processing/processing/issues/3721
11+
X https://github.com/processing/processing/commit/a384cbf0890a49dbf6e0fdd80e048de80e5d78d2
612

713
jakub
814
X FX - fix transformation stack NPE
@@ -39,6 +45,8 @@ X FX - normalize enter key
3945
X https://github.com/processing/processing/pull/3730
4046
X Render text starting with space properly
4147
X https://github.com/processing/processing/pull/3746
48+
X FX - smooth for the main surface
49+
X https://github.com/processing/processing/pull/3749
4250

4351

4452
known issues

todo.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ _ Code editor wrongly detects errors for libraries in code folder
1414
_ https://github.com/processing/processing/issues/3732
1515
_ remove old versions of processing-java when installing on OS X
1616
_ "color type detected! this shouldn't be happening! please report"
17+
_ happens when user does 'new color' instead of 'color'
1718
_ https://github.com/processing/processing/issues/3739
19+
_ confusion when // tweak is used
20+
_ https://github.com/processing/processing/issues/3742
1821

1922
gsoc
2023
X CM: Category dropdown alignment

0 commit comments

Comments
 (0)