You can use the Desktop class to issue a browser open:
PHP Code:
try { java.net.URI uri = new java.net.URI.create("http://mywebsite.com"); int iBrowserWindows = 5; for (int i = 0; i < iBrowserWindows; ++i) { java.awt.Desktop.getDesktop().browse(uri); } } catch (java.IO.IOException ex) { }
Repeat the browse as desired for multiple sites. You could also try an exec, but I wouldn't if the above works.
You can use the Desktop class to issue a browser open:
PHP Code:
try
{
java.net.URI uri = new java.net.URI.create("http://mywebsite.com");
int iBrowserWindows = 5;
for (int i = 0; i < iBrowserWindows; ++i)
{
java.awt.Desktop.getDesktop().browse(uri);
}
}
catch (java.IO.IOException ex)
{
}
Repeat the browse as desired for multiple sites. You could also try an exec, but I wouldn't if the above works.
class test
{
public static void man(String[] args)
try
{
java.net.URI uri = new java.net.URI.create("http://mywebsite.com");
int iBrowserWindows = 5;
for (int i = 0; i < iBrowserWindows; ++i)
{
java.awt.Desktop.getDesktop().browse(uri);
}
}
catch (java.IO.IOException ex)
{
}
Sorry, my bad. Can't invoke a new on java.net.URI.create, so just remove new. And the IO package is supposed to be lowercase: java.io.IOException. Try again.
Sorry, my bad. Can't invoke a new on java.net.URI.create, so just remove new. And the IO package is supposed to be lowercase: java.io.IOException. Try again.
still isn't working (I'm jar signing the main class as 'test')
Am I doing it wrong?
Code:
class test
{
public static void main(String[] args)
{
try
{
java.net.URI uri = java.net.URI.create("http://mywebsite.com");
int iBrowserWindows = 5;
for (int i = 0; i < iBrowserWindows; ++i)
{
java.awt.Desktop.getDesktop().browse(uri);
}
}
catch (java.io.IOException ex)
{
}
}
}
Works fine for me unsigned.
Execute it from the command line. Maybe even compile a .class first to verify you didn't miss something in setting up the jar.
Edit:
Also, mine opens as 5x tabs, not windows. I don't know if there is a way to do that beyond exec which should work, but I wouldn't recommend.
Works fine for me unsigned.
Execute it from the command line. Maybe even compile a .class first to verify you didn't miss something in setting up the jar.
Edit:
Also, mine opens as 5x tabs, not windows. I don't know if there is a way to do that beyond exec which should work, but I wouldn't recommend.
Remotely?
You need to set up an RMI interface between the clients and the servers so you can issue commands to call a function to do this. I think that's what you're looking for, thinking like a chat client?