Note that there are some explanatory texts on larger screens.

plurals
  1. POJava: splash screen in a jar file run with the -cp option?
    text
    copied!<p>Is it possible to put the splash screen image in the jar file and use the <code>-splash</code> option on the command line?</p> <p><strong>Background:</strong> I have 3 jar files that have a fun dependency tree, where the main class I want to run is in the "common" jar (and it reflectively calls the main classes of the two other jars). So using the -jar command line is kind of out of the question.</p> <p>Yes, I know you can use the <code>SplashScreen-Image</code> line in the manifest, but all manifests seem to be ignored when using the -cp option of the java command line. I kind of want to keep resources self contained in the jars if possible, so I want one of the jars to hold the splash screen in question. But paths for the <code>splash</code> that follow "xx.jar!path", or "xx.jar/path" seem not to work. Is it possible, and how?</p> <p>EDIT: okay, let me try this again. I have three jars. One has graphics logic in it, let's call it the "UI", one has business logic in it, let's call it the "Core", and one has common classes between the two. Both the Core component and the UI component can be run as their own app, and they have their own main classes and their jars are set up to include the common jar on the class path. But the common jar has a class with a main method which calls both main classes. The common jar, being a library between the two, is not supposed to have the UI or Core jar as a dependency because either one of them could be missing if the components are run separately. </p> <p>All I want is a way to reference a splash screen packed in the UI jar when calling the main class in the common jar. I've already worked out the logistics of calling this common jar's main with the <code>-cp</code> option. It just doesn't have a proper splash screen yet. Is it possible, and how? (I was hoping to make this question generic and not include all that info, but whatever.)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload