Comments (6)
Just tested here with bundleJRE=true and it worked, so not sure what to say. I assume you have java from installed?
What version of OSX? What version of Java?
What is the output of:
/usr/libexec/java_home
Did you set jreHome?
from gradle-macappbundle.
OSX 10.12.6
I have two versions of Java installed: jdk-9.jdk, jdk1.8.0_121.jdk
So java_home points to jdk-9 at the moment (I did try removing jdk-9, apparently Mac OS simply picks the most recent version, this didn't make any difference).
My gradle project has source compatibility set to 1.8. I'm quite new to gradle. I'm not 100% sure which java version I'm running when I run the project from gradle. I can check. Where can I see the bundled JRE?
I've also noticed a separate issue, which may not be an issue of your builder per se (so I won't log it unless you want me to). When I run my app (with bundleJRE = false) by double clicking on it, some part of the program is not running properly. However, if I run the app by calling MyApp.app/Contents/MacOS/JavaAppLauncher from the terminal it works as expected. I need to investigate more what is failing. My first thought was that certain resources are not loading, but they seem to be. So I wonder if something to do with JavaFX graphics rendering is not behaving in the same way. I realise this is incredibly vague - that's because I don't know how to see the standard out and error when running the app, so I can't tell what is failing. Is there a log file somewhere that will show me the Java stdout and stderr?
Anyway, thanks for making such an awesome plugin. This is surely the missing ingredient to make gradle the winner Java build tool.
from gradle-macappbundle.
PS those are both Oracle Java.
from gradle-macappbundle.
Java is copied into the Contents/PlugIns directory inside the app, so for example
TestApp.app/Contents/PlugIns/jdk1.8.0_51.jdk
You can try running your app from the command line with
open Test.app
which is closer to double clicking than directly running JavaAppLauncher
from gradle-macappbundle.
OK thanks. So the Java 9 JDK was being bundled. I assume this is done based on the system settings (use whichever JDK is most recent), as I don't see any setting saying to use JDK 9. When I removed JDK 9 from my /Libraries/Java/JavaVirtualMachines folder everything worked perfectly and the app had Java 8 bundled.
Thank you! Perhaps the world is just not ready for Java 9 ;-)
from gradle-macappbundle.
I'll check into the java9 issue.
You can also set jreHome
within the macAppBundle section if you want to choose a particular jre. Otherwise it uses whatever the output of /usr/libexec/java_home
is.
from gradle-macappbundle.
Related Issues (20)
- Deprecation warning with Gradle 4.0-rc-1 HOT 4
- Error: execCommand == null HOT 2
- Subproject evalutation and executing project.afterEvaluate{} HOT 1
- Error prototypes method getJREDirName HOT 4
- About the dmg HOT 7
- backgroundImage option fails on osascript when project path contains spaces
- JDK 10 is not bundled HOT 7
- Adding javaExtras.put() creates an app that wonβt run HOT 3
- There doesn't seem to be a way to create a /Applications alias in a dmg without a background image HOT 5
- Builing DMG often fails when background image is set HOT 2
- Switch app launcher to one with a better JRE missing error? HOT 5
- Application hangs when okhttp3.Credentials.basic method gets called HOT 2
- is it possible to manually edit the startup script? HOT 4
- Gradle 5.0 build fails on non-macOS systems HOT 1
- Java 11 JRE's from adoptopenjdk are not supported HOT 1
- Remove dependency between assemble and macappbundle tasks
- Created application cannot be notarized for Mac OS Mojave HOT 7
- Documention/Links on how to contribute HOT 1
- JavaAppLauncher Apple Silicon (arm64) support HOT 1
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 gradle-macappbundle.