Forums Register Login

about splash screen with jar file...

+Pie Number of slices to send: Send
META-INF/
META-INF/MANIFEST.MF
images/
images/power.JPG
images/splash.jpg
poweroff/
poweroff/about.gif
poweroff/cancel.gif
poweroff/Main$1.class
poweroff/Main.class
poweroff/ok.gif
poweroff/powerOffGUI$1.class
poweroff/powerOffGUI$2.class
poweroff/powerOffGUI$3.class
poweroff/powerOffGUI$4.class
poweroff/powerOffGUI$5.class
poweroff/powerOffGUI$6.class
poweroff/powerOffGUI$7.class
poweroff/powerOffGUI$checkStatus.class
poweroff/powerOffGUI$mouseHandler.class
poweroff/powerOffGUI$showTime.class
poweroff/powerOffGUI.class
poweroff/windowTheme.class

********************************************************************************
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.6.0-b105 (Sun Microsystems Inc.)
SplashScreen-Image: images/splash.jpg
Main-Class: poweroff.Main
********************************************************************************

the contents of jar file and manifest file are shown above....

java -splash:images\splash.jpg -jar poweroff.jar (producing splash screen)
java -splash:images\splash.jpg poweroff.Main (producing splash screen)
java -jar poweroff.jar (working but not producing splash screen)

without -splash option, this jar file does'nt giving splash screen...
although, we add the SplashScreen: option to the manifest file, why this jar file is not creating splash screen??

is this specification of splash image in manifest file is correct??
how to solve this problem...?
please explain... thank you.
+Pie Number of slices to send: Send
 

sanjeev charla wrote:although, we add the SplashScreen: option to the manifest file,


It should be "SplashScreen-Image:"
SplashScreen-Image: images/splash.jpg

Devaka
+Pie Number of slices to send: Send
Isn't that exactly what Sanjeev posted?
+Pie Number of slices to send: Send
 

Rob Prime wrote:Isn't that exactly what Sanjeev posted?



Ooops! my eyes
+Pie Number of slices to send: Send
and finally, what will be the solution???
+Pie Number of slices to send: Send

later, a class is implemented to show the splashscreen instead of using splashscreen option by Java6.

in that code, the JLabel is created with an image as follows..

ImageIcon image=new ImageIcon("images/splash.jpg");
JLabel imageLabel=new JLabel(image);


the directory structure of netbeans folder is..

build/
build.xml
dist/
images/<-- splash.jpg
nbproject/
src/
test/


it works fine when running program in netbeans...
but the jar file in dist/ folder is not performing well...

there is no images/ folder in jar file created by netbeans,and also the Main-Class: option is not added in manifest file.
later i added images/ folder to jar file and Main-Class location as follows..

images/
META-INF/
poweroff/

but again the jar is working with out using the splash image in images/ folder.

but if i place the images/ folder in the directory , where the jar file is located.. then it works fine... like this..

dist/
dist/images/
dist/poweroff.jar

what is the problem.....??? thanks....
+Pie Number of slices to send: Send
 

sanjeev charla wrote:
it works fine when running program in netbeans...
but the jar file in dist/ folder is not performing well...

there is no images/ folder in jar file created by netbeans,and also the Main-Class: option is not added in manifest file.
later i added images/ folder to jar file and Main-Class location as follows..



Then it appears your not exporting the code to a JAR file properly in Netbeans. Try building the JAR file manually. Then, when you have that working figure out how to export to a JAR file with the images directory in the proper place, and the manifest the way it needs to be. Read this tutorial page on setting up the SplashScreen.

It may be that you have to import the image into the NetBeans project a specific way, rather than just copying it to a folder (I don't know I don't use NetBeans). Or it might be that you are not running through a 'Jar Export Wizard' with the proper options selected.
+Pie Number of slices to send: Send
Getting too difficult a topic for us beginners. Moving. Since this may be a NetBeans problem, I'll try the IDEs forum in the first instance.
Danger, 10,000 volts, very electic .... tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 5296 times.
Similar Threads
Executable jar that contains other jars
options in jar files....
manifest file
user.dir
Splash screen image
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:34:03.