octave-maintainers
[Top][All Lists]
Advanced

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

Re: java package - Mac Os X


From: PhilipNienhuis
Subject: Re: java package - Mac Os X
Date: Wed, 17 Jul 2013 12:01:25 -0700 (PDT)

CdeMills wrote
> 
> PhilipNienhuis wrote
>> @Pascal: 
>> 1. Very good on you that you got it to build. Thanks for that.
>> Next question: does the Java package really work? You could try by
>> loading the package and issueing the command:
>> javamem
>> in the Octave terminal. If you get no complaints about java_invoke or
>> javaMethod I suppose it's all OK.
>> If you get errors about Java framework or so not being found, chances are
>> that mixing 32 and 64 bit SW just doesn't work. 
>> E.g., on Windows 7 (64 bit) I cannot get 64 bit Java JRE to work with
>> 32-bit Octave, in spite of ov_java.oct and octave.jar being built
>> correctly (they do work with a 32 bit JRE). Hopefully on Mac OSX this
>> works better.
>> 
>> 2. Did you check with the Java stuff in core Octave? Rik has added
>> various mods to the files there that have been inherited from the Java
>> package. IIRC there is some mention of "Framework" in the sources.
>> Anyway I suppose your solution is also very worthwile for the development
>> version of Octave as Java support has been integrated in core. AFAIK it
>> never worked on OSX (is that right Ben?)
>> 
>> 3. Alexander Hansen mentioned that the locations of various parts of the
>> OSX Java Framework seem to be moved around with every new OSX release. Is
>> there a robust method to detect where they are located, so that
>> installing the Java package (and core Octave Java support) on OSX gets a
>> bit more reliable?
>> 
>> Because there are a few more patches to the Java package lying around in
>> the bug & patch trackers, perhaps it makes sense to make a new Java
>> package release - which may be a bit tricky as the sources have been
>> removed from Sourceforge SVN (a bit prematurely IMO).
>> (but I still got them on my local repos, as I've made the last few java
>> package releases).
>> 
>> Philip
> 1) java seems to work:
>  javamem
> 
> Java virtual machine (JVM) memory info:
> Maximum available memory:          123 MiB;
>    (...running garbage collector...)
> OK, current status:
> Total memory in virtual machine:    81 MiB;
> Free memory in virtual machine:     80 MiB;
> 2 CPUs available.
> octave> x = java_new ("java.lang.StringBuffer", "Initial string")
> x =
> <Java object: java.lang.StringBuffer>

That looks good. You're probably the first one in a long time who managed to
get the Java package to build on OSX.


> Unfortunatelly, xlsread still doesnt't work.

That is another issue.

>From an earlier post I understand you got the Apache POI .jar files in the
javaclasspath? at minimum you'll need these two for a plain .xls file (BIFF8
= Excel 97-2003):
- poi-3.x-<date>.jar
- poi-ooxml-3.x-<date>.jar
for .xlsx you'll need the other three as well (xmlbean, poi-ooxml-schemas,
dom4j)
(Just this week I spotted a bug in io-1.2.2 (private/chk_jar_entries.m) that
hampers detection of xbean.jar, so xmlbean.jar is better)
Maybe you got an .xls file in BIFF5 (= Excel 95)? POI cannot read that
(JExcelAPI / JXL can)

The easiest diagnostic to detect spreadsheet I/O problems is to run:

chk_spreadsheet_support ('', 3)    ## that's two consecutive quotes + 3 for
max debug output

As the Java detection scripts underlying this routine and some other
routines never have been tested on OSX (for obvious reasons), chances are
that it may not be able to run e.g.,:

jtst = (system ('java -version 2> /dev/null'))   ## L. 128

(line number refers to chk_spreadsheet_support.m in io-1.2.2)


> 2) no - I gave up compiling under Mac OS X and use 3.6.4 from macports.

I meant (but I wasn't clear) "did you look at the source code of the dev
version". 
In configure.ac there's a long section on Java detection which contains some
OSX sections.


> 3) I guess '/System/Library/Frameworks/JavaVM.framework/Home' should be a
> good starting point; it's in fact a symbolic link to the installed Java
> version. Same thing for
> /System/Library/Frameworks/JavaVM.framework/Libraries, under which a file
> libjvm.dylib can be found
> 
> From a pratical point of view: I work under Mac Os X in my lab, and the
> lab will close Friday for the summer vacations, until Aug, 21st. So I
> won't be able to test patches and new packages in between.

yep summer holiday comes close for me too :-)

Philip



--
View this message in context: 
http://octave.1599824.n4.nabble.com/java-package-Mac-Os-X-tp4655701p4655784.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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