senthil_v has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

Can you please Give me solution for this problem. I have written file processing script. Files are reading from directory. Script was working fine only. That script has integrated with java module(Separate Thread were calling). when call the perl script, it process files from directory, it took and processed only 2 file out of 500 files. but when i ran the alone as perl scipt, it was processed all 500 files. but after integrated into java code it processed only 2files. let me know the problem?

Thanks and Regards,

Senthil.V

  • Comment on Problem in java with Perl Integration...

Replies are listed 'Best First'.
Re: Problem in java with Perl Integration...
by Corion (Patriarch) on Aug 23, 2011 at 06:55 UTC

    The problem is how your Java program calls your Perl script. Most likely, the working directory is not the same and/or the permissions that the Perl script is run as.

    As you don't show any code, this is all guesswork. Please take the time to reduce your Perl program to a small, 10 line program that still exhibits the same problem, and post that.

      His problem is on line 6,385 in the 14th file of his JAVA objects projects definition... :)
Re: Problem in java with Perl Integration...
by Anonymous Monk on Aug 23, 2011 at 06:50 UTC

    Let me know the problem?

    Please read How do I post a question effectively?

    The only answer I can think of , is the code you wrote is the problem ... need more information, not vague descriptions

Re: Problem in java with Perl Integration...
by locked_user sundialsvc4 (Abbot) on Aug 23, 2011 at 14:56 UTC

    Undoubtedly, the Perl script crashed when run in its new context, and the Java environment “ate” the error messages instead of reporting them to you.

    Is the program being called by one thread, or by many?   If the latter, there most likely is your problem.