Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After outfile is set to Chinese, although the exe is successfully created, it cannot be run. #172

Open
koreQAQ opened this issue Jun 30, 2024 · 3 comments
Assignees
Labels
issuer feedback More information or feedback is needed from the issuer question stale This issue is stale and will be closed soon if no feedback or response is provided

Comments

@koreQAQ
Copy link

koreQAQ commented Jun 30, 2024

This is my gradle task

tasks.register<edu.sc.seis.launch4j.tasks.Launch4jLibraryTask>("generateExe") {
    dependsOn("jar")
    jreMaxVersion.set("1.8.1")
    jreMinVersion.set("1.8")
    bundledJrePath.set("jre")
    outfile.set("口袋方舟" + ".exe")
    mainClassName.set("com.metaverse.app.LauncherApplication")
    fileDescription.set("The lightning fast implementation")
}

This is the result after running
image

I tried checking the XML and found gibberish
image

What makes me curious is that as long as the file name is changed to any English, the exe can run

@koreQAQ koreQAQ changed the title After outfile is set to Chinese, although the exe is successfully created, it cannot be opened. After outfile is set to Chinese, although the exe is successfully created, it cannot be run. Jun 30, 2024
@koreQAQ koreQAQ changed the title After outfile is set to Chinese, although the exe is successfully created, it cannot be run. After outfile is set to Chinese, although the exe is successfully created, it cannot be run. #problem Jun 30, 2024
@koreQAQ koreQAQ changed the title After outfile is set to Chinese, although the exe is successfully created, it cannot be run. #problem After outfile is set to Chinese, although the exe is successfully created, it cannot be run. Jun 30, 2024
@TheBoegl
Copy link
Owner

TheBoegl commented Jun 30, 2024

@koreQAQ are you running the gradle (daemon) JVM with utf-8 file encoding and what JDK/Java version are you using?

@TheBoegl TheBoegl self-assigned this Jul 7, 2024
@TheBoegl TheBoegl added the issuer feedback More information or feedback is needed from the issuer label Jul 7, 2024
@koreQAQ
Copy link
Author

koreQAQ commented Jul 8, 2024

How to determine the encoding format of the gradle daemon.
I opened my IDEA and set the encoding format in the lower right corner to UTF-8, but my Windows 10 system started with GBK encoding in Beta mode. Based on the above situation, creating exe is no longer garbled.
I use Java8 version.

@TheBoegl
Copy link
Owner

TheBoegl commented Jul 8, 2024

In Jetbrains IDEs the mentioned statusbar menu changes the encoding of the currently opened file. To change the gradle daemon, add the line org.gradle.jvmargs='-Dfile.encoding=UTF-8' to the gradle.properties file in your project root. Then stop the daemon (./gradlew --stop) and run the createExecutables task again.

@TheBoegl TheBoegl added question and removed issuer feedback More information or feedback is needed from the issuer labels Jul 8, 2024
@TheBoegl TheBoegl added stale This issue is stale and will be closed soon if no feedback or response is provided issuer feedback More information or feedback is needed from the issuer labels Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issuer feedback More information or feedback is needed from the issuer question stale This issue is stale and will be closed soon if no feedback or response is provided
Projects
None yet
Development

No branches or pull requests

2 participants