Last active
May 27, 2020 05:43
-
-
Save nroduit/0f4de3b3f5b37593fd4573bc60607065 to your computer and use it in GitHub Desktop.
Test case for showing issue of diacritic characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add FooClient.java into src/main/java/org/test | |
Add module-info.java src/main/java | |
Add pom.xml in root folder | |
1) from root folder: $ mvn clean package | |
2) copy target/app.jar into root folder | |
3) change value of "-p": jdk-14.0.1\bin>$ jpackage --type app-image -n app -p "path of root folder" -m app/org.test.FooClient | |
4) $ cd app | |
5) $ app.exe testé testç testà |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.test; | |
import java.awt.BorderLayout; | |
import javax.swing.*; | |
public class FooClient { | |
public static void main(String[] args) { | |
javax.swing.SwingUtilities.invokeLater(() -> { | |
JFrame frame = new JFrame("Test non ascii chars through args"); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
JPanel panel = new JPanel(); | |
BoxLayout boxLayout = new BoxLayout(panel, BoxLayout.Y_AXIS); | |
panel.setLayout(boxLayout); | |
for (int i = 0; i < args.length; i++) { | |
JLabel jLabel = new JLabel(args[i]); | |
panel.add(jLabel); | |
} | |
frame.getContentPane().add(panel, BorderLayout.CENTER); | |
frame.pack(); | |
frame.toFront(); | |
frame.setVisible(true); | |
}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module app { | |
requires java.desktop; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.test</groupId> | |
<artifactId>app</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.8.0</version> | |
<configuration> | |
<release>14</release> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>3.1.0</version> | |
<configuration> | |
<archive> | |
<manifestEntries> | |
<Main-Class>org.test.FooClient</Main-Class> | |
</manifestEntries> | |
</archive> | |
<finalName>app</finalName> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment