Skip to content

Commit

Permalink
Select gui/cli based on if command line arguments are present
Browse files Browse the repository at this point in the history
  • Loading branch information
rihi committed Nov 5, 2022
1 parent f871568 commit bbd606f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/info/ata4/bspsrc/BspSourceLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import info.ata4.bspsrc.gui.BspSourceFrame;

/**
* Simple launcher that starts the CLI if there's a console available or the GUI
* otherwise.
* Simple launcher that starts the CLI if any command
* line arguments are present or the GUI otherwise.
*
* @author Nico Bergemann <barracuda415 at yahoo.de>
*/
Expand All @@ -23,9 +23,9 @@ public class BspSourceLauncher {
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
if (System.console() == null) {
BspSourceFrame.main(args);
public static void main(String[] args) {
if (args.length == 0) {
BspSourceFrame.main();
} else {
BspSourceCli.main(args);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/info/ata4/bspsrc/gui/BspSourceFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class BspSourceFrame extends javax.swing.JFrame {
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
public static void main() {
LogUtils.configure();

// set the system look and feel
Expand Down

0 comments on commit bbd606f

Please sign in to comment.