Giter VIP home page Giter VIP logo

Comments (7)

Jorl17 avatar Jorl17 commented on August 21, 2024

I'm curious as to why this is happening. Is there a possibility for you to provide an example jar so that I can test it and try to find the issue? Thanks

from jar2app.

nik312123 avatar nik312123 commented on August 21, 2024

SplashDemo.jar.zip
Here is an example jar based on Oracle's Splash Screen example code.

from jar2app.

nik312123 avatar nik312123 commented on August 21, 2024

Hi! Any updates?

from jar2app.

Jorl17 avatar Jorl17 commented on August 21, 2024

Hi, unfortunately I haven't had much time to look at the issue. I find it odd that the splash screen isn't loading, given that it is stored within the jar itself.

I seem to remember that JavaAppLauncher, which we use to launch the jars, changes the current working directory, and that could be a pointer to the issue...except for the fact that the data is stored within the jar itself...

from jar2app.

nik312123 avatar nik312123 commented on August 21, 2024

I think you are correct about the working directory change. The file I provided as an example used a relative file as an argument in the manifest. I tried changing it to an absolute path to the image on my desktop, and it worked. Is there a way around this without needing an absolute path?

from jar2app.

Jorl17 avatar Jorl17 commented on August 21, 2024

There are several ways to go at this issue. You can try to package the file externally to the jar and then see if you can modify the generated plist file to change the current working directory, as suggested here

However, as you can see here, you can pass a -splash:<path to file> JVM option. If you modify the generated plist file and add <string>-splash:$APP_ROOT/PATH_TO_SPLASH_GIF_RELATIVE_TO_APP_ROOT_HERE</string> within the <array> portion of the JVMOptions key, you can get the JVM to point to the desired splash screen. I tried it here and it works

from jar2app.

nik312123 avatar nik312123 commented on August 21, 2024

Thank you very much! I got it working, but I figured out a way to do it all from command line, so it can be done in one step instead of having to edit the Info.plist and such.

jar2app exampleJar.jar (arguments) -j "-splash:$APP_ROOT/Contents/Resources/loading.gif";cp path_to/loading.gif exampleApp.app/Contents/Resources

Thank you very much for your help. I appreciate it.

from jar2app.

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.