Finally I made it downloading NetBeans 7.4. It has the option to add Custom Manifest Attributes in the Project Preferences, and it works correct
How to add Splash Screen with NetBeans?
-
03-07-2022 - |
Question
I wanted to add a simple .gif as Splash Screen to my application. I'm using NetBeans and I've seen there are lots of bugs when doing this with it.
I've tried to add the line SplashScreen-Image: to the manifest.mf file and -splash: at the run properties of my project (as I've read this last thing is only when running it from the IDE). But it only works on the IDE, my .jar does not show any splash screen. In fact, I opened the manifest.mf file compiled in the resulting .jar and it does not show the SplashScreen-Image line.
I also tried to add it with the Netbeans option for it, but it does not work.
What can I do? Maybe another way to compile the project?
EDIT:
I've tried to add the SplashScreen-Image line in the manifest file by opening the .jar with WinRAR, the Splash Screen appears but Java Virtual Machine throws an error and the application finishes.
Solution 2
OTHER TIPS
Netbeans automatically generates the manifest each time you build the project, so you shouldn't be modifying it manually.
Instead, right click the project node and select properties. Navigate to the "Application" entry and you will see a "Splash Screen". Browse to the location of the file you want included.
Clean, build and run
Create a real Splash Screen in java using Netbeans
step-1: How To create your .gif file
How to Make a GIF:
http://www.myspacegens.com/handler.php?gen=animatedimage
Complete your .gif file name Like `Splasemo.gif`
step-2: Your Project Name is/like "MySplash" Right click on Select Properties
Select categories Name is "Run"
And Input on VM options:
-splash:src/MyPackagename/SplashDemo.gif
After OK Button..
step-3:Select Files or Shortcut(ctrl+2)
Click on your project File name like "manifest.mf"
after input:
SplashScreen-Image: MyPackagename/SplashDemo.gif
step-4:Splash Screen: Time Duration Set on Main() Methods using
Thread.sleep(3500);