GithubHelp home page GithubHelp logo

Comments (7)

crotwell avatar crotwell commented on July 22, 2024

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.

schw4rzlicht avatar schw4rzlicht commented on July 22, 2024

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.

crotwell avatar crotwell commented on July 22, 2024

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.

schw4rzlicht avatar schw4rzlicht commented on July 22, 2024

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.

benzoid avatar benzoid commented on July 22, 2024

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.

crotwell avatar crotwell commented on July 22, 2024

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.

Josh-Larson avatar Josh-Larson commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.