RunJava
Current command line parsers on the Contenta (Portal) server and the Contenta Explorer client do not support java syntax so interp java cannot be used in the command line syntax to execute a tool.
Instead, use a Perl script to call JAVA.
Create the script named runjava.pl in the Contenta_home/encaps directory; the contents of the file should be as follows.
#!perl
#====================================================
# Copyright 2000 SDL Structured Content Technologies
# Division.
#
# All rights reserved. No part of this document may
# be reproduced, in any form or by any means, without
# prior written permission from SDL.
#====================================================
use Getopt::Long;
my $a = "";
my $class;
while ( @ARGV > 0 ) {
my $opt = shift (@ARGV);
if ($opt =~ m/^\-(((\-?)class)|\-)$/)
{
$class = shift(@ARGV);
$opt = shift(@ARGV);
}
my $value = shift(@ARGV);
$a = $a." ".$opt." \"".$value."\"";
}
my $classpath=".;".$ENV{CLASSPATH};
exec java, "-cp", $classpath, $class, $a;
Define the tool in pcmadmin using the following command-line syntax:
interp perl runjava.pl -class <java_class_name> <tool_args>
where <java_class_name> is the file name of your JAVA program or tool and <tool_args> are any arguments that you can use for your JAVA program or tool.
The JAVA program or tool must be located in a path defined in $classpath.