help-octave
[Top][All Lists]
Advanced

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

Re: Unable to install Java on Octave 3.2 on Windows


From: Michael Goffioul
Subject: Re: Unable to install Java on Octave 3.2 on Windows
Date: Thu, 11 Jun 2009 08:51:28 +0100

JDK include directories needs also to be available to GCC. Try to define the
JAVA_INCS environment variable before running "pkg"; set it to something like
"-IC:/where/jdk/headers/are/installed
-IC:/where/jdk/headers/are/installed/win32"

Michael.


On Thu, Jun 11, 2009 at 2:38 AM, Sattiraju
Prabhakar<address@hidden> wrote:
> Hi All!
>
>
>
> I have installed Octave 3.2 on Windows XP machine, which already
>
> has Java SDK 6 Update 14 installed. I set Java_Home and
>
> PATH environment variables to jdk\bin.
>
>
>
> I installed java-1.2.6 package in Octave-3.2. But Octave-3.2 does not
> recognize
>
> java. I tried  the following
>
>
>
> java_new ('java.util.LinkedList')
>
>
>
> I get the following error
>
>
>
> error: `java_new' undefined near line 1 column 1
>
>
>
> Intrestingly, I also installed Octave-3.0.3, and I installed java and
> jhandles packages.
>
> octave-3.0.3.exe:1> java_new ('java.util.LinkedList')
>
> ans =
>
>
>
> <Java object: java.util.LinkedList>
>
>
>
> Here is the error list produced during installation of java on octave3.2
>
>
>
>> pkg install -verbose J:\DOWNLOADS\OctavePackages\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
>
> __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 o
>
> ctave_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::st
>
> ring&, 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::st
>
> ring&, 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::strin
>
> g&, 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 octa
>
> ve_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::strin
>
> g&, 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:236: warning: unused variable 'clsCls'
>
> __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 __typeof__
> 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 __typeof__
> 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::read_java_opts(const
> std::string&)':
>
> __java__.cc:106: error: 'cerr' is not a member of 'std'
>
> __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:137: error: 'cout' is not a member of 'std'
>
> __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 '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: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
>
> __java__.cc:58: warning: 'octave_refcount' defined but not used
>
> __java__.cc:59: warning: 'octave_thread_ID' defined but not used
>
> __java__.cc:279: warning: 'void initialize_jvm()' defined but not used
>
> __java__.cc:432: warning: 'void terminate_jvm()' defined but not used
>
> mingw32-g++-4.3.0-dw2: __java__.o: No such file or directory
>
> make: *** [__java__.oct] Error 1
>
> 'make' returned the following error: make: Entering directory
> `/tmp/oct-2/java-1.2.6/src'
>
> if [ "XX" = "XX" ]; then \
>
>                 mkoctfile -DHAVE_OCTAVE_32 -v -DJAVAPKG_BUILD  -o
> __java__.oct __java__.cc -ladvapi3
>
> 2; \
>
>         else \
>
>                 mkoctfile -DHAVE_OCTAVE_32 -v -DJAVAPKG_BUILD
> -DJAVA_ARCH=\\\"\\\" -DJAVA_HOME=\\\"C
>
> :\Program Files\Java\jdk1.6.0_14\bin\\\"  -o __java__.oct __java__.cc
> -ladvapi32; \
>
>         fi
>
> mingw32-g++-4.3.0-dw2 -c -march=i686 -mtune=generic -O2
> -Id:\WindowsPrograms\Octave\3.2.0_gcc-4.3.
>
> 0\include\octave-3.2.0
> -Id:\WindowsPrograms\Octave\3.2.0_gcc-4.3.0\include\octave-3.2.0\octave
> -Id:\
>
> WindowsPrograms\Octave\3.2.0_gcc-4.3.0\include -mieee-fp  -D_DLL -Wall
> -DHAVE_OCTAVE_32 -DJAVAPKG
>
> _BUILD __java__.cc -o __java__.o
>
> mingw32-g++-4.3.0-dw2 -shared -Wl,--export-all-symbols
> -Wl,--enable-auto-import -Wl,--enable-runtime
>
> -pseudo-reloc -shared-libgcc -Wl,--exclude-libs=-lstdc++_s
> -Wl,--allow-multiple-definition  -o __jav
>
> a__.oct  __java__.o   -ladvapi32
> -Ld:\WindowsPrograms\Octave\3.2.0_gcc-4.3.0\lib\octave-3.2.0 -Ld:\W
>
> indowsPrograms\Octave\3.2.0_gcc-4.3.0\lib -loctinterp -loctave  -lcruft
> -shared-libgcc -Wl,--exclude
>
> -libs=-lstdc++_s -Wl,--allow-multiple-definition -llapack -lblas -lfftw3
> -lfftw3f -lreadline  -lncur
>
> ses -liberty -lblas -lhdf5 -lz -lm  -lgdi32 -lws2_32 -luser32 -lkernel32
> -lgfortran -lstdc++_s
>
> make: Leaving directory `/tmp/oct-2/java-1.2.6/src'
>
> error: called from `pkg>configure_make' in file
> D:\WindowsPrograms\Octave\3.2.0_gcc-4.3.0\share\octa
>
> ve\3.2.0\m\pkg\pkg.m near line 1255, column 2
>
> error: called from:
>
> error:
> D:\WindowsPrograms\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\pkg\pkg.m at
> line 714, colum
>
> n 5
>
> error:
> D:\WindowsPrograms\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\pkg\pkg.m at
> line 287, colum
>
> n 7
>
> octave-3.2.0.exe:2:D:\WindowsPrograms\Octave\3.2.0_gcc-4.3..0\bin
>
>> java_new ('java.util.LinkedList')
>
> error: `java_new' undefined near line 2 column 1
>
> octave-3.2.0.exe:2:D:\WindowsPrograms\Octave\3.2.0_gcc-4.3..0\bin
>
>> java_new ('java.util.LinkedList')
>
> error: `java_new' undefined near line 2 column 1
>
> octave-3.2.0.exe:2:D:\WindowsPrograms\Octave\3.2.0_gcc-4.3..0\bin
>
>
>
> Thank you!
>
> Prabhakar
>
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>



reply via email to

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