Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to run -splash command in Eclipse
How to run -splash command in Eclipse [message #985998] Sat, 17 November 2012 10:34 Go to next message
Dave C is currently offline Dave C
Messages: 3
Registered: November 2012
Junior Member
Hi. There's a tutorial on oracle's site here: docs.oracle.com/javase/tutorial/uiswing/misc/splashscreen.html, that I'm trying to follow to learn to use a splash screen. The examples show you how to get it to work using the command line or using a manifest file. I can't figure out how to get it to work in Eclipse.

The command line command(?) is supposed to follow this format:
java -splash:<file name> <class name>

So an example would be:
java -splash:images/splash.gif SplashDemo

I've been adding the supplied splash.gif file to the src folder of some of the projects I already have in Eclipse and running them with "-splash:splash.gif" in the arguments section of the run configurations (minus the quotation marks). I thought I was meeting the minimum requirements to make this work, but apparently that's not the case. Can anyone help?
Re: How to run -splash command in Eclipse [message #986044 is a reply to message #985998] Sat, 17 November 2012 20:39 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1007
Registered: July 2009
Senior Member
You don't want to pass -splash as an argument to your program but to the VM, so you should put this into the "VM arguments" box.
Re: How to run -splash command in Eclipse [message #986080 is a reply to message #985998] Sun, 18 November 2012 14:11 Go to previous messageGo to next message
Dave C is currently offline Dave C
Messages: 3
Registered: November 2012
Junior Member
Thanks, but it seems to still be a no go. I decided to setup the whole project from the tutorial, but I still can't get it to display the splash screen using Eclipse. Here are some pics showing my setup and the resulting error. I tried posting the images, but apparently I can "only use links to eclipse.org sites while you have fewer than 5 messages". Yay for that. So if you want to see them you'll have to copy/paste.

Project Tree in Package Explorer
Image Link(2.bp.blogspot.com/-yOITm206d8M/UKjlvDnngSI/AAAAAAAAAEE/j-AiqJnVAFk/s400/PExp_tree.jpg)

Run Configurations
Image Link(3.bp.blogspot.com/-5fAq9zSXIjw/UKjlvrAaUfI/AAAAAAAAAEQ/5nRnR5gpC7I/s400/Run_Configs.jpg)

Console Error Message
Image Link(3.bp.blogspot.com/-XWl0ynfhTHE/UKjlwGcgNaI/AAAAAAAAAEg/6tAiCqPjcc4/s400/Err_Msg.jpg)
Re: How to run -splash command in Eclipse [message #986089 is a reply to message #986080] Sun, 18 November 2012 17:53 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1007
Registered: July 2009
Senior Member
One more hint (although this is not specific to JDT): java doesn't know about your "src" folder, the image path must be relative to the working directory of your program launch.
Re: How to run -splash command in Eclipse [message #986143 is a reply to message #986089] Mon, 19 November 2012 08:17 Go to previous message
Dave C is currently offline Dave C
Messages: 3
Registered: November 2012
Junior Member
Forgive my ignorance, but do you mean the bin folder?

Maybe it would help to show a screenshot of the project in Navigator instead. Apparently Eclipse duplicates the files and folders from src.

Project Tree in Navigator
Image Link(4.bp.blogspot.com/-SBLzibUiMZY/UKnqXPCzqXI/AAAAAAAAAEs/TYR535JFK_g/s1600/ProjTree_Navigator.jpg)
Previous Topic:eclipse.launcher returns NULL when running JUnit plug-in tests
Next Topic:Custom editor for ".class"
Goto Forum:
  


Current Time: Sun Sep 21 22:18:50 GMT 2014

Powered by FUDForum. Page generated in 0.01615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software