do shell script vs. do script with command
do shell script vs. do script with command
- Subject: do shell script vs. do script with command
- From: "EU - Luca Pozzato" <email@hidden>
- Date: Sun, 10 Feb 2008 18:46:37 +0100
Hi everyboby,
I’m struggling tryng working with ujac (http://ujac.sourceforge.net/) – by the way I’m not a java
expert, but since I was able
to achieve some results with applescript and iText pdf library (http://www.lowagie.com/iText/),
I decide to try ujac components
in order to transform Xml to Pdf.
So far I’m able to produce a viable result thru the terminal or calling the terminal with
applescript,
but for some reason the "do shell script" command does not produce the expected result.
any help will be highly appreciated.
If the conversation will move from applescript to java (how to properly configure ujac, ect.)
I’ll be interested to continue it privately…
Thanks
Luca
--set up the classpath
set thepath to "/Library/Java/Extensions/"
set ujac_path to thepath & "ujac.jar"
set itext_path to thepath & "iText.jar"
set commons_path to thepath & "commons-logging.jar"
set theclasspath to ujac_path & ":" & itext_path & ":" & commons_path
--------------------------------------
--the string command
set thescript to "java -classpath " & theclasspath & " org.ujac.print.DocumentPrinter
/TEST_001/font-test.xml /TEST_001/font-test.pdf"
---------
----------------------------- test do shell script
--this produce an empty pdf (zero kb)
set mycommand to do shell script thescript
----------------------------- test terminal
--this produce the correct pdf
tell application "Terminal"
do script with command thescript
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden