#include <jni.h> /* where everything is defined */
int main() {
JNIEnv *env1;
JavaVM** jvm1;
JavaVMInitArgs vm_args1;
JavaVMOption options1[2];
options1[0].optionString = "-Djava.library.path=/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/";
options1[1].optionString = "-Djava.class.path=.";
vm_args1.version = JNI_VERSION_1_6;
vm_args1.nOptions = 2;
vm_args1.options = options1;
vm_args1.ignoreUnrecognized = 0;
#The segmentation fault seems to be happening on this line, as when it's commented out it runs fine
int reAt = JNI_CreateJavaVM(jvm1, (void**)&env1, &vm_args1);
return 0;
}
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f719f3c132e, pid=6152, tid=140125990274880
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x63b32e] JNI_CreateJavaVM+0xbe
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/gem/plus/console/hs_err_pid6152.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
I have the error file as well, but the output won't fit in this post :( if the above is not enough I could probably split ip it in subsequent posts though, please let me know :)