问题
Steps followed to setup nginx-clojure.0.4.0 in Windows-8 64 bit
Downloaded the nginx-clojure.0.4.0.tar
Unzipped the tar file and named it as nginx
Modified the following properties in conf file
nginx.conf : pid logs/nginx.pid; jvm_path "C:/Program Files (x86)/Java/jdk1.7.0_17/jre/bin/server/jvm.dll"; jvm_var my_other_jars 'D:/Learning/clojure-1.7.0/clojure-1.7.0.jar'; jvm_options "-Djava.class.path=jars/nginx-clojure-0.4.0.jar:#{my_other_jars}"; jvm_options "-Xms1024m"; jvm_options "-Xmx1024m";
Started the server using command "nginx-win64.exe".Server start up is failing with following error
can not initialize jvm for load dynamic lib, maybe wrong jvm_path!
The system cannot find the file specified(logs/nginx.pid).
Please let me know if i need to modify any other parameters. I tried nginx-clojure.0.4.0 in mac book also to setup but failed.I tried nginx-clojure.0.3.0 also in windows 8 i failed
回答1:
The issue is you use a 32-bit JDK with a 64-bit Nginx-Clojure. On 64-bit Windows-8 32-bit program will be installed to "C:/Program Files (x86)/". So please try either of
- install 64-bit JDK OR
- use nginx-win32.exe with 32-bit JDK
BTW if you want to use Nginx-Clojure on Macosx please try Nginx-Clojure 0.4.1 which can auto detect jvm path. e.g.
in nginx.conf
jvm_path auto;
UPDATE:
Your classpath is also wrong. On windows classpath seperator is ;
, not :
. So Your classpath should be
jvm_options "-Djava.class.path=jars/nginx-clojure-0.4.0.jar;#{my_other_jars}";
来源:https://stackoverflow.com/questions/31993670/what-are-the-steps-to-setup-nginx-clojure-on-windows-8