Yeah, It's run ok.
java.lang.Runtime.getRuntime().exec() just can run *.exe file, or can use
exec("c:\\WINNT\\system32\\cmd.exe /c c:\\kkk.bat") to run *.bat file, it can
not be able to run Operating System within command.
Thanks all.
ZhaoBin
----- Original Message -----
From: "Liu Shunxin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 10:47 AM
Subject: Re: Executing a unix commmand in jsp
> Please pay attention to the exception "java.io.IOException: CreateProcess:
> mkdir c:\kkk error=2", this may means mkdir file is not found while creating
> process. Try another .exe executable file.
>
> good luck.
>
> ----- Original Message -----
> From: "ZhaoBin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 28, 2001 10:12 AM
> Subject: Re: Executing a unix commmand in jsp
>
>
> > Hi all,
> > How can i executing a Operating command in java ? as below ?
> > public class Exec {
> > public static void main(String[] args) {
> > System.out.println("Begin");
> > Runtime r= java.lang.Runtime.getRuntime();
> > System.out.println("r.totalMemory()="+r.totalMemory());
> > System.out.println("r.freeMemory()="+r.freeMemory());
> > try {
> > r.exec("mkdir c:\\kkk");
> > }
> > catch (Exception ex) {
> > ex.printStackTrace();
> > }
> >
> > }
> > }
> > Why I get such Error message ?
> > Begin
> > r.totalMemory()=2031616
> > r.freeMemory()=1842840
> > java.io.IOException: CreateProcess: mkdir c:\kkk error=2
> > at java.lang.Win32Process.create(Native Method)
> > at java.lang.Win32Process.<init>(Win32Process.java:66)
>
> > at java.lang.Runtime.execInternal(Native Method)
> > at java.lang.Runtime.exec(Runtime.java:551)
> > at java.lang.Runtime.exec(Runtime.java:418)
> > at java.lang.Runtime.exec(Runtime.java:361)
> > at java.lang.Runtime.exec(Runtime.java:325)
> > at Exec.main(Exec.java:9)
> > You help will be appreciated.
> > Best Regards.
> > ZhaoBin
> >
> >
> > ----- Original Message -----
> > From: "Chris Pratt" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 28, 2001 4:42 AM
> > Subject: Re: Executing a unix commmand in jsp
> >
> >
> > > Take a look at the java.lang.Runtime.exec() methods.
> > > (*Chris*)
> > >
> > > ----- Original Message -----
> > > From: "Mihir Sahu" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, June 27, 2001 1:24 PM
> > > Subject: [JSP-INTEREST] Executing a unix commmand in jsp
> > >
> > >
> > > > Hi all,
> > > > Can anybody help me in telling how to execute a operating system
> > > command in a
> > > > jsp page. Thanks
> > > > Regards
> > > > Mihir
> > > >
> > > > horwat wrote:
> > > >
> > > > > A friend of mine, Greg Murray, created MightyJ, an IDE written in
> java.
> > > It
> > > > > is extendable through a plugin mechanism which allows plugins to be
> > > loaded
> > > > > manually or over the web. It currently has a search and zip viewer
> > > plugins
> > > > > which you may find useful.
> > > > >
> > > > > http://www.mightyj.com/
> > > > >
> > > > > Justy
> > > > >
> > > > > ----- Original Message -----
> > > > >
> > > > > > Does anyone know where I can get a tool that will search jars,
> zips,
> > > etc.
> > > > > > for a specific class file and it's directory...
> > > > > > _________________________________________________________________
> > > > > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > > > > >
> > > > > >
> > > > >
> > >
> ===========================================================================
> >
> > H???#?????��?ڪ?z;)??'?W
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
��칻�&ޙ����b����ڽ�.��&�+an�r�('���H�
LDDI1h�ؠz�fj)m�X��ǫ�6�j˧r����[�ܬz�R<�SL2$Ңg�zW�j{E(����'��W��Ƨm��wZ�m���j���w(��k�ۜ��㲟�j�m�Xm����
���j{h��'��������٥��i��0�8.��(��ົ�}��}��j���ڙ�R>m����ົ��o�������������gjg�z��z