Swift, Ted J. wrote:
>
>
>
>
> -----Original Message-----
> From: Philip Nienhuis [mailto:pr.nienh...@hccnet.nl]
> Sent: Wednesday, September 26, 2012 12:16 AM
> To: Swift, Ted J.
> Cc: help-oct...@octave.org
> Subject: Re: [OctDev] xlread in 3.6.1
>>
> <snip>
>>
>> Swift, Ted J. wrote:
>>> -----Original Message-----
>>> From: prnienh...@users.sf.net [mailto:prnienh...@users.sf.net]
>>> Sent: Thursday, September 13, 2012 1:41 AM
>>> To: Swift, Ted J.
>>> Subject: FWD: Re: [OctDev] xlread in 3.6.1
>>>
>>> TedSwift [via Octave] wrote:
>>>>> I've followed this thread, but am still not able to get
>>>>> chk_spreadsheet_support to check out right. After putting Java in
>>>>> what I thought was the right place, these are the results of my last
>>>>> check:
>>>>>
>>>>> octave:5>   chk_spreadsheet_support ('', 3)
>>>>>
>>>>> Checking Excel/ActiveX/COM... not working.
>>>>>
>>>>> Checking Java support...
>>>>> 1. Checking Java JRE presence.... OK, found one.
>>>>> 2. Checking Octave Java support... error: No Java support found:
>>>>> `java_invoke' undefined near line 49 column 16.
>>> =>   no or improperly installed Java package.
>>>
>>>>> error: called from:
>>>>> error:
>>>>> C:/Octave/Octave3.6.1_gcc4.6.2/share/octave/packages\io-1.0.18\chk_s
>>>>> preadsheet_support.m
>>>>> at line 176, column 3
>>>>>
>>>>> Something fundamental is still missing, or I don't have the setenv
>>>>> path set right. Are there any other diagnostic tools that will help
>>>>> me figure out where the breakdown is? Thanks, all.
>>> Try to run the newest Java package preinstall.m before your next attempt to 
>>> install the Java package (any version).
>>> This file is in the svn repo here:
>>>
>>> http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/ext
>>> ra/java/pre_install.m?sortby=rev&view=log
>>> (watch for line wrap, take revision 10760, "download" or "as text", be
>>> sure to save it as a .m-file, and run it in Octave)
>>>
>>> I've only recently committed it in an attempt to avoid half-baked Java 
>>> package installations.
>>> It'll check where Octave should look for the jvm lib and the executables 
>>> and will complain if any of them is not found.
>>>
>>> I think the fact that the Java package installer not being able to find the 
>>> Java executables (java, jar, javac) in the place it expects them to be was 
>>> the creepy showstopper in many frustrating cases.
>>> You might make symlinks to them in your $PATH (in my Mageia 2 linux 
>>> installation they seem to be silently created in /usr/bin by urpmi).
>>>
>>> Please copy preinstall.m's error msg (if any) in a reply mail. For me 
>>> that's handy to have, because I might decide to implement (parts of) 
>>> preinstall.m's functionality in chk_spreadsheet_support as well.
>>>
>>> BTW I've also recently updated the Octave wiki on exactly this subject:
>>> http://wiki.octave.org/Java_package#Make_sure_that_the_build_environme
>>> nt_is_configured_properly
>>> (line wrap!)
>>   >
>>   >  Philip,
>>   >  Thank you very much for the advice and pointers. And sorry for the>  
>> delay in replying; I was busy last week being part of the>  organizing team 
>> for a scientific conference.
>>   >  Thanks for writing pre_install.m. I downloaded it and tried it,>  but 
>> it didn't provide any new insight: It did not return any errors.
>>   >  However, after I ran pre_install, I immediately ran>  
>> chk_spreadsheet_support, and received the same error I've received>  before. 
>> Here's the transcript:
>>   >
>>   >>  GNU Octave, version 3.6.1
>> <snip>
>>   >>  octave:1>   pwd
>>   >>  ans = C:\Users\tswift
>>   >>  octave:2>   run pre_install.m                    %<--------- NOTE: No
>>   >>  error returned
>>
>> You should have just typed:
>>
>> preinstall
>>
>> and watch the output. No "run", no ".m" suffix. Just:
>> preinstall
>>
>> Note: scripts and function files seem to run better if invoked with just 
>> their file name w/o suffix.
>>
>> Philip
>
>   --------
> Hello again, Philip,
> I'm going back to the basics and taking a close look at
> http://wiki.octave.org/Java_package#Make_sure_that_the_build_environment_is_configured_properly
>
> I looked for where the JDK was installed and it is in (recall this is in 
> Windows 7; sorry)
>
> C:\Program Files (x86)\Java\jdk1.7.0_05
>
> After setting the environment in octaverc:
>
>> setenv('JAVA_HOME','C:/Program Files (x86)/Java/jdk1.7.0_05');
>
> I launched Octave again, and invoked pre_install again. This time it returned 
> silently, no errors.:
>
>> octave:1>  pwd
>> ans = C:\Users\tswift
>> octave:2>  pre_install
>> octave:3>  chk_spreadsheet_support('',3)
>>
>> Checking Excel/ActiveX/COM... not working.
>>
>> Checking Java support...
>>    1. Checking Java JRE presence.... OK, found one.
>>    2. Checking Octave Java support... error: No Java support found: 
>> `java_invoke' undefined near line 49 column 16.
>> error: called from:
>> error:   
>> C:/Octave/Octave3.6.1_gcc4.6.2/share/octave/packages\io-1.0.18\chk_spreadsheet_support.m
>>  at line 176, column 3
>> octave:3>  system ('javac -version 2>  nul')
>> ans =  1
>> octave:4>  system ('javac -version 2>  null')
>> ans =  1
>> octave:5>
>
>
> In the file 'null' is the message:
>> 'javac' is not recognized as an internal or external command,
>> operable program or batch file.
>
> There is a javac in the /bin subdirectory, however.
> Any thoughts? Thank you.

Please keep list cc'd

Yes; clearly javac isn't in the PATH. Which makes sense as on Windows 
systems, the <JDK>/bin directory is usually not in the PATH, unlike *nix 
systems where there are usually symlinks to java, javac and jar in /usr/bin

Apparently the relevant statements in preinstall.m that should fix this 
don't work properly.
So what you can do, in Octave, is (after setting JAVA_HOME):

  setenv ("PATH", [getenv('PATH') pathsep '/full/path/to/JDK/bin'])

(single quotes) where I suppose (but please check) that 
'/full/path/to/JDK/bin' boils down to
'C:/Program Files (x86)/Java/jdk1.7.0_05/bin'
and then again try to install the Java package.
If it doesn't work, try again with backslashes instead of forward slashes.

If none of this works I'm out of ideas.

Philip

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to