Hi Monks,

Here I am, again with an another problem. I'm using PAR pp utility to pack my script with additional source directories (e.g. Java directory).

I was able to pack C:/Java directory within my packaged standalone TCExecutor.exe file. When I extract my TCExecutor.exe using 7zip, I see below directory structure-

C:\Perl\site\bin\TCExecutor>dir Volume in drive C has no label. Volume Serial Number is 9AA5-39F7 Directory of C:\Perl\site\bin\TCExecutor 10/18/2013 12:40 PM <DIR> . 10/18/2013 12:40 PM <DIR> .. 10/18/2013 12:40 PM <DIR> Java 10/18/2013 12:40 PM <DIR> lib 10/18/2013 12:35 PM 72,281 MANIFEST 10/18/2013 12:35 PM 221 META.yml 10/18/2013 12:40 PM <DIR> script 10/17/2013 08:24 PM <DIR> shlib 2 File(s) 72,502 bytes 6 Dir(s) 26,444,361,728 bytes free
This shows Java directory was packaged properly within TCExecutor.exe. I confirmed it by checking java.exe -version inside Java directory.

Problem begins when I run TCExecutor.exe. Actually, I called Java/bin/java.exe file inside TCExecutor.pl script using a system command as mentioned below-

system("..\\Java\\bin\\java.exe -jar Framework-1.0.1-tests.jar $testng +File")
and I get following error: ""..\Java\java.exe" failed to start: "The system cannot find the path specified..."

To breakdown this problem, I referred some documents related to PAR pp utility (e.g. PAR::Tutorial) and found that during execution, TCExecutor.exe is extracted in $ENV{PAR_TEMP} directory. This directory usually reside in user TEMP directory. I referred this directory and found Java directory is not extracted here. That is why my TCExecutor.exe is not able to find ..\\Java\\bin\\java.exe path. (this is what I assume, correct me if I'm wrong)

Below are the files available in $ENV{PAR_TEMP} directory -

C:\Users\ADMINI~1\AppData\Local\Temp\1\par-41646d696e6973747261746f72\ +cache-c683e77b9a89c807d6eafeca82ff209af7bf275f>dir Volume in drive C has no label. Volume Serial Number is 9AA5-39F7 Directory of C:\Users\ADMINI~1\AppData\Local\Temp\1\par-41646d696e697 +3747261746f72\cache-c683e77b9a89c807d6eafeca82ff209af7bf275f 10/18/2013 12:43 PM <DIR> . 10/18/2013 12:43 PM <DIR> .. 10/18/2013 12:43 PM 24,701 000c959d.dll 10/18/2013 12:42 PM 20,589 06c2d1e1.dll 10/18/2013 12:43 PM 28,776 0e6a4829.dll 10/18/2013 12:43 PM 32,878 16fbc221.dll 10/18/2013 12:42 PM 86,146 2026b6ac.dll 10/18/2013 12:43 PM 36,992 34cee907.dll 10/18/2013 12:43 PM 41,085 365ea864.dll 10/18/2013 12:42 PM 24,679 3ca67bd9.dll 10/18/2013 12:42 PM 20,590 3d6bfe4c.dll 10/18/2013 12:43 PM 82,048 49177082.dll 10/18/2013 12:42 PM 41,067 4b789922.dll 10/18/2013 12:43 PM 24,701 4f475e36.dll 10/18/2013 12:43 PM 82,033 615a54ca.dll 10/18/2013 12:43 PM 28,792 663e11bb.dll 10/18/2013 12:43 PM 24,681 6bc82cc9.dll 10/18/2013 12:43 PM 53,348 7b57d138.dll 10/18/2013 12:42 PM 24,698 9da5a0f2.dll 10/18/2013 12:43 PM 118,918 a12442c3.dll 10/18/2013 12:43 PM 31,555 c5fefe10.dll 10/18/2013 12:43 PM 20,593 d3979a66.dll 10/18/2013 12:42 PM 24,676 d43dc9e9.dll 10/18/2013 12:43 PM 57,463 d56fc451.dll 10/18/2013 12:43 PM 1,056,877 eb46b129.dll 10/18/2013 12:42 PM 24,670 f38abea4.dll 10/18/2013 12:43 PM 184,414 fca48d10.dll 10/18/2013 12:42 PM 20,603 feaf2452.dll 10/18/2013 12:42 PM 1,339,479 perl516.dll 10/18/2013 12:42 PM 53,248 TCExecutor.exe 28 File(s) 3,610,300 bytes 2 Dir(s) 26,444,226,560 bytes free

Please let me know your suggestions on how can I access Java/bin/java.exe file and trigger another child process using system call. What would be the root cause for this problem? OR if there are any other ways to access added directories using pp -a option.

Looking for your suggestions..


In reply to [PAR] Cannot Access extra files added within packaged executable by tarunmudgal4u

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.