AUTOPDPAUTOPDPRE: AUTOPDPSwantehttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=6573762016-09-04T09:44:57Z2016-09-04T09:44:57ZThank you WilfridSwante2016-09-04T09:44:57ZRE: AUTOPDPWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=6570692016-09-03T10:28:42Z2016-09-03T10:28:42ZDear Swante,<br /><br />the approach you describe here is a feasible way to get your executable running. <br />Another way is to have it directly in the installation folder and get it to work without the need to copy things. The GET_PATH AdoScript command would return the installation directory and you can the execute from there (similar as the CWD returns the install dir of the tool). <br /><br />It is up to you how you would like the build engine to have the file, as part of the library you have more control as it is part of the configuration rather than the build job. Please let us know in a small read me as part of the autopdp build job how you would like us to handle the extension when configuring the job. <br /><br />Thanks, wilfridWilfrid Utz2016-09-03T10:28:42ZAUTOPDPSwantehttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=6559652016-08-31T15:20:31Z2016-08-31T15:19:25ZHello,<br /><br />I'm planing to built a standalone version soon. I've written a small executable jar which is currently in the filestroage. I've added a small Procedurece in AppInitalized which copies the jar into the temp dir (I've had right problems with cwd) and executes it via SYSTEM. This works good! <br />I've read that you can add your extension for building your standalone software. Point 1.1.3 in<br />https://www.adoxx.org/live/documents/10157/4213f6ff-1b8a-4d25-92df-0b8649f0a7b4<br /><br /> But I don't understand how to access them via AdoScript to execute the jar?<br /><br />My current apporoach:<br /><div class="code"><span class="code-lines"> 1</span>CC "AdoScript" GET_TEMP_FILENAME<br /><span class="code-lines"> 2</span>#--> RESULT filename:strValue<br /><span class="code-lines"> 3</span>SETG jar_file:(copy(filename, 0, (bsearch(filename,"\\", LEN filename))+1) + "JavaExport.jar")<br /><span class="code-lines"> 4</span><br /><span class="code-lines"> 5</span><br /><span class="code-lines"> 6</span># ---------------------------------------------------<br /><span class="code-lines"> 7</span># Execute the jar.<br /><span class="code-lines"> 8</span># @in_args string Arguments for Java call<br /><span class="code-lines"> 9</span># @in_message string Message which occour during execution<br /><span class="code-lines">10</span># @in_debug integer 1 = show Java call, else not<br /><span class="code-lines">11</span># @out_out_file string absolute path to out file<br /><span class="code-lines">12</span># @out_error_file string absolute path to err file<br /><span class="code-lines">13</span># ---------------------------------------------------<br /><span class="code-lines">14</span>PROCEDURE global EXECUTE_JAVA in_args: string<br /><span class="code-lines">15</span> in_message: string<br /><span class="code-lines">16</span> in_debug: integer<br /><span class="code-lines">17</span> in_out_file_format: string<br /><span class="code-lines">18</span> out_out_file: reference<br /><span class="code-lines">19</span> out_error_file: reference<br /><span class="code-lines">20</span>{<br /><span class="code-lines">21</span> <br /><span class="code-lines">22</span> CC "AdoScript" MSGWIN (in_message)<br /><span class="code-lines">23</span> <br /><span class="code-lines">24</span> # set stream files<br /><span class="code-lines">25</span> CC "AdoScript" GET_TEMP_FILENAME<br /><span class="code-lines">26</span> SETL out_out_file:(filename + "." + in_out_file_format)<br /><span class="code-lines">27</span> <br /><span class="code-lines">28</span> CC "AdoScript" GET_TEMP_FILENAME<br /><span class="code-lines">29</span> SETL out_error_file:(filename + ".txt") <br /><span class="code-lines">30</span> <br /><span class="code-lines">31</span> CC "AdoScript" FILE_EXISTS file: (jar_file)<br /><span class="code-lines">32</span> # -->RESULT exists: 1|0<br /><span class="code-lines">33</span> <br /><span class="code-lines">34</span> #do the file exists?<br /><span class="code-lines">35</span> IF (exists = 0) {<br /><span class="code-lines">36</span> CC "AdoScript" FILE_COPY from:(skriptPath + "JavaExport.jar") to:(jar_file)<br /><span class="code-lines">37</span> }<br /><span class="code-lines">38</span><br /><span class="code-lines">39</span> SETL statement: ("java -jar " + jar_file + " -out_file " + out_out_file + " -error_file " + out_error_file + " " + in_args)<br /><span class="code-lines">40</span> <br /><span class="code-lines">41</span> IF (in_debug = 1) {<br /><span class="code-lines">42</span> CC "AdoScript" EDITBOX text:(statement)<br /><span class="code-lines">43</span> }<br /><span class="code-lines">44</span> SYSTEM (statement)<br /><span class="code-lines">45</span> <br /><span class="code-lines">46</span> CC "AdoScript" MSGWIN hide<br /><span class="code-lines">47</span>}<br /></div>Swante2016-08-31T15:19:25Z