如何在 Eclipse 中设置 SplashScreen?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7533403/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set SplashScreen in Eclipse?
提问by Justin Woods
My App would load a splashScreen before launching the main window. How do you set the splashScreen running in Eclipse? There was a place to put the "splash:splashScreen.png" in NetBeans so that the App would start with the SplashScreen. Anything like that in Eclipse>
我的应用程序会在启动主窗口之前加载一个 splashScreen。你如何设置在 Eclipse 中运行的 splashScreen?有一个地方可以在 NetBeans 中放置“splash:splashScreen.png”,以便应用程序从 SplashScreen 开始。Eclipse中的任何类似的东西>
回答by karol
This link explains best how to add your splashscreen with netbeans -
此链接最好地解释了如何使用 netbeans 添加启动画面 -
http://wiki.netbeans.org/Splash_Screen_Beginner_Tutorial.
http://wiki.netbeans.org/Splash_Screen_Beginner_Tutorial。
For Eclipse just add the -splash:path/to/image to VM arguments in the Debug/Run configurations panel.
对于 Eclipse,只需将 -splash:path/to/image 添加到调试/运行配置面板中的 VM 参数。
回答by box
Yes, the splash screen image has to be named splash.bmp as described here: http://www.eclipse.org/articles/Article-Branding/branding-your-application.html. The splash screen is expected to be in the same plug-in as the product. If this is not true for you, you might want to make an explicit choice in the configuration.
是的,启动画面图像必须命名为 splash.bmp,如下所述:http: //www.eclipse.org/articles/Article-Branding/branding-your-application.html。初始屏幕应与产品位于同一插件中。如果这对您来说不正确,您可能希望在配置中做出明确的选择。
回答by Harinath
Add the
添加
-splash:path/to/image
-飞溅:路径/到/图像
to VM arguments in the Debug/Run configurations under Arguments tab.
到参数选项卡下调试/运行配置中的 VM 参数。
回答by Andrew
Credits: http://www.mkyong.com/java/how-to-change-eclipse-splash-welcome-screen-image
学分:http: //www.mkyong.com/java/how-to-change-eclipse-splash-welcome-screen-image
Short version:replace eclipse-jee-neon-R-win32\plugins\org.eclipse.platform_4.6.3.v20170301-0400\splash.bmp
(your path will be very similar, navigate to it manually).
简短版本:替换eclipse-jee-neon-R-win32\plugins\org.eclipse.platform_4.6.3.v20170301-0400\splash.bmp
(您的路径将非常相似,手动导航到它)。
Long version:
长版:
1) Find “config.ini” file
Find the Eclipse configuration file “config.ini” in the following location:
{eclipse.dir}\configuration\config.ini
2) Find “osgi.splashPath”
Open the “config.ini” file, find the “osgi.splashPath” to find out where Eclipse IDE's splash image is stored, e.g.:
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
The default splash image is stored in:
{eclipse.dir}/plugins/org.eclipse.platform folder
3) Find the “splash.bmp” image
Find the “splash.bmp” image in the following location:
{eclipse.dir}/plugins/org.eclipse.platform_3.3.200.v200906111540/splash.bmp
(
3.3.200.v200906111540
is the Eclipse version in this case, it may be different than yours)4) Replace it
Replace the default “splash.bmp” image with yours (you may want to keep a backup copy of the original).
5) Done
Restart your Eclipse IDE to see the result!
1) 找到“config.ini”文件
在以下位置找到 Eclipse 配置文件“config.ini”:
{eclipse.dir}\configuration\config.ini
2) 找到“osgi.splashPath”
打开“config.ini”文件,找到“osgi.splashPath”,找到Eclipse IDE的splash image的存储位置,例如:
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
默认启动图像存储在:
{eclipse.dir}/plugins/org.eclipse.platform folder
3) 找到“splash.bmp”图像
在以下位置找到“splash.bmp”图像:
{eclipse.dir}/plugins/org.eclipse.platform_3.3.200.v200906111540/splash.bmp
(
3.3.200.v200906111540
在这种情况下是 Eclipse 版本,它可能与您的不同)4)更换它
用您的图像替换默认的“splash.bmp”图像(您可能希望保留原始图像的备份副本)。
5)完成
重新启动 Eclipse IDE 以查看结果!