Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mac package prompts users to install Java 6 #68

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

Closed
2 of 5 tasks
keastrid opened this issue Oct 31, 2020 · 4 comments
Closed
2 of 5 tasks

Mac package prompts users to install Java 6 #68

keastrid opened this issue Oct 31, 2020 · 4 comments

Comments

@keastrid
Copy link
Contributor

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:
(Hello again)
Running the package via the zipBall on a different machine from the one that built it prompts the user to install Java 6.

Steps to reproduce the issue/enhancement:

  1. Open the app file

What is the expected behavior?
Using the bundled JRE.

What is the current behavior?
Prompts the user to install Java 6

Please tell us about your environment:

  • JavaPackager version: 1.4.0-SNAPSHOT
  • OS version: MacOS 10.15
  • JDK version:15
  • Build tool:
    • Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)
Example zipBall: http://www.astro.louisville.edu/software/astroimagej/updates/AstroImageJ-dev-x86-mac.zip
Repo: https://github.com/keastrid/astroimagej

@keastrid
Copy link
Contributor Author

Manually running /Applications/AstroImageJ.app/Contents/MacOS/startup via terminal properly opens the app, but double clicking does not.

@keastrid
Copy link
Contributor Author

Found a somewhat related SO answer with a possible solution: https://stackoverflow.com/a/16592948
Renaming the Java dict key to JavaX did work to fix this issue, but brought an issue of "no MainClass specified"
Updating https://github.com/fvarrui/JavaPackager/blob/cac191190c8b4561ebeadc5b7a2ef2e1c91688a8/src/main/resources/mac/Info.plist.vtl#L41 to be JavaX should resolve the issue, see also tofi86/universalJavaApplicationStub#9

@fvarrui
Copy link
Collaborator

fvarrui commented Oct 31, 2020

I've just reproduce your issue on a brand new MacOS VM.
image
And you are right ... running startup script from terminal works fine. I think it's because when running the app via double clicking or open ./AstroImageJ.app command, the system finds the Java key in Info.plist file (Apple style) and tries to run it using an installed JRE, ignoring the CFBundleExecutable key. So, if there's no JRE installed, it shows this message.

I've changed Info.plist file to Oracle style as explained here and I think it's fixed.

I hope it's fixed, because it has been a headache! 😅

@keastrid
Copy link
Contributor Author

keastrid commented Nov 1, 2020

Tested and it seems to work now! Thank you!

@keastrid keastrid closed this as completed Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants