1

I need to open a link in my web browser using Java, but the stipulation is that I can't use java.awt.Desktop to do it. The reason why is because I'm trying to do this from an LWJGL3 program, and using AWT in its context will cause the program to not work on Mac systems.

So basically, I need the functionality of Desktop.browse(URL) without AWT. Does anyone know of some third party application or something I can use that can do this (or how I can potentially do it myself).

Thank you!

Anonymous
  • 696
  • 8
  • 21
  • One obvious suggestion is to use either [Runtime.exec()](https://docs.oracle.com/javase/9/docs/api/java/lang/Runtime.html) or [ProcessBuilder](https://docs.oracle.com/javase/9/docs/api/java/lang/ProcessBuilder.html) – paulsm4 Feb 25 '19 at 04:16
  • But that should work on a Mac (I'm on a Mac). – Elliott Frisch Feb 25 '19 at 04:21

1 Answers1

1

I found the answer to my question at these two links.

Open the links with pure Java: How to open the default webbrowser using java

A comment on the subject by the maintainer of LWJGL3: http://forum.lwjgl.org/index.php?topic=6872.0

Anonymous
  • 696
  • 8
  • 21