Skip to content

Commit 280458d

Browse files
authored
Merge pull request #59 from tnagao7/uberjar-prodname
Configure product.name property in uber-JAR
2 parents 2ef57b9 + 229185f commit 280458d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

launcher-impl/bootstrap/src/main/java/com/fujitsu/launcher/LauncherMain.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017-2021 Fujitsu Limited and/or its affiliates. All rights
2+
* Copyright (c) 2017-2022 Fujitsu Limited and/or its affiliates. All rights
33
* reserved.
44
*
55
* This program and the accompanying materials are made available under the
@@ -243,7 +243,7 @@ private Path getTemplate() throws IOException {
243243
return Paths.get(jarURLConnection.getJarFile().getName());
244244
}
245245

246-
private void initProductName() {
246+
public static void initProductName() {
247247
if (System.getProperty("product.name") == null) {
248248
System.setProperty("product.name", "");
249249
}

launcher-impl/bootstrap/src/main/java/com/fujitsu/launcher/uberjar/Launcher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017-2019 Fujitsu Limited and/or its affiliates. All rights
2+
* Copyright (c) 2017-2022 Fujitsu Limited and/or its affiliates. All rights
33
* reserved.
44
*
55
* This program and the accompanying materials are made available under the
@@ -47,6 +47,8 @@ private void start() {
4747
DeployProperties deployProperties = new DeployProperties();
4848
deployProperties.load(dpis);
4949

50+
LauncherMain.initProductName();
51+
5052
Thread preInitShutdownHook = LauncherMain.createPreInitShutdownHook();
5153
Runtime.getRuntime().addShutdownHook(preInitShutdownHook);
5254

0 commit comments

Comments
 (0)