Skip to content

Loading…

Can't install node-java #16

Closed
ghost opened this Issue · 4 comments

1 participant

@ghost

ERROR: You must set JAVA_HOME or JDK_INCLUDE_DIR environment variable

My environment:
ubuntu 12.04 x86
node v0.6.18

~$ node

process.env["JAVA_HOME"]
'/usr/lib/jvm/jdk1.7.0_04'

What reason?

Thanks for your help. :)

@joeferner
Owner

That error message is looking for an 'include' directory in java home. In your '/usr/lib/jvm/jdk1.7.0_04' directory do you have an include directory?

@ghost

Yes,the JAVA_HOME is complete.I changed the version to 1.6,a same problem happen yet. :(

My /etc/profile file:

JAVA_HOME=/usr/lib/jvm/jdk1.6.0_32
PATH=$PATH:/usr/lib/jvm/jdk1.6.0_32/bin
export JAVA_HOME PATH
export JRE_HOME=/usr/lib/jvm/jdk1.6.0_32/jre
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JRE_HOME/lib/i386:$JRE_HOME/lib/i386/client

@ghost

A favourable turn,when I installed successfully,run the code:

var java = require('./modules/java');
java.classpath.push("commons-lang3-3.1.jar");
java.classpath.push("commons-io.jar");
var list = java.newInstanceSync("java.util.ArrayList");

show error:

///////////////////////////////
A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0xb5fdc7c0, pid=7129, tid=3072657152

JRE version: 6.0_32-b05
Java VM: Java HotSpot(TM) Server VM (20.7-b02 mixed mode linux-x86 )
Problematic frame:
V [libjvm.so+0x4017c0] unsigned+0xe0

An error report file with more information is saved as:
.../hs_err_pid7129.log

If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp

/////////////////////////////////

@joeferner
Owner

Switched to node-gyp for compiles, should fixes issues like this.

@joeferner joeferner closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.