Skip to content

Commit

Permalink
verify lib/so dir
Browse files Browse the repository at this point in the history
  • Loading branch information
joeferner committed Dec 10, 2012
1 parent e66a2a4 commit 3d080c4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,15 @@

Bridge API to connect with existing Java APIs.

## Installation Linux
## Installation Linux/Windows

```bash
$ export JAVA_HOME=/usr/local/share/jdk1.6.0_30
$ npm install java
```

## Installation Windows

* [Install node.js from source](https://github.com/joyent/node/wiki/Installation) (using: vcbuild.bat release)
* The directory where jvm.dll exists must be in the PATH. (e.g. C:\Program Files (x86)\Java\jdk1.6.0_18\jre\bin\client).
This path cannot have quotes.
* Open a Visual Studio command prompt.
* Your Java must be the same architecture as node. By default on windows this is 32-bit.

```bash
$ set PATH=%PATH%;C:\Program Files (x86)\Java\jdk1.6.0_18\jre\bin\client
$ set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_18\
$ set NODE_HOME=C:\dev\node-v0.6.8-0
$ npm install java
```
NOTE: If you see an error such as "No rule to make target `/opt/jdk1.7.0_09/jre/lib/amd64/server/libjvm.so', needed by `build/depsVerified'. Stop."
this means that your JAVA_HOME is not set correctly and you need to verify the location of libjvm.so or jvm.lib.

## Installation Mac

Expand Down
26 changes: 24 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
'conditions': [
['OS=="win"',
{
'actions': [
{
'action_name': 'verifyDeps',
'inputs': [
'$(JAVA_HOME)/lib/jvm.lib'
],
'outputs': ['./build/depsVerified'],
'action': [],
'message': 'Verify Deps'
}
],
"include_dirs": [
"$(JAVA_HOME)/include/win32",
],
Expand All @@ -33,12 +44,23 @@
],
['OS=="linux"',
{
'actions': [
{
'action_name': 'verifyDeps',
'inputs': [
'$(JAVA_HOME)jre/lib/<(arch)/server/libjvm.so'
],
'outputs': ['./build/depsVerified'],
'action': [],
'message': 'Verify Deps'
}
],
"include_dirs": [
"$(JAVA_HOME)/include/linux",
],
"libraries": [
"-L$(JAVA_HOME)jre/lib/<@(arch)/server/",
"-Wl,-rpath,$(JAVA_HOME)jre/lib/<@(arch)/server/",
"-L$(JAVA_HOME)jre/lib/<(arch)/server/",
"-Wl,-rpath,$(JAVA_HOME)jre/lib/<(arch)/server/",
"-ljvm"
]
}
Expand Down

0 comments on commit 3d080c4

Please sign in to comment.