cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a java class from File adapter

0 Kudos

Hi

In my sender file adapter, I want to use the option "Run operating system command before message processing". In the command I want to execute a java class (java classname.class). This java class will create a text file and that needs to picked up by the file sender file adater. I guess this will work?. Please correct me if I am wrong.

My questions are (Assuming the above will work):

1. Which location (recomended) do I need put this class file in PI box ( its win 2003 server).

2. I can't find any environment variable for classpath. How do I setup my classpath so that adapter can find this class?.

I've copied the .class file (the whole package directory) into several XI directories that contains JAR files but without any success.

Your help is appreciated.

Thanks

Job.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you tried to pack your class on jar file (with manifest using Main-Class: <your class>) and call like this:

java c:\app.jar ?

Best regards

0 Kudos

Hi It worked. I just created a executable jar file and worked.

Thanks

Job.

Edited by: Job Daniel on Apr 30, 2009 6:23 PM

Answers (0)