broken horde
Newcomer
- Joined
- Jun 16, 2009
- Sythe Gold
- 0
- Messages
- 18
are there any rsc bots that work with a mac computer? please leave a link were i can download it.
why do you people not understand i do not know how to set them up i need help setting them up.. IM NOT GOOD WITH THIS TYPE OF STUFF... you tell me to set up a program ill have no idea what im doing you tell me to take apart a car or motorcycle ill know exactly what to do ... so yea. can someone hook me up with detailed instructions or message me on my aim or msn please
public static void openUrl(String url){
String os = System.getProperty("os.name");
Runtime runtime=Runtime.getRuntime();
try{
if (os.startsWith("Windows")){
String cmd = "rundll32 url.dll,FileProtocolHandler "+ url;
Process p = runtime.exec(cmd);
} else if(os.startsWith("Mac OS")){
Class fileMgr = Class.forName("com.apple.eio.FileManager");
Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] {String.class});
openURL.invoke(null, new Object[] {url});
}
} catch(Exception e) {
}
}
STS is Java, so I assume it would work with both.sts does work on a mac
Code:public static void openUrl(String url){ String os = System.getProperty("os.name"); Runtime runtime=Runtime.getRuntime(); try{ if (os.startsWith("Windows")){ String cmd = "rundll32 url.dll,FileProtocolHandler "+ url; Process p = runtime.exec(cmd); } else if(os.startsWith("Mac OS")){ Class fileMgr = Class.forName("com.apple.eio.FileManager"); Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] {String.class}); openURL.invoke(null, new Object[] {url}); } } catch(Exception e) { } }
as you can see it is in fact constructed for both OSes, im pretty sure it is in ALL sts versions, i know that is in the one i have on my site for download
public static void openUrl(String url){
try {
java.awt.Desktop.getDesktop().browse(new java.net.URI(url));
} catch (Throwable t) {
}
}

