Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node Java doesn't work on different Platforms of OSX #413

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,20 @@ Notes:

### Installation OSX

* If you run into strange runtime issues, it could be because the Oracle JDK does not advertise itself as available for JNI. See [Issue 90](https://github.com/joeferner/node-java/issues/90#issuecomment-45613235) for more details and manual workarounds. If this does occur for you, please update the issue.
PREREQUISITES:

* OSX JDK needs JNI feature enabled.
Run (https://gist.github.com/pudquick/349f063c242239952a2e#file-modify_java-py) to guarantee all JDKs have JNI enabled.

* Add a symlink to your JDK.
```bash
sudo mkdir /Library/Application Support/ExportData/
cd /Library/Application Support/ExportData/
sudo ln -s /Library/Java/JavaVirtualMachines/<JDK-VERSION>/Contents/Home javaLocation
```

where JDK-VERSION is the version of the JDK you wish to use.


### Installation Windows

Expand Down
4 changes: 2 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
'<(javahome)/include/darwin'
],
'libraries': [
'-L<(javahome)/jre/lib/server',
'-Wl,-rpath,<(javahome)/jre/lib/server',
'-L/Library/Application\ Support/ExportData/javaLocation/jre/lib/server',
'-Wl,-rpath,/Library/Application\ Support/ExportData/javaLocation/jre/lib/server',
'-ljvm'
],
},
Expand Down