|
1 | 1 | /* |
2 | 2 | * Nodeclipse/Enide build.gradle template for Node.js/Avatar.js project |
3 | 3 | * https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.ui/templates/hello-world/build.gradle |
| 4 | +* This file lets you optionally run Node.js app as Java Avatar.js app |
4 | 5 | * Usage |
5 | 6 | * 1. put in project root |
6 | 7 | * 2. check version numbers |
7 | | -* 3. use from command line `gradle run` or http://marketplace.eclipse.org/content/gradle |
| 8 | +* 3. use from command line `gradle run` or with http://marketplace.eclipse.org/content/gradle Run As -> |
8 | 9 | * Support for this template |
9 | 10 | * https://github.com/nodeclipse/nodeclipse-1/issues/ |
10 | 11 | * @author Paul Verest, Opal |
@@ -49,15 +50,15 @@ sourceSets { |
49 | 50 | //http://stackoverflow.com/questions/23148214/gradle-task-to-run-nashorn-javascript |
50 | 51 | task run(type: Exec) { |
51 | 52 | println 'runHelloWorld1' |
52 | | - // java -Djava.library.path=lib -jar lib/avatar-js.jar helloWorld.js |
53 | | - commandLine 'java', '-Djava.library.path=lib', '-jar', 'lib/avatar-js.jar', 'hello-world-server.js' |
54 | | - println 'runHelloWorld1 finished' |
| 53 | + // java -Djava.library.path=lib -jar lib/avatar-js.jar hello-world-server.js |
| 54 | + commandLine 'java', '-Djava.library.path=lib', '-jar', 'lib/avatar-js.jar', 'hello-world-server.js' |
| 55 | + println 'runHelloWorld1 finished' |
55 | 56 | } |
56 | 57 | task run2(type: JavaExec) { |
57 | 58 | println 'runHelloWorld2' |
58 | | - args 'hello-world-server.js' |
59 | | - main 'com.oracle.avatar.js.Server' |
60 | | - systemProperties 'java.library.path':'lib' |
61 | | - classpath 'lib/avatar-js.jar' |
62 | | - println 'runHelloWorld2 finished' |
| 59 | + args 'hello-world-server.js' |
| 60 | + main 'com.oracle.avatar.js.Server' |
| 61 | + systemProperties 'java.library.path':'lib' |
| 62 | + classpath 'lib/avatar-js.jar' |
| 63 | + println 'runHelloWorld2 finished' |
63 | 64 | } |
0 commit comments