Skip to content

Commit a5922bf

Browse files
committed
Добавлен плагин для создания exe
1 parent 354849a commit a5922bf

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

pom.xml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,40 @@
5252
</execution>
5353
</executions>
5454
</plugin>
55+
56+
<plugin>
57+
<groupId>com.akathist.maven.plugins.launch4j</groupId>
58+
<artifactId>launch4j-maven-plugin</artifactId>
59+
<version>2.5.0</version>
60+
<executions>
61+
<execution>
62+
<phase>package</phase>
63+
<goals>
64+
<goal>launch4j</goal>
65+
</goals>
66+
<configuration>
67+
<headerType>console</headerType>
68+
<jar>${project.build.directory}/${project.build.finalName}.jar</jar>
69+
<outfile>C:/Users/MONSTER/Downloads/sticker_bot.exe</outfile>
70+
<classPath>
71+
<mainClass>com.github.leo_proger.Main</mainClass>
72+
</classPath>
73+
<singleInstance>
74+
<mutexName>sticker_bot_mutex</mutexName>
75+
</singleInstance>
76+
<jre>
77+
<minVersion>21</minVersion>
78+
<maxVersion>25</maxVersion>
79+
<opts>
80+
<opt>-Dfile.encoding=UTF-8</opt>
81+
<opt>-Djava.awt.headless=false</opt>
82+
</opts>
83+
</jre>
84+
</configuration>
85+
</execution>
86+
</executions>
87+
</plugin>
5588
</plugins>
5689
</build>
5790

58-
5991
</project>

src/main/java/com/github/leo_proger/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import java.awt.*;
1212
import java.awt.image.BufferedImage;
13-
import java.util.Arrays;
13+
import java.nio.charset.StandardCharsets;
1414
import java.util.Scanner;
1515

1616
import static com.github.leo_proger.config.Config.*;
@@ -20,7 +20,7 @@
2020

2121
public class Main {
2222

23-
private static final Scanner sc = new Scanner(System.in);
23+
private static final Scanner sc = new Scanner(System.in, StandardCharsets.UTF_8);
2424

2525
public static void main(String[] args) throws Exception {
2626
int selectNumber = showMainMenu();
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Main-Class: com.github.leo_proger.Main
3+

0 commit comments

Comments
 (0)