help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble installing the java-package


From: Thole Klingenberg
Subject: Trouble installing the java-package
Date: Wed, 16 Dec 2009 09:06:15 +0100

hi, 

I tried to install the java-package, but i get a weird error. I am using
octave 3.0 and I made sure, that java is available in $JAVA_HOME. I am
running a 64bit linux OS, but I have no clue if this is related to the
problem.

This is the error I get running pgk install, any idea how to fix this?:

octave:3> pkg install -local -verbose java-1.2.6.tar.gz
In file included from __java__.cc:17:
__java__.h:22:17: error: jni.h: No such file or directory
In file included from __java__.cc:17:
__java__.h:34: error: expected ‘)’ before ‘*’ token
__java__.h:38: error: expected ‘)’ before ‘*’ token
__java__.h:75: error: ISO C++ forbids declaration of ‘JNIEnv’ with no
type
__java__.h:75: error: expected ‘;’ before ‘*’ token
__java__.h: In member function ‘void java_local_ref<T>::release()’:
__java__.h:62: error: ‘env’ was not declared in this scope
__java__.h: In constructor ‘java_local_ref<T>::java_local_ref()’:
__java__.h:68: error: class ‘java_local_ref<T>’ does not have any field
named ‘env’
__java__.h: At global scope:
__java__.h:78: error: ‘jobject’ was not declared in this scope
__java__.h:78: error: template argument 1 is invalid
__java__.h:78: error: invalid type in declaration before ‘;’ token
__java__.h:79: error: ‘jclass’ was not declared in this scope
__java__.h:79: error: template argument 1 is invalid
__java__.h:79: error: invalid type in declaration before ‘;’ token
__java__.h:80: error: ‘jstring’ was not declared in this scope
__java__.h:80: error: template argument 1 is invalid
__java__.h:80: error: invalid type in declaration before ‘;’ token
__java__.h:81: error: ‘jobjectArray’ was not declared in this scope
__java__.h:81: error: template argument 1 is invalid
__java__.h:81: error: invalid type in declaration before ‘;’ token
__java__.h:82: error: ‘jintArray’ was not declared in this scope
__java__.h:82: error: template argument 1 is invalid
__java__.h:82: error: invalid type in declaration before ‘;’ token
__java__.h:83: error: ‘jbyteArray’ was not declared in this scope
__java__.h:83: error: template argument 1 is invalid
__java__.h:83: error: invalid type in declaration before ‘;’ token
__java__.h:84: error: ‘jdoubleArray’ was not declared in this scope
__java__.h:84: error: template argument 1 is invalid
__java__.h:84: error: invalid type in declaration before ‘;’ token
__java__.h:85: error: ‘jthrowable’ was not declared in this scope
__java__.h:85: error: template argument 1 is invalid
__java__.h:85: error: invalid type in declaration before ‘;’ token
__java__.h:87: warning: ‘jstring_to_string’ initialized and declared
‘extern’
__java__.h:87: error: ‘JNIEnv’ was not declared in this scope
__java__.h:87: error: ‘jni_env’ was not declared in this scope
__java__.h:87: error: ‘jstring’ was not declared in this scope
__java__.h:88: warning: ‘jstring_to_string’ initialized and declared
‘extern’
__java__.h:88: error: redefinition of ‘std::string jstring_to_string’
__java__.h:87: error: ‘std::string jstring_to_string’ previously
declared here
__java__.h:88: error: ‘JNIEnv’ was not declared in this scope
__java__.h:88: error: ‘jni_env’ was not declared in this scope
__java__.h:88: error: ‘jobject’ was not declared in this scope
__java__.h:89: warning: ‘box’ initialized and declared ‘extern’
__java__.h:89: error: ‘JNIEnv’ was not declared in this scope
__java__.h:89: error: ‘jni_env’ was not declared in this scope
__java__.h:89: error: ‘jobject’ was not declared in this scope
__java__.h:89: error: ‘jclass’ was not declared in this scope
__java__.h:90: warning: ‘box_more’ initialized and declared ‘extern’
__java__.h:90: error: ‘JNIEnv’ was not declared in this scope
__java__.h:90: error: ‘jni_env’ was not declared in this scope
__java__.h:90: error: ‘jobject’ was not declared in this scope
__java__.h:90: error: ‘jclass’ was not declared in this scope
__java__.h:91: warning: ‘unbox’ initialized and declared ‘extern’
__java__.h:91: error: ‘JNIEnv’ was not declared in this scope
__java__.h:91: error: ‘jni_env’ was not declared in this scope
__java__.h:91: error: expected primary-expression before ‘const’
__java__.h:91: error: expected primary-expression before ‘&’ token
__java__.h:91: error: ‘jobj’ was not declared in this scope
__java__.h:91: error: expected primary-expression before ‘&’ token
__java__.h:91: error: ‘jcls’ was not declared in this scope
__java__.h:91: error: initializer expression list treated as compound
expression
__java__.h:92: warning: ‘unbox’ initialized and declared ‘extern’
__java__.h:92: error: redefinition of ‘int unbox’
__java__.h:91: error: ‘int unbox’ previously defined here
__java__.h:92: error: ‘JNIEnv’ was not declared in this scope
__java__.h:92: error: ‘jni_env’ was not declared in this scope
__java__.h:92: error: expected primary-expression before ‘const’
__java__.h:92: error: expected primary-expression before ‘&’ token
__java__.h:92: error: ‘jobjs’ was not declared in this scope
__java__.h:92: error: expected primary-expression before ‘&’ token
__java__.h:92: error: ‘jclss’ was not declared in this scope
In file included from __java__.cc:17:
__java__.h:111: error: expected ‘)’ before ‘obj’
__java__.h:122: error: ‘jobject’ does not name a type
__java__.h:123: error: ‘jclass’ does not name a type
__java__.h:173: error: ISO C++ forbids declaration of ‘JNIEnv’ with no
type
__java__.h:173: error: expected ‘;’ before ‘*’ token
__java__.h:175: error: ‘JNIEnv’ has not been declared
__java__.h:181: error: ‘JNIEnv’ has not been declared
__java__.h:188: error: ‘JNIEnv’ has not been declared
__java__.h:194: error: ‘JNIEnv’ has not been declared
__java__.h:199: error: ‘JNIEnv’ has not been declared
__java__.h:205: error: ‘JNIEnv’ has not been declared
__java__.h:210: error: ‘JNIEnv’ has not been declared
__java__.h:218: error: ‘jobject’ has not been declared
__java__.h:218: error: ‘jclass’ has not been declared
__java__.h:264: error: ‘jobject’ does not name a type
__java__.h:265: error: ‘jclass’ does not name a type
__java__.h: In constructor ‘octave_java::octave_java()’:
__java__.h:102: error: class ‘octave_java’ does not have any field named
‘java_object’
__java__.h:102: error: class ‘octave_java’ does not have any field named
‘java_class’
__java__.h: In copy constructor ‘octave_java::octave_java(const
octave_java&)’:
__java__.h:106: error: class ‘octave_java’ does not have any field named
‘java_object’
__java__.h:106: error: class ‘octave_java’ does not have any field named
‘java_class’
__java__.h:108: error: ‘const class octave_java’ has no member named
‘java_object’
__java__.h:108: error: ‘const class octave_java’ has no member named
‘java_class’
__java__.h: In member function ‘virtual bool octave_java::is_string()
const’:
__java__.h:163: error: ‘JNIEnv’ was not declared in this scope
__java__.h:163: error: ‘current_env’ was not declared in this scope
__java__.h:163: error: ‘thread_jni_env’ was not declared in this scope
__java__.h:165: error: ‘java_object’ was not declared in this scope
__java__.h:167: error: initializer expression list treated as compound
expression
__java__.h: In member function ‘octave_value
octave_java::do_java_invoke(const std::string&, const
octave_value_list&)’:
__java__.h:179: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In static member function ‘static octave_value
octave_java::do_java_invoke(const std::string&, const std::string&,
const octave_value_list&)’:
__java__.h:186: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In static member function ‘static octave_value
octave_java::do_java_create(const std::string&, const
octave_value_list&)’:
__java__.h:192: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In member function ‘octave_value
octave_java::do_java_get(const std::string&)’:
__java__.h:197: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In static member function ‘static octave_value
octave_java::do_java_get(const std::string&, const std::string&)’:
__java__.h:203: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In member function ‘octave_value
octave_java::do_java_set(const std::string&, const octave_value&)’:
__java__.h:208: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In static member function ‘static octave_value
octave_java::do_java_set(const std::string&, const std::string&, const
octave_value&)’:
__java__.h:215: error: ‘thread_jni_env’ was not declared in this scope
__java__.h: In member function ‘void octave_java::init(int, int)’:
__java__.h:220: error: ‘JNIEnv’ was not declared in this scope
__java__.h:220: error: ‘current_env’ was not declared in this scope
__java__.h:220: error: ‘thread_jni_env’ was not declared in this scope
__java__.h:225: error: ‘java_object’ was not declared in this scope
__java__.h:227: error: ‘java_class’ was not declared in this scope
__java__.h:227: error: expected type-specifier before ‘jclass’
__java__.h:227: error: expected ‘>’ before ‘jclass’
__java__.h:227: error: expected ‘(’ before ‘jclass’
__java__.h:227: error: ‘jclass’ was not declared in this scope
__java__.h:227: error: expected ‘)’ before ‘;’ token
__java__.h:228: error: ‘java_object’ was not declared in this scope
__java__.h:230: error: initializer expression list treated as compound
expression
__java__.h:231: error: ‘java_class’ was not declared in this scope
__java__.h:231: error: expected type-specifier before ‘jclass’
__java__.h:231: error: expected ‘>’ before ‘jclass’
__java__.h:231: error: expected ‘(’ before ‘jclass’
__java__.h:231: error: ‘jclass’ was not declared in this scope
__java__.h:231: error: expected ‘)’ before ‘;’ token
__java__.h:234: error: ‘java_class’ was not declared in this scope
__java__.h:236: error: initializer expression list treated as compound
expression
__java__.h:237: error: ‘jmethodID’ was not declared in this scope
__java__.h:237: error: expected ‘;’ before ‘mID’
__java__.h:238: error: ‘mID’ was not declared in this scope
__java__.h:238: error: initializer expression list treated as compound
expression
__java__.h: In member function ‘void octave_java::release()’:
__java__.h:246: error: ‘JNIEnv’ was not declared in this scope
__java__.h:246: error: ‘current_env’ was not declared in this scope
__java__.h:246: error: ‘thread_jni_env’ was not declared in this scope
__java__.h:250: error: ‘java_object’ was not declared in this scope
__java__.h:252: error: ‘java_class’ was not declared in this scope
__java__.h:254: error: ‘java_object’ was not declared in this scope
__java__.h:255: error: ‘java_class’ was not declared in this scope
__java__.cc: At global scope:
__java__.cc:36: error: ISO C++ forbids declaration of ‘jint’ with no
type
__java__.cc:36: error: typedef ‘jint’ is initialized (use decltype
instead)
__java__.cc:36: error: ‘JNICALL’ was not declared in this scope
__java__.cc:36: error: ‘JNI_CreateJavaVM_t’ was not declared in this
scope
__java__.cc:37: error: ISO C++ forbids declaration of ‘jint’ with no
type
__java__.cc:37: error: typedef ‘jint’ is initialized (use decltype
instead)
__java__.cc:37: error: ‘JNICALL’ was not declared in this scope
__java__.cc:37: error: ‘JNI_GetCreatedJavaVMs_t’ was not declared in
this scope
__java__.cc:39: error: ‘JNIEXPORT’ does not name a type
__java__.cc:41: error: expected constructor, destructor, or type
conversion before ‘void’
__java__.cc:43: error: expected constructor, destructor, or type
conversion before ‘void’
__java__.cc:45: error: expected constructor, destructor, or type
conversion before ‘void’
__java__.cc:47: error: ‘JNIEXPORT’ does not name a type
__java__.cc:50: error: expected initializer before ‘*’ token
__java__.cc:81: error: ISO C++ forbids declaration of ‘JavaVMInitArgs’
with no type
__java__.cc:81: error: expected ‘;’ before ‘*’ token
__java__.cc:87: error: expected ‘;’ before ‘void’
__java__.cc:145: error: ‘JavaVMInitArgs’ does not name a type
__java__.cc: In constructor ‘JVMArgs::JVMArgs()’:
__java__.cc:70: error: ‘vm_args’ was not declared in this scope
__java__.cc:70: error: ‘JNI_VERSION_1_2’ was not declared in this scope
__java__.cc: In member function ‘void JVMArgs::clean()’:
__java__.cc:114: error: ‘vm_args’ was not declared in this scope
__java__.cc: In member function ‘void JVMArgs::update()’:
__java__.cc:132: error: ‘vm_args’ was not declared in this scope
__java__.cc:133: error: ‘JavaVMOption’ was not declared in this scope
__java__.cc:133: error: expected primary-expression before ‘)’ token
__java__.cc:133: error: expected ‘;’ before ‘malloc’
__java__.cc: At global scope:
__java__.cc:149: error: ‘JNIEnv’ was not declared in this scope
__java__.cc:149: error: ‘jni_env’ was not declared in this scope
__java__.cc:149: error: ‘jobject’ was not declared in this scope
__java__.cc: In function ‘std::string get_module_path(const
std::string&, bool)’:
__java__.cc:226: error: no match for call to ‘(std::string) ()’
__java__.cc: In function ‘std::string initial_class_path()’:
__java__.cc:265: error: no match for call to ‘(std::string) ()’
__java__.cc: In function ‘void initialize_jvm()’:
__java__.cc:281: error: ‘JNIEnv’ was not declared in this scope
__java__.cc:281: error: ‘current_env’ was not declared in this scope
__java__.cc:283: error: ‘jvm’ was not declared in this scope
__java__.cc:342: error: ‘jsize’ was not declared in this scope
__java__.cc:342: error: expected ‘;’ before ‘nVMs’
__java__.cc:356: error: ‘JNI_CreateJavaVM_t’ was not declared in this
scope
__java__.cc:356: error: expected ‘;’ before ‘create_vm’
__java__.cc:357: error: ‘JNI_GetCreatedJavaVMs_t’ was not declared in
this scope
__java__.cc:357: error: expected ‘;’ before ‘get_vm’
__java__.cc:358: error: ‘create_vm’ was not declared in this scope
__java__.cc:360: error: ‘get_vm’ was not declared in this scope
__java__.cc:363: error: ‘jvm’ was not declared in this scope
__java__.cc:363: error: ‘nVMs’ was not declared in this scope
__java__.cc:363: error: ‘get_vm’ was not declared in this scope
__java__.cc:378: error: ‘JNI_VERSION_1_2’ was not declared in this scope
__java__.cc:380: error: ‘JNI_EDETACHED’ was not declared in this scope
__java__.cc:382: error: ‘JavaVMAttachArgs’ was not declared in this
scope
__java__.cc:382: error: expected ‘;’ before ‘vm_args’
__java__.cc:383: error: ‘vm_args’ was not declared in this scope
__java__.cc:389: error: ‘JNI_EVERSION’ was not declared in this scope
__java__.cc:392: error: ‘JNI_OK’ was not declared in this scope
__java__.cc:410: error: no match for call to ‘(std::string) ()’
__java__.cc:414: error: ‘class JVMArgs’ has no member named ‘to_args’
__java__.cc:414: error: ‘create_vm’ was not declared in this scope
__java__.cc:414: error: ‘JNI_OK’ was not declared in this scope
__java__.cc: In function ‘void terminate_jvm()’:
__java__.cc:434: error: ‘jvm’ was not declared in this scope
__java__.cc: At global scope:
__java__.cc:448: error: redefinition of ‘std::string jstring_to_string’
__java__.h:87: error: ‘std::string jstring_to_string’ previously
declared here
__java__.cc:448: error: ‘JNIEnv’ was not declared in this scope
__java__.cc:448: error: ‘jni_env’ was not declared in this scope
__java__.cc:448: error: ‘jstring’ was not declared in this scope
make: *** [__java__.oct] Fehler 1
error: 'make' returned the following error: make: Gehe in Verzeichnis
'/tmp/oct-Vx2vGi/java-1.2.6/src'
if [ "Xamd64X" = "XX" ]; then \
                mkoctfile -DHAVE_OCTAVE_30 -v -DJAVAPKG_BUILD
