Package org.rapidcontext.app.ui
Class AppUtils
java.lang.Object
org.rapidcontext.app.ui.AppUtils
Provides a few utilities for UI applications.
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasCommand
(String command) Checks if a command is available (in a Unix environment).static void
Opens the specified URL in the user's default browser.
-
Method Details
-
hasCommand
Checks if a command is available (in a Unix environment).- Parameters:
command
- the command-line application name- Returns:
- true if the application is available, or false otherwise
-
openURL
Opens the specified URL in the user's default browser.- Parameters:
url
- the URL to open- Throws:
Exception
- if the URL failed to open or if no browser was found
-