Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request Help about terminet command



To avoid problems, you want to use the version of exec() that takes an array of strings as an argument -
something like:


String[] args = { "networksetup", "-setwebproxy", "Built-in Ethernet", "202.115.32.31", "80" };
runtime.exec( args );


In your example, the "Built-in Ethernet" parameter is not seen as you intended, as just one thing...
(note the error message you get).


Moises

you wrote:
Hi everyone,
   i run the command "networksetup -setwebproxy "Built-in Ethernet"
202.115.32.31 80" in the  terminet,it is successful,and i check  up
the System  Network preference ,the Proxy has been set  successfully.
  i program to implement this function with java.like this:
  Runtime runtime=Runtime.getRuntime();
 runtime.exec("networksetup -setwebproxy   "+"  \""+"Built-in
Ethernet"+"\"   "+" 202.115.32.31 80");
it doesn't run successfully. and display the message:Built-in is not a
recongnized network service.
why ??
  Thank you :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >request Help about terminet command (From: "æ™“į‘œįŽ€" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.