When I run this in my Windows command prompt it opens the default browser and loads the respective page:
START: http://google.com
I am trying to do the same thing with the Java code below but get an error message.
Runtime.getRuntime().exec(new String[] {"START", "http://google.com"});
This is the error I am getting:
Exception in thread "main" java.io.IOException: Cannot run program "START": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at Test2.main(Test2.java:78)
I am running Windows Vista.