Comments (7)
I have not tried with java10, so not sure.
Do you have jreHome set as well? If not does /usr/libexec/java_home
give the correct path for java10?
This is a simple copy of the jre, so if java10 is installed in a different way from previous versions it may not work.
from gradle-macappbundle.
Do you have jreHome set as well?
No.
If not does /usr/libexec/java_home give the correct path for java10?
Yes, it points to /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
:
julian$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
julian$ cd /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
julian$ ls -l
total 16
-r--r--r-- 1 root wheel 158 8 Mär 03:16 README.html
drwxr-xr-x 48 root wheel 1536 8 Mär 03:20 bin
drwxr-xr-x 7 root wheel 224 8 Mär 03:16 conf
drwxr-xr-x 11 root wheel 352 8 Mär 03:16 include
drwxr-xr-x 100 root wheel 3200 8 Mär 03:16 jmods
drwxr-xr-x 101 root wheel 3232 8 Mär 03:16 legal
drwxr-xr-x 90 root wheel 2880 8 Mär 03:16 lib
-rw-r--r-- 1 root wheel 1653 8 Mär 03:16 release
Looks good to me on first glance.
from gradle-macappbundle.
That is the difference, under previous versions of java, there was a directory called jre
inside Contents/Home
that contained all that was needed to run java. Obviously you do not want to include the entire jdk when all you need is the jre. Guess I will have to rethink how that works if this is how newer jdk's will be distributed.
A bit of a pain, but in the meantime if you can figure out what files you need to include, you can create a directory that is a "fake" jre and set jreHome to that. The directory should contain:
Contents/Home/jre
where you set jreHome to be the 'jre' subdirectory inside. The task will go up two levels and so copy effectively
<jreHome>/../../Contents/Home/jre/**
along with <jreHome>/../../Contents/Info.plist
into the project.
Alternatively, you could set up your own gradle Sync task to put stuff in the right place and have createApp.dependsOn('myJreCopyTask')
.
Likely there are other issues if they really have changed the directory layout significantly. Please let me know what you find out if you do try this.
from gradle-macappbundle.
It looks like JDK 9 is also affected and the directory structure you mentioned was changed in that version already. According to https://docs.oracle.com/javase/9/install/installed-directory-structure-jdk-and-jre.htm, the JRE is installed in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/
.
I will have a closer look later, just wanted to report back.
from gradle-macappbundle.
Hi, (obviously) this effects Java 11 too. This might now be a more urgent problem with Java 11 the now current (and LTS) release, and Java 8 on the way out.
Thanks!
from gradle-macappbundle.
I've done some reading and looks like bundling the jre has changed significantly in java after8 and even more after 9 and this should probably be done with jlink as opposed to just copying a directory into the app.
from gradle-macappbundle.
Perhaps it could work if you copied the results from jlink into the app, and ran the correct script (bin/)?
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
- Resulting app does not open when bundleJRE = true HOT 6
- Error prototypes method getJREDirName HOT 4
- About the dmg HOT 7
- backgroundImage option fails on osascript when project path contains spaces
- 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.