JavaFX Preloader splashscreen not working when launched with install4j - javafx-8

I have added a splash screen to my standalone JavaFX application (Java 8), using the Preloader api.
Everything works fine from the IDE and when running the packaged jar from the command line.
However, when I run from an install4j launcher, the splash screen is not shown.
I am able to see the application icon in the taskbar when the splash screen is supposed to show, then it disappears briefly, to reappear again when the app is finally shown.

I have tested the JavaFX preloader with the JavaFX DataApp sample application:
https://github.com/ingokegel/javafx-dataapp-sample
See this commit for instructions on how to build the install4j project.
I can see the preloader. Please check it out and investigate how your project is different from the JavaFX DataApp sample application.

The problem was caused by the parameter -Dprism.order=sw that I was using from the installer. After removing that VM parameter, the preloader workded fine.
My project is a standalone application, where Preloader doesn't add much benefits, and I do need to disable hardware acceleration, so I ended replacing preloader with a simple stage and initialization done in another thread, as shown in this answer.

Related

Why don't layouts automatically resize to fit the window in a Xamarin Forms UWP app?

When a user enlarges a window hosting a xamarin.forms UWP app the layout/page does not resize, and the window controls disappear. If you make the window smaller everything reposition as expected. How do you get this to behave properly? I thought it was supposed to scale automatically.
I have downloaded and tested the project you provided on GitHub and it works normally and resizes as expected. I suspect the problem in your case may be that the UI thread was frozen or you Visual Studio Debugger froze the app. I would suggest restarting your PC and then doing Clean solution from Visual Studio and rebuild again. After these steps it should work normally. If not, perform repair of Visual Studio.

Multiple tray icons when using TrayItem in Windows 10

I have a standalone Java based SWT in the front end application. I contribute a custom icon to the system tray menu using SWT tray
trayItem.setImage(image);
Now whenever my application is closed, I dispose of the tray item.
But when my system goes to sleep and comes back again, the application is very much running. When the system comes back again, my application tries to update the tray item's image.
While updating the image I see multiple tray icons appear in the system tray. So the number of icons keep on increasing as many times as my applications wakes up.
Unfortunately this is only reproducible on Windows 10 but not on earlier versions. Has anyone experienced this problem? I don't have any windows 10 system with me. Otherwise I could have written a sample code to reproduce it.
Fix for this issue is available from Eclipse 4.7 (Oxygen).
You are facing bug defined on below link
https://bugs.eclipse.org/bugs/show_bug.cgi?id=488739.
You need SWT 4.7+, the issue has been fixed in the same

"Web App Launch View Activator" displays repeatedly in Progress tab on Eclipse during GWT development

I have a fairly simple GWT application that when I run in dev mode shows "Web App Launch View Activator" in the Progress tab in Eclipse. This is causing me problems, taking up a chunk of processing on my machine and generally slowing things down. It does this for a while (a minute to several miuntes), then stops.
It does this every time I visit a new "page" in my application (i.e. launch a new Activity and add the associated view to the page) or trigger some UI activity, but not all. So, seems to happen when something new is added to the DOM maybe?
When it is displaying "Web App Launch View Activator" refreshing the browser to reload the application takes a very long time. If I wait for things to settle and the "Web App Launch View Activator" message is no longer displaying then a browser refresh is quite quick.
What is the Eclipse Google Plugin doing when it is displaying "Web App Launch View Activator", what triggers it and what can I do to reduce the impact on my development?
I'm running in Firefox 20.0.1 and IE10.
Found it.
The problem seems to be related to the log level used when launching the GWT application (as set by the -logLevel command line arg or on the GWT tab in the Eclipse Debug Configurations dialog).
I had changed this to DEBUG to highlight some other problems I was having and then left it at that setting. Changing it back to INFO and the repeating "Web App Launch View Activator" jobs in the Progress tab no longer appear.

Eclipse RCP: How to programmatically obtain the application window image?

When building an Eclipse RCP application you get to define the window images in the .product and plugin.xml files for the application plugin. These are the images that show up in the upper-left corner of the main application window. But say you want to use this same image in a dialog window that your application might open. How do you get access to this image programmatically?
In my use case I am building two products that only differ in branding elements so I wanted all my dialogs to be consistent and use the same branding image that the main application window uses.
I figured out the answer through some trial and error and failed web searches. Turns out it is as simple as:
shell.setImage(ApplicationWindow.getDefaultImage());
(for completeness, I'm currently developing in Eclipse 3.8. Not sure if this carries forward to Juno/4.X)

Activate the activator class

I am using eclipse 3.6. I created one sample plugin application. It is neither a eclipse rcp nor workbench. Now when I run the eclipse I want that plugin also to be loaded. But I dont want to use IStartUp. Because what I have found out is
IStartup will be called after the workbench is loaded. I want to refresh some menu. So Is there any way to activate my plugin while the eclipse loaded?
I tried to use Bundle Activation policy. But that is also not activating my Activator class. I just put one System.out. println("Inside start()"). So that is not called. Now can I make it activate my activator?
EDIT:
what my exact requirement is, I have created one workbench application.It is not eclipse rcp application. Now I want to remove the following menu and menu items from the eclipse before the eclipe is loaded.
1. File Menu
2.) Search Menu
3.)Run Menu
4.)Help->search,Dynamic Help,Key assist,Tips and trick,Report Bug,Cheat Sheet.
These menus are inbuilt menu of eclipse. So that is the reason I have to do in this way.
So I already implemented by using startup extension point. But the early startup is called after the eclipse is started.So I need to do some refreshment on the workbench.Then only the menu item will get removed.So I thought I need startup extension point will not satisfy my requirement as it doesnot refresh the workbench.I need to activate the my plugin and refresh the workbench before it is loaded.
Thanks
Bhanu
You can set the needed start level for your plugin using touch point instruction.
You are just a plugin that expects to run in the Eclipse IDE?
Then the answer is, you cannot do what you want.
If you start before the workbench has finished initializing, most of the services that could be used won't work: The workbench itself, menu service, command service, etc.
For most plugins in eclipse, the plugin.xml should be used to add menus, views, editors, etc to eclipse. When necessary, the framework will instantiate them.
org.eclipse.ui.IStartup is available and as you mentioned it will be called after the workbench has been initialized, but before any windows have been shown. It's not to be used lightly, and not by plugins contributing to the UI as it allows all extension from that plugin to be loaded.
EDIT:
If you are an RCP app, you control the main menu. As an RCP app, you have access to the ActionBarAdvisor, WorkbenchAdvisor, WorkbenchWindowAdvisor, which all have lifecycle methods.
If you are an an eclipse plugin, you can add to the main menu ... you cannot easily remove from the main menu. This is by design. Start levels and org.eclipse.ui.startup are 2 mechanisms that won't do what you want.
You still need to answer these questions:
There might still be a way. The crux of your problem is: "I want to refresh some menu"
What kind of menu (popup, main menu,
compound list of menu items in a
menu, etc)?
Where is the menu contribution coming from?
Which specific menu item is it?
Please edit your question (do not comment) and include the information from the above 3 questions, please.