-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
29 lines (25 loc) · 764 Bytes
/
Main.java
File metadata and controls
29 lines (25 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package JCMusic;
import javax.swing.*;
public class Main {
public static void main(String[] args) {
CLI cli = new CLI();
GUI gui = new GUI();
// i probably could've used a switch statement here but i couldnt be bothered
if (args.length > 0) {
if(args[0].equals("--no-gui")) {
if(args.length > 1) {
cli.dirSpecified = true;
cli.playlistName = args[1];
cli.cliApp();
} else {
cli.cliApp();
}
} else {
System.out.println("unknown argument: " + args[0]);
gui.guiApp();
}
} else {
gui.guiApp();
}
}
}