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

Exported project to Windows cannot find Java #667

Closed
alekratz opened this issue Feb 10, 2023 · 3 comments
Closed

Exported project to Windows cannot find Java #667

alekratz opened this issue Feb 10, 2023 · 3 comments

Comments

@alekratz
Copy link

alekratz commented Feb 10, 2023

Description

I am exporting a project on Linux, and creating an .exe for Windows. When I try to run the .exe on a Windows 10 machine, I am given this error: "This application requires a Java Runtime Environment 17". However, I have already installed JRE 17, the JAVA_HOME environment variable is set correctly, and the PATH environment variable is set up to point to the correct version of Java.

Expected Behavior

Application starts up and runs as expected.

Current Behavior

Error message described above. When I run java -version it shows the expected version.

Steps to Reproduce

  1. Export to Windows via Linux
  2. Install JRE 17
  3. Set JAVA_HOME and PATH environment variables appropriately
  4. Try to run application.

Your Environment

  • Processing version: 4, rev 1291
  • Operating System and OS version: Arch Linux
  • Other information: Exporting to Windows target, running on Windows 10

Possible Causes / Solutions

I can skim the source code to see what may be going on, I haven't taken the time to do that.

Additionally, I'm using a couple of weird built-in Java libraries, like the clipboard and gzip. I don't expect that using those would be causing this issue however.

Java 8 is also installed on this machine, but I don't think any environment variables are pointing to it.

@benfry
Copy link
Owner

benfry commented Feb 15, 2023

It's probably the Java 8 on your machine inserting itself somehow… Try copying the JRE to a folder called java adjacent to that .exe. (So that java/bin contains java.exe and that sort of thing.) Does that work?

@benfry
Copy link
Owner

benfry commented Feb 18, 2023

Found the problem here while looking into something else. Fixed for 4.2, when released. Thanks for the report…

@alekratz
Copy link
Author

Hey, thanks so much for checking this out (and fixing it, nice). I was going to give your suggestion a try when I had Windows access again. Keep up the awesome work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants