Nashorn JJS: incuding all jars in folder at cpasspath

340 views Asked by At

I am using Nashorn's JJS with -classpath to load all the jars in a folder.

I have tried the following :

jjs -J-Xmx512m -J-XX:MaxDirectMemorySize=512m -cp "C:/orientDB/lib/*" test.js

"Illegal char <> at index 16: C:/orientDB/lib/" is not a recognized option. Use "-h" or "-help" to see a list of all supported options.

jjs -J-Xmx512m -J-XX:MaxDirectMemorySize=512m -cp C:/orientDB/lib/* test.js

C:\orientDB\lib\ant-1.8.3.jar:2:7 Missing space after numeric literal ?3Z@ META-INF/?? PK

Any ideas?

1

There are 1 answers

3
A. Sundararajan On

I verified that "*" in -cp option works with jjs - I used Mac to test it. My jjs version is 1.8.0_112.

jjs -cp tmp/*

worked for me. in "tmp" directory, I had a single jar and from jjs prompt I can refer to the classes in that jar.