I want to call a browser (e.g. Internet Explorer / Firefox / Google Chrome / Opera) through the Java interface. I also need to pass some web links to this Java process. How to achieve this?
You can use the desktop API :
java.awt.Desktop.getDesktop().browse(new URI("http://stackoverflow.com"));
This will launch the browser
You can do this with Desktop#browse(). However, it will only launch the configured default browser.
Desktop#browse()
. Desktop API Java SE 6 " "
.
Click this link on how to execute an external process in Java.
Source: https://habr.com/ru/post/1722859/More articles:Как использовать сервер базы данных для распределенного планирования заданий? - databaseIs this particular concatenation of paths in Perl code available? - securityASP MVC Foreign Key Submit Problem - asp.netПостоянная ссылка/лучшая практика - sqlGit repository synchronization through machines without push - gitReady-made image processing solution - phpHow to make a new list elsewhere, Lisp - listSilverlight ui upgrade issue - multithreadingDjango selects model objects based on time at intervals on the model itself - djangoС# -Сравнимый и IEquatable - genericsAll Articles