Skip to content

Commit 3d080c4

Browse files
committed
verify lib/so dir
1 parent e66a2a4 commit 3d080c4

2 files changed

Lines changed: 27 additions & 17 deletions

File tree

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,15 @@
22

33
Bridge API to connect with existing Java APIs.
44

5-
## Installation Linux
5+
## Installation Linux/Windows
66

77
```bash
88
$ export JAVA_HOME=/usr/local/share/jdk1.6.0_30
99
$ npm install java
1010
```
1111

12-
## Installation Windows
13-
14-
* [Install node.js from source](https://github.com/joyent/node/wiki/Installation) (using: vcbuild.bat release)
15-
* 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).
16-
This path cannot have quotes.
17-
* Open a Visual Studio command prompt.
18-
* Your Java must be the same architecture as node. By default on windows this is 32-bit.
19-
20-
```bash
21-
$ set PATH=%PATH%;C:\Program Files (x86)\Java\jdk1.6.0_18\jre\bin\client
22-
$ set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_18\
23-
$ set NODE_HOME=C:\dev\node-v0.6.8-0
24-
$ npm install java
25-
```
12+
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."
13+
this means that your JAVA_HOME is not set correctly and you need to verify the location of libjvm.so or jvm.lib.
2614

2715
## Installation Mac
2816

binding.gyp

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@
2323
'conditions': [
2424
['OS=="win"',
2525
{
26+
'actions': [
27+
{
28+
'action_name': 'verifyDeps',
29+
'inputs': [
30+
'$(JAVA_HOME)/lib/jvm.lib'
31+
],
32+
'outputs': ['./build/depsVerified'],
33+
'action': [],
34+
'message': 'Verify Deps'
35+
}
36+
],
2637
"include_dirs": [
2738
"$(JAVA_HOME)/include/win32",
2839
],
@@ -33,12 +44,23 @@
3344
],
3445
['OS=="linux"',
3546
{
47+
'actions': [
48+
{
49+
'action_name': 'verifyDeps',
50+
'inputs': [
51+
'$(JAVA_HOME)jre/lib/<(arch)/server/libjvm.so'
52+
],
53+
'outputs': ['./build/depsVerified'],
54+
'action': [],
55+
'message': 'Verify Deps'
56+
}
57+
],
3658
"include_dirs": [
3759
"$(JAVA_HOME)/include/linux",
3860
],
3961
"libraries": [
40-
"-L$(JAVA_HOME)jre/lib/<@(arch)/server/",
41-
"-Wl,-rpath,$(JAVA_HOME)jre/lib/<@(arch)/server/",
62+
"-L$(JAVA_HOME)jre/lib/<(arch)/server/",
63+
"-Wl,-rpath,$(JAVA_HOME)jre/lib/<(arch)/server/",
4264
"-ljvm"
4365
]
4466
}

0 commit comments

Comments
 (0)