Skip to content

Commit 9a53ed4

Browse files
committed
add integration test for webkit
1 parent 9f47674 commit 9a53ed4

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ npm test
5858

5959
_NOTE: You will need node-gyp installed using "npm install -g node-gyp"_
6060

61+
## Installation node-webkit
62+
63+
```bash
64+
npm install -g nw-gyp
65+
npm install java
66+
cd node_modules/java
67+
nw-gyp configure --target=0.10.5
68+
nw-gyp build
69+
```
70+
71+
_See testIntegration/webkit for a working example_
72+
6173
## Quick Examples
6274

6375
```javascript

testIntegration/webkit/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Hello World!</title>
5+
<script type="text/javascript" src="main.js"></script>
6+
</head>
7+
<body>
8+
<h1>Hello World!</h1>
9+
We are using java: <script>document.write(runJavaMethod())</script>.
10+
</body>
11+
</html>

testIntegration/webkit/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var java = require('../../');
2+
3+
function runJavaMethod() {
4+
return java.callStaticMethodSync("java.lang.System", "getProperty", "java.version");
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "webkitIntegrationTest",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "index.html"
6+
}

0 commit comments

Comments
 (0)