Problem with Java package

View: New views
5 Messages — Rating Filter:   Alert me  

Problem with Java package

by AlexG1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm having trouble using the Java package from Octave forge.
I've installed the package but java_invoke, java_new etc. are undefined when I try to use them.

My configuration:
Windows Vista
Octave v3.2.3
Java package v1.2.6 (I've also tried using the newest sources from SVN as suggested by Michael Goffioul, author of the package)

Below is the output of 'pkg install -verbose java-1.2.6.tar.gz', seems like the JDK wasn't found although I defined the env variable JAVA_HOME = 'C:\Programs\Java\jdk1.6.0_16' :

--------------------------------------------------------------------------

mkdir (C:\Users\Alex\AppData\Local\Temp\oct-4)
untar (java-1.2.6.tar.gz, C:\Users\Alex\AppData\Local\Temp\oct-4)
checking for gcc... mingw32-gcc-4.4.0-dw2
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mingw32-gcc-4.4.0-dw2 accepts -g... yes
checking for mingw32-gcc-4.4.0-dw2 option to accept ISO C89... none needed
checking for mkoctfile... mkoctfile
retrieving compile and link flags from mkoctfile
checking for F77_FUNC... yes
checking for octave... octave
checking for OCTAVE_VERSION in Octave... 3.2.3
checking for octave_config_info('canonical_host_type') in Octave... i686-pc-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for strip... strip
checking for java... /c/Windows/system32/java
checking for javac... no
checking for jar... no
configure: creating ./config.status
config.status: creating Makeconf
 
  "$prefix" is C:/Octave/share/octave/packages/java-1.2.6
  "$exec_prefix" is ${prefix}

octave commands will install into the following directories:
   m-files:   /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/share/octave/3.2.3/site/m/octave-forge
   oct-files: /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/oct/i686-pc-mingw32/octave-forge
   binaries:  /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/exec/i686-pc-mingw32
alternatives:
   m-files:   /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/share/octave/3.2.3/site/octave-forge-alternatives/m
   oct-files: /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/octave-forge-alternatives/oct/i686-pc-mingw32

shell commands will install into the following directories:
   binaries:  ${exec_prefix}/bin
   man pages: ${datarootdir}/man
   libraries: ${exec_prefix}/lib
   headers:   ${prefix}/include

octave-forge is configured with
   octave:      octave (version 3.2.3)
   mkoctfile: mkoctfile for Octave 3
   java:        Java Development Kit not found

find . -name NOINSTALL -print    # shows which toolboxes won't be installed

make: Entering directory `/tmp/oct-4/java-1.2.6/src'
Java support not compiled
make: Leaving directory `/tmp/oct-4/java-1.2.6/src'
octave-3.2.3.exe:5:C:\Octave

Re: Problem with Java package

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 12, 2009 at 9:08 PM, AlexG1 <alxgel@...> wrote:
> checking for java... /c/Windows/system32/java
> checking for javac... no
> checking for jar... no

Make sure JDK bin directory is in your PATH. The configure
script can't find the java compiler, neither the java archiver.

Michael.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Problem with Java package

by AlexG1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Goffioul-2 wrote:
Make sure JDK bin directory is in your PATH. The configure
script can't find the java compiler, neither the java archiver.

Michael.
Ok, that made some progress. I added the following dirs:

C:\Program Files\Java\jdk1.6.0_16\bin
C:\Program Files\Java\jdk1.6.0_16

to the PATH environment variable.

Now the script finds javac and jar but still can't find the JDK:

=============================================

> pkg -verbose install java-1.2.6.tar.gz
mkdir (C:\Users\Alex\AppData\Local\Temp\oct-4)
untar (java-1.2.6.tar.gz, C:\Users\Alex\AppData\Local\Temp\oct-4)
checking for gcc... mingw32-gcc-4.4.0-dw2
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mingw32-gcc-4.4.0-dw2 accepts -g... yes
checking for mingw32-gcc-4.4.0-dw2 option to accept ISO C89... none needed
checking for mkoctfile... mkoctfile
retrieving compile and link flags from mkoctfile
checking for F77_FUNC... yes
checking for octave... octave
checking for OCTAVE_VERSION in Octave... 3.2.3
checking for octave_config_info('canonical_host_type') in Octave... i686-pc-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for strip... strip
checking for java... /c/Windows/system32/java
checking for javac... /c/Program Files/Java/jdk1.6.0_16/bin/javac
checking for jar... /c/Program Files/Java/jdk1.6.0_16/bin/jar
checking for Java version... 1.6.0_16
configure: creating ./config.status
config.status: creating Makeconf
 
  "$prefix" is C:/Octave/share/octave/packages/java-1.2.6
  "$exec_prefix" is ${prefix}

octave commands will install into the following directories:
   m-files:   /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/share/octave/3.2.3/site/m/octave-forge
   oct-files: /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/oct/i686-pc-mingw32/octave-forge
   binaries:  /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/exec/i686-pc-mingw32
alternatives:
   m-files:   /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/share/octave/3.2.3/site/octave-forge-alternatives/m
   oct-files: /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/octave-forge-alternatives/oct/i686-pc-mingw32

shell commands will install into the following directories:
   binaries:  ${exec_prefix}/bin
   man pages: ${datarootdir}/man
   libraries: ${exec_prefix}/lib
   headers:   ${prefix}/include

octave-forge is configured with
   octave:      octave (version 3.2.3)
   mkoctfile: mkoctfile for Octave 3
   java:        Java Development Kit not found

find . -name NOINSTALL -print    # shows which toolboxes won't be installed

make: Entering directory `/tmp/oct-4/java-1.2.6/src'
Java support not compiled
make: Leaving directory `/tmp/oct-4/java-1.2.6/src'
octave-3.2.3.exe:5:C:\Octave


Re: Problem with Java package

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You might also need to add JDK include directories to CPPFLAGS.

Michael.


On Fri, Nov 13, 2009 at 12:42 PM, AlexG1 <alxgel@...> wrote:

>
>
> Michael Goffioul-2 wrote:
>>
>>
>> Make sure JDK bin directory is in your PATH. The configure
>> script can't find the java compiler, neither the java archiver.
>>
>> Michael.
>>
>
> Ok, that made some progress. I added the following dirs:
>
> C:\Program Files\Java\jdk1.6.0_16\bin
> C:\Program Files\Java\jdk1.6.0_16
>
> to the PATH environment variable.
>
> Now the script finds javac and jar but still can't find the JDK:
>
> =============================================
>
>> pkg -verbose install java-1.2.6.tar.gz
> mkdir (C:\Users\Alex\AppData\Local\Temp\oct-4)
> untar (java-1.2.6.tar.gz, C:\Users\Alex\AppData\Local\Temp\oct-4)
> checking for gcc... mingw32-gcc-4.4.0-dw2
> checking for C compiler default output file name... a.exe
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... .exe
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether mingw32-gcc-4.4.0-dw2 accepts -g... yes
> checking for mingw32-gcc-4.4.0-dw2 option to accept ISO C89... none needed
> checking for mkoctfile... mkoctfile
> retrieving compile and link flags from mkoctfile
> checking for F77_FUNC... yes
> checking for octave... octave
> checking for OCTAVE_VERSION in Octave... 3.2.3
> checking for octave_config_info('canonical_host_type') in Octave...
> i686-pc-mingw32
> checking for octave_config_info('SHLEXT') in Octave... dll
> checking whether ln -s works... yes
> checking for ranlib... ranlib
> checking for strip... strip
> checking for java... /c/Windows/system32/java
> checking for javac... /c/Program Files/Java/jdk1.6.0_16/bin/javac
> checking for jar... /c/Program Files/Java/jdk1.6.0_16/bin/jar
> checking for Java version... 1.6.0_16
> configure: creating ./config.status
> config.status: creating Makeconf
>
>  "$prefix" is C:/Octave/share/octave/packages/java-1.2.6
>  "$exec_prefix" is ${prefix}
>
> octave commands will install into the following directories:
>   m-files:
> /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/share/octave/3.2.3/site/m/octave-forge
>   oct-files:
> /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/oct/i686-pc-mingw32/octave-forge
>   binaries:
> /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/exec/i686-pc-mingw32
> alternatives:
>   m-files:
> /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/share/octave/3.2.3/site/octave-forge-alternatives/m
>   oct-files:
> /usr/local/octmgw32_gcc-4.4.0-dw2/octave/3.2.3-4/libexec/octave/3.2.3/site/octave-forge-alternatives/oct/i686-pc-mingw32
>
> shell commands will install into the following directories:
>   binaries:  ${exec_prefix}/bin
>   man pages: ${datarootdir}/man
>   libraries: ${exec_prefix}/lib
>   headers:   ${prefix}/include
>
> octave-forge is configured with
>   octave:      octave (version 3.2.3)
>   mkoctfile:   mkoctfile for Octave 3
>   java:        Java Development Kit not found
>
> find . -name NOINSTALL -print    # shows which toolboxes won't be installed
>
> make: Entering directory `/tmp/oct-4/java-1.2.6/src'
> Java support not compiled
> make: Leaving directory `/tmp/oct-4/java-1.2.6/src'
> octave-3.2.3.exe:5:C:\Octave
>
>
> --
> View this message in context: http://old.nabble.com/Problem-with-Java-package-tp26326444p26336025.html
> Sent from the octave-dev mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Octave-dev mailing list
> Octave-dev@...
> https://lists.sourceforge.net/lists/listinfo/octave-dev
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Problem with Java package

by AlexG1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It didn't work, but I'm not sure I'm doing this the right way.
I defined an env variable called CPPFLAGS to:

C:\Programs Files\Java\jdk1.6.0_16\include;
C:\Programs Files\Java\jdk1.6.0_16\include\win32

(I tried prepending -I, -I/, reversing the slashes and using Progra~1 instead of Program Files, nothing worked).

Is that what you meant?

Michael Goffioul-2 wrote:
You might also need to add JDK include directories to CPPFLAGS.

Michael.