You're using ActiveState Perl under windows?

----- Original Message -----
From: "Martin Korb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, 23 May, 2002 18:54
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;



Reply via email to