Skip to content

Commit e52f9b9

Browse files
committed
Provide ability to disable autoLaunch browser
1 parent 72f4474 commit e52f9b9

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ java -jar tinypounderXXX.jar
1616

1717
If you usually run the TinyPounder with the same kit, you can provide its path at start time :
1818
----
19-
java -jar tinypounderXXX.jar --kit.path=/path/to/unzipped/kit/
19+
java -jar tinypounderXXX.jar --kitPath=/path/to/unzipped/kit/ --licensePath=/path/to/license.xml
20+
----
21+
22+
Disable auto-launch browser (when you already have a tinyPounder window)
23+
----
24+
java -jar tinypounderXXX.jar --autoLaunchBrowser=false
2025
----
2126

2227
Then head to http://localhost:8080

src/main/java/org/terracotta/tinypounder/ApplicationReadyListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ public class ApplicationReadyListener implements ApplicationListener<Application
2121

2222
@Value("${server.port}")
2323
private int port;
24+
25+
@Value("${autoLaunchBrowser}")
26+
private Boolean autoLaunch;
2427

2528
@SuppressWarnings("unchecked")
2629
@Override
2730
public void onApplicationEvent(ApplicationReadyEvent event) {
31+
if (!autoLaunch) return;
2832
URI uri = URI.create("http://localhost:" + port);
2933
if (Desktop.isDesktopSupported()) {
3034
Desktop desktop = Desktop.getDesktop();

src/main/resources/application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ reconnectWindow=0
1010
spring.devtools.livereload.enabled=false
1111
spring.devtools.restart.enabled=false
1212
server.port=9490
13+
autoLaunchBrowser=true

0 commit comments

Comments
 (0)