Hi Chansup:
CB wrote:
Hi Philip,
On Wed, Feb 16, 2011 at 4:17 PM, Philip Nienhuis<pr.nienh...@hccnet.nl> wrote:
<snip>
error:
/usr/local/octave/3.4.0/share/octave/packages/java-1.2.8/javaclasspath.m
at line 49, column 14
:
<snip>
Diagnosis:
the call to (compiled) function java_invoke() doesn't work. (That function
lives in java.oct. Is there a java.oct in
/usr/<local/>libexec/octave/packages/java-1.2.8 or its subdirs?)
I suspect the java package simply didn't get installed properly. This is
usually caused by java configuration problems - did you try
I check both OpenJDK and Sun JDK installation on FC11.
Both installation placed libjvm.so on the server directory, not the
client directory.
I believe this is the default behavio on FC11.
:
<snip>
:
I think the Java pkg installation works as long as I create the client
sym link to point to the server directory on FC11.
That's the only thing I had to.
My previous issue with dlgtet() was caused by the fact that I tried to
run it as a root without X11 forwarding (I didn't know the test was
generating a gui window).
The dlgtest and javamem functions worked fine but javaclasspath
function failed as shown below.
:
<snip>
:
octave:6> javaclasspath
error: [java] java.lang.ClassNotFoundException: getProperty
error: called from:
error:
/usr/local/octave/3.4.0/share/octave/packages/java-1.2.8/javaclasspath.m
at line 53, column 13
So,
1. The Java package generally installs & works OK. Good.
2. javaclasspath:
That's funny, the wrong argument order to java_invoke inside it was one
of the things I thought I'd fixed. I'll check again in svn.
Attached is a fixed javaclasspath.m, please put in place of the one in
/usr/local/share/octave/packages/java-1.2.8
(if you installed the java package as root I think it can be found
there. Otherwise you'll have to look around in your home dir.)
(BTW If you are curious you can compare the files around line 53)
Please report back if all works OK after this last fix.
Anyway, thank you very much for helping to check the Java package.
Best wishes,
Philip
## Copyright (C) 2007 Michael Goffioul, 2010 Martin Hepperle
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; If not, see <http://www.gnu.org/licenses/>.
## -*- texinfo -*-
## @deftypefn {Function file} {} javaclasspath
## @deftypefnx {Function file} {@var{STATIC} =} javaclasspath
## @deftypefnx {Function file} {[@var{STATIC}, @var{DYNAMIC}] =} javaclasspath
## @deftypefnx {Function file} {@var{PATH} =} javaclasspath (@var{WHAT})
##
## Returns the class path of the Java virtual machine in
## the form of a cell array of strings.
##
## If called without input parameter:@*
## @itemize
## @item If no output variable is given, the result is simply printed
## on the standard output.
## @item If one output variable @var{STATIC} is given, the result is
## the static classpath.
## @item If two output variables @var{STATIC} and @var{DYNAMIC} are
## given, the first variable will contain the static classpath,
## the second will be filled with the dynamic claspath.
## @end itemize
##
## If called with a single input parameter @var{WHAT}:@*
## @itemize
## @item If @var{WHAT} is '-static' the static classpath is returned.
## @item If @var{WHAT} is '-dynamic' the dynamic classpath is returned.'
## @item If @var{WHAT} is '-all' the static and the dynamic classpath
## are returned in a single cell array
## @end itemize
## @end deftypefn
## @seealso{javaaddpath,javarmpath}
function varargout = javaclasspath(which)
% dynamic classpath
dynamic_path = java_invoke ("org.octave.ClassHelper", "getClassPath");
dynamic_path_list = strsplit (dynamic_path, ';');
% static classpath
static_path = java_invoke ('java.lang.System', 'getProperty', 'java.class.path');
static_path_list = strsplit (static_path, ';');
if length(static_path_list) > 1
% remove first element (which is .../octave.jar)
static_path_list = static_path_list(2:length(static_path_list));
else
static_path_list = {};
end
switch nargin
case 0
switch nargout
case 0
disp_path_list ( 'STATIC', static_path_list )
disp('');
disp_path_list ( 'DYNAMIC', dynamic_path_list )
case 1
varargout{1} = cellstr (dynamic_path_list);
case 2
varargout{1} = cellstr (dynamic_path_list);
varargout{2} = cellstr (static_path_list);
endswitch
case 1
switch nargout
case 0
if strcmp(which,'-static') == 1
disp_path_list ( 'STATIC', static_path_list )
elseif strcmp(which,'-dynamic') == 1
disp_path_list ( 'DYNAMIC', dynamic_path_list )
end
case 1
if strcmp(which,'-static') == 1
varargout{1} = cellstr (static_path_list);
elseif strcmp(which,'-dynamic') == 1
varargout{1} = cellstr (dynamic_path_list);
elseif strcmp(which,'-all') == 1
varargout{1} = cellstr ([static_path_list,dynamic_path_list]);
end
endswitch
endswitch
end
#
# Display cell aray of paths
#
function disp_path_list ( which, path_list )
printf(' %s JAVA PATH\n\n', which);
if length(path_list) > 0
printf(' %s\n', path_list{:});
else
printf(' - empty -\n');
endif
end
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev