help-octave
[Top][All Lists]
Advanced

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

Re: Excel Data in Octave


From: Timothy Field
Subject: Re: Excel Data in Octave
Date: Thu, 26 Apr 2012 14:56:13 -0700 (PDT)

>Yes, please keep us informed on that.
>
>I do not know what is needed to get the java package installed on Mac OSX. 
>There are some comments in the source files (notably ./src/__java__.cc)
indicating some OSX support, >but AFAIK none of the people recently working
on the Java package have ever been able to test it on >OSX.
>
>If you succeed you could help me add the relevant info to the Octave wiki /
Java package section.
>
>As to .csv:
>The latest io package release has csv2cell, which seems to be able to read
mixed numeric/text info in >.csv files (a known stumbling block for many
other .csv reading functions). In addition it is *much* faster >then many
other text read functions.
>While csv2cell doesn't depend on Java, it is a compiled function, so I
think you'd need some sort of >development framework anyway.
>Hopefully the OSX gurus jump in to explain how to proceed.

Okay, it looks like OS X will have a JDK Pre-installed. It should be added
to the wiki that mac users should check for the most up to date version but
should have it installed through the software update program. On my machine
I confirmed that I had it by looking for it here:

> javac -version
javac 1.6.0_31
> which javac
/usr/bin/javac

Then for downloading the java package, with the file saved under a more
specific folder and the correct path added, I called 'pkg install -verbose
java-1.2.8.tar.gz' and got the following:

error: feval: function `java_exit' not found
error: feval: function `java_exit' not found
error: feval: function `java_exit' not found
./configure: line 3257: test: too many arguments
configure: WARNING: this package requires at least Java-1.5
mkdir (/var/tmp/oct-8pbW5P)
untar (java-1.2.8.tar.gz, /var/tmp/oct-8pbW5P)
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc-4.2 accepts -g... yes
checking for /usr/bin/gcc-4.2 option to accept ISO C89... none needed
checking for mkoctfile...
/Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.4.0
retrieving compile and link flags from
/Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.4.0
checking for F77_FUNC... yes
checking for octave...
/Applications/Octave.app/Contents/Resources/bin/octave-3.4.0
checking for OCTAVE_VERSION in Octave... 3.4.0
checking for octave_config_info('canonical_host_type') in Octave...
x86_64-apple-darwin10.7.3
checking for octave_config_info('SHLEXT') in Octave... dylib
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for strip... strip
checking for java... java
checking for javac... javac
checking for jar... jar
checking for Java version... 1.6.0_31
configure: creating ./config.status
config.status: creating Makeconf
 
  "$prefix" is /Users/timothyfield/octave/java-1.2.8
  "$exec_prefix" is ${prefix}

octave commands will install into the following directories:
   m-files:  
/Applications/Octave.app/Contents/Resources/share/octave/3.4.0/site/m/octave-forge
   oct-files:
/Applications/Octave.app/Contents/Resources/libexec/octave/3.4.0/site/oct/x86_64-apple-darwin10.7.3/octave-forge
   binaries: 
/Applications/Octave.app/Contents/Resources/libexec/octave/3.4.0/site/exec/x86_64-apple-darwin10.7.3
alternatives:
   m-files:  
/Applications/Octave.app/Contents/Resources/share/octave/3.4.0/site/octave-forge-alternatives/m
   oct-files:
/Applications/Octave.app/Contents/Resources/libexec/octave/3.4.0/site/octave-forge-alternatives/oct/x86_64-apple-darwin10.7.3

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:      /Applications/Octave.app/Contents/Resources/bin/octave-3.4.0
(version 3.4.0)
   mkoctfile:  
/Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.4.0 for Octave 0
   java:        Java Development Kit not found

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

Java support not compiled
warning: function /Users/timothyfield/octave/java-1.2.8/dlgtest.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/errordlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/helpdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/inputdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/java.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javaaddpath.m
shadows a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javaArray.m shadows
a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javaclasspath.m
shadows a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javafields.m shadows
a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javamem.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javamethods.m
shadows a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javarmpath.m shadows
a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/listdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/msgbox.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/questdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/warndlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/dlgtest.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/errordlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/helpdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/inputdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/java.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javaaddpath.m
shadows a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javaArray.m shadows
a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javaclasspath.m
shadows a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javafields.m shadows
a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javamem.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javamethods.m
shadows a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/javarmpath.m shadows
a core library function
warning: function /Users/timothyfield/octave/java-1.2.8/listdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/msgbox.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/questdlg.m shadows a
core library function
warning: function /Users/timothyfield/octave/java-1.2.8/warndlg.m shadows a
core library function


It looks like everything ran fine until it couldn't find the JDK. 'Java
support not compiled' (just before the shadows a core... list) doesn't sound
promising, but when I checked 'pkg list' it said that I had installed the
java package. So, even though I got those errors, it went through and did
the same for the io package. Then it said I had installed both:

octave-3.4.0:9> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          io *|  1.0.18 | /Users/timothyfield/octave/io-1.0.18
        java *|   1.2.8 | /Users/timothyfield/octave/java-1.2.8

When I call io specific functions with help, it now gives me proper
feedback, instead of "Sorry, this function hasn't been added to Octave yet".
But when I try to perform some basic io functions it doesn't work. Namely: 

octave-3.4.0:14> A = xlsread('ExcelDataTest.xls','Sheet1','A1:B7');
Detected XLS interfaces: 
None.
warning: No support for Excel .xls I/O
warning: xlsread: some elements in list of return values are undefined

Where ExcelDataTest.xls is an excel spreadsheet saved in a folder which I
called with addpath. I think the problem with 'No support for Excel .xls
I/O' has to do with the java support. If so, are there any red flags in the
error list above that signal that I'm missing important pieces to the java
package?

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Excel-Data-in-Octave-tp4590377p4591098.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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