Comments (5)
@fvarrui Unfortunately the executable stopped working after using rcedit. And then I found a nice tool resourcehacker to do this.
from javapackager.
It's an encoding related issue, but I'm not sure if it's related to JavaPackager, launch4j-maven-plugin or launch4j.
Please, could you comment JavaPackager plugin in your POM and try to use next config?
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>runnable</classifier>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>[PATH TO YOUR MAIN CLASS]</mainClass>
</manifest>
</archive>
<finalName>myjar</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.25</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<jar>${project.build.directory}/myjar-runnable.jar</jar>
<outfile>${project.build.directory}/myexe.exe</outfile>
<classPath>
<mainClass>[PATH TO YOUR MAIN CLASS]</mainClass>
</classPath>
<jre>
<path>%JAVA_HOME%</path>
</jre>
<versionInfo>
<fileVersion>1.2.3.4</fileVersion>
<txtFileVersion>txt file version</txtFileVersion>
<fileDescription>[YOUR DESCRIPTION HERE]</fileDescription>
<copyright>my copyright</copyright>
<productVersion>4.3.2.1</productVersion>
<txtProductVersion>txt product version</txtProductVersion>
<productName>myproduct</productName>
<internalName>myexe</internalName>
<originalFilename>myexe.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
from javapackager.
I've tried Launch4j in standalone mode and used some CJK characters in file description, and generated executable also shows "?" instead.
from javapackager.
I found a workaround ... rcedit is a command line tool for Windows which let you set file description of a Windows exe file.
I used it on PowerShell with CJK characters and it works fine:
rcedit-x64.exe myexe.exe --set-version-string FileDescription "你好"
from javapackager.
Great!
But rcedit
would have been a good option to automate the process, e.g.:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>rcedit-x64</executable>
<commandlineArgs>${project.build.directory}/myexe.exe --set-version-string FileDescription "${project.description}"</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
But you are right, it's a shame it doesn't work.
from javapackager.
Related Issues (20)
- package error “Unresolved reference” HOT 4
- JavaPackager ignoring runnableJar setting HOT 2
- After turning on administrator Required, there is no response after entering the password when starting under mac. HOT 14
- With "org.apache.poi" in my project, there is always "module not found" error occured HOT 17
- How to exclude certain jars from copyDependencies task (duplicate handling strategy) HOT 9
- mis/exe installation package custom installation path HOT 3
- Fat Jar doesn't seem to work as expected HOT 13
- How to make a clean terminal app for MacOS? HOT 5
- How can I set the singleInstance property of launch4j through a plugin HOT 3
- About GraalVM HOT 2
- when I try tro execute the .exe file, it repots "The application requires a java Runtime Environment" HOT 21
- How can I package for macOS with the demo ? https://github.com/fvarrui/JavaPackager/issues/409 HOT 1
- Erro “require java runtime environment......” in 1.7.6-SNAPSHOT HOT 2
- Question (or bug) about PKCS11 keystore type HOT 13
- How to keep old data files when upgrading? HOT 10
- Resource loading exception HOT 5
- javapackager packaging and security HOT 1
- Plugin searches for some library `tool.jar` on Mac under hard coded, non-existing path and fails right away HOT 12
- I need help about that HOT 1
- Path resolution causes bundled jre to not be found on linux when building from windows HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javapackager.