I tried this on Sun Solaris and I got another issue. The same error happened on the command line prompt. servername:[/export/home/rlokhand]/usr/bin/sh /usr/bin/who /usr/bin/who: syntax error at line 1: `(' unexpected If I execute /usr/bin/who it executes fine. Same thing with other unix commands like "ls". If I put this in a shell script and then execute that script using /usr/bin/ksh "full path-name of the script" this works fine. But I do not want to maintain another shell script. Is there a way around this? Thanks Raju Lokhande
>>> [EMAIL PROTECTED] 08/22/02 12:42PM >>> Hi, I have the following code in a servlet String tmp = "filename"; prPrintout pr = new prPrintout(); boolean hmm = pr.createFile(tmp +".html"); try { Runtime rt = Runtime.getRuntime(); Process p = rt.exec("/usr/local/bin/html2ps -o \""+tmp+".ps\" \""+tmp+".html\" "); p = rt.exec("lpr -Plp1 \""+tmp+".ps"); System.out.println("printing"); } catch(IOException e) { System.out.println(e);} and what its suppose to do is run html2ps on the html file i created with createFile, converting the html file to a ps file and then pringing the ps file.. but it doesnt do the converting nor the printing.. (when i do the commands via command promt it works fine, so its something in my code that i'm forgetting about..) tho it doesnt throw an exception and it does print my System.out.println("printing"); line.. Anyone know why? Thanks Sohaila ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ************************************************************************* This message, together with any attachments, is intended only for the use of the individual or entity to which it is addressed. It may contain information that is confidential and prohibited from disclosure. If you are not the intended recipient, you are hereby notified that any dissemination or copying of this message or any attachment is strictly prohibited. If you have received this message in error, please notify the original sender immediately by telephone or by return e-mail and delete this message along with any attachments, from your computer. Thank you. ************************************************************************* ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html