-I/usr/lib/jvm/java-6-sun/include
-I/usr/lib/jvm/java-6-sun/include/linux -o __java__.oct __java__.cc ; \
        else \
                mkoctfile -DHAVE_OCTAVE_30 -v -DJAVAPKG_BUILD 
-DJAVA_ARCH=\\\"amd64\\
\" -DJAVA_HOME=\\\"/usr/lib/jvm/java-6-sun\\\"
-I/usr/lib/jvm/java-6-sun/include
-I/usr/lib/jvm/java-6-sun/include/linux -o __java__.oct __java__.cc ; \
        fi
g++ -c -fPIC -I/usr/include/octave-3.0.5
-I/usr/include/octave-3.0.5/octave -O2 -g
-I/usr/lib/jvm/java-6-sun/include
-I/usr/lib/jvm/java-6-sun/include/linux -DHAVE_OCTAVE_30 -DJAVAPKG_BUILD
-DJAVA_ARCH=\"amd64\" -DJAVA_HOME=\"/usr/lib/jvm/java-6-sun\"
__java__.cc -o __java__.o
make: Verlasse Verzeichnis '/tmp/oct-Vx2vGi/java-1.2.6/src'
error: called from `pkg:configure_make' in
file /usr/share/octave/3.0.5/m/pkg/pkg.m near line 1248, column 2
octave:3> 
octave:3> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]