Martin,
That seems to be a CLASSPATH problem.
What you can do is enable debugging using 'DEBUG => 1' (it's quite a mess,
we'll fix that soon...) and save the
output to a file. You can then search for 'classpath' and see if everything
is set properly when the
JVM is launched.
Cheers,
Patrick
----- Original Message -----
From: "Martin Korb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 6:54 PM
Subject: inline java in module
I using Java code in one of my modules. The sub Task is called from a
perlscript or a perlscript running as a service.
When I use the code in sub Task as a standalone perlscript is works fine.
However if the code is called in the module it gives me the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: InlineJavaServer
In either scenerios the calling scripts are in the same directories. Any
ideas what is going on?
sub Task {
my $caseID_file = shift;
my $indexDir = "p:\\dtSearch_Indexes\\martintest";
my $allindex = new DtSearchIndex($indexDir, $caseID_file);
use Inline (
Java => <<'END',
import com.dtsearch.engine.*;
import java.lang.*;
import java.util.*;
import java.text.*;
class DtSearchIndex
{
com.dtsearch.engine.IndexJob m_indexJob = null;
private String indexPath;
private String fileName;
public String data;
//constuctor
public DtSearchIndex(String indexPath,String fileName)
{
this.indexPath = indexPath;
this.fileName = fileName;
run(indexPath,fileName);
}
public void run(String path,String file)
{
setupIndexJob(path,file);
m_indexJob.execute();
data = path + file;
}
public void setupIndexJob(String martinIndex, String file)
{
m_indexJob = new IndexJob();
m_indexJob.setIndexPath(martinIndex);
m_indexJob.setFoldersToIndex(file);
m_indexJob.setActionAdd(true);
// m_indexJob.setActionCreate(true);
}
}
END
CLASSPATH=>'d:\\jdk1.3\perlish',
);
}
1;