JavaFX application "Unable to invoke method" / "Unable to launch JVM" - java

We've got a JavaFX 2 application developed in NetBeans 8.0.2, being packaged for deployment with WiX 3.9.1208, but we are having a problem on a few seemingly random machines.
After installing, when attempting to run the application, a dialog box is shown with the name of the executable and "Unable to invoke method" in the title. After clicking OK, the same box is shown again but with "Unable to launch JVM" in the title.
We are bundling Java 8u45 32-bit with the MSI, and everything seems to work on most machines, but we have had the above issue a couple of times on users machines, across WinXP, Win7 32-bit and Win8.1 64-bit running on a Mac in Parallels. Doesn't seem to make a difference whether Java is already installed on the users machine or not, and we can't figure out what could we causing the problem.
We haven't customised the WiX deployment in any way, just used what was out the box to start with, and we have very little experience in deploying Java applications.
We've been unable to reproduce this issue on any of our setups. Thanks in advance for any ideas on what could be happening!
Regards,
Richard

Related

Can't create Mac executable from Eclipse Java

I am updating a 100,000 line Mac OSX application from 2010 that uses Eclipse Galileo and whatever version of Java was current at that time. The application controls several educational telescopes.
When I try the Eclipse "export to Mac application bundle" menu item, I get an output called MicroObservatory.app, but inside there are only the info.plist, some icons, and the "MacOSX" folder and the "Java" folder, but the "MacOSX" folder and the Java folder are empty!
I tried following a tutorial using appbuilder, but I found out that it was no longer current, couldn't be downloaded from the Oracle site, and was replaced by ORacle's "jpackage" - however, when I try to run "jpackage" I get an error message saying "unable to find a Java Runtime that supports jpackage", despite my having reinstalled the latest Java, and also set the path variable "JAVA_HOME" to usr/bin/java, which is where Java resides.
Creating an "executable JAR" gives me a runnable application (!) which can be run by invoking "java -jar MicroObservatoryRunnable.jar", which shows that java is there and everything can be run, however it doesn't get my a clickable application with an icon. Can anyone suggest what the problems could be? The 12+ years ago versions of Eclipse and Java created a "Mac application bundle" according to the notes I have from that time.
I have had to make many modifications to the Java code, and the goal is to have it running on new Macs with the latest OS and Eclipse and Java, so going back to the old versions is not an option.
Thanks so much ! (My native language is C, and mostly I developed embedded systems, such as the telescopes that are run by this software, so sorry I am not that Mac literate.)

IBM i Access doesn't start on Fedora

Here is my setup:
System76 Gallago Pro
Fedora 30
OpenJDK 1.8.0_201 (I did try Oracle as well)
I installed per IBM's instructions, using the installer script from the command line. I went through the installer menu and got to the success screen. I have done this a half dozen times on other machines and with OS upgrades on this same machine.
When I use the super key to find the program it is there; I click on the icon and my box returns to the desktop - but i Access doesn't start.
If I start via the command line using the start script, I get MSGGEN045 - A graphical user interface is not available.
If I run the java program directly
java -Xmx1024m -jar /opt/ibm/iAccessClientSolutions/acsbundle.jar I get the same message as when using the start script.
How can I get past this error? Or,what else can I do to track down what is happening?
I've had two issues when running iACS on Fedora. The first was the OS had a headless JVM installed by default. The second was something to do with sound.
Based on "MSGGEN045 - A graphical user interface is not available", I'd suspect a headless JVM.
HTH
Edit:
I checked for the headless JVM at the direction of IBM support. I don't remember the exact wording, but the name of the installed package was a dead giveaway. A simple "rpm -qa" was all it took.
I don't have anything Fedora specific but it seems that you either didn't install a Java Runtime Environment or just a headless version of it (jre-headless). Install a full JRE and everything should be fine.
You could check this with yum:
yum list installed | grep jre
Fedora is running wayland and not X11. Java doesn't play nice with wayland as of yet. As far as I know there are no plans yet to fix that. This is a good place to start https://www.ibm.com/developerworks/community/forums/html/topic?id=1b366edf-0e70-40d5-8d92-30d401edd97a

Javapackager deploy IOException on second time

i noticed that i can not deploy a JavaFX application with javapackager two times without closing the IDE / commandline. I want to create a native image of my application on a Windows 10 machine.
After the second deploy I get Exception: java.io.IOException: Access denied. After closing and reopen it works for one deploy again.
I can reproduce this Issue with Netbeans (create a JavaFX Application, enable Native Packaging, and then package as "image only") on 3 different PCs with Oracle JDK 8u121 and Windows 10.
I also get this error in a gradle project in eclipse trying to deploy it with the official ant task (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/javafx_ant_tasks.html)
Also tried it on an Ubuntu VM and OpenJDK. There is no problem.
Can somebody of you reproduce this error on Windows 10, too?
Is there a workaround or offical bug report for this?
Thanks in advance
Joey
This is a known problem, the cause is a file-handle leak and already got reported by me: https://bugs.openjdk.java.net/browse/JDK-8148717 It is only windows-specific, as the file-locking on the JRE-folder works on windows-systems, other OS don't lock.
This bug got worked around inside the JavaFX-Gradle-Plugin, as gradle starts daemons, which hold up the JVM, the JavaFX-Maven-Plugin didn't need it, because the JVM is always closed.
Disclaimer: I'm the creator of the JavaFX-Gradle-Plugin and maintainer of the JavaFX-Maven-Plugin.

OSX Blocking JNLP Launch Java1.8U40 - Anyone Know Why?

We deploy our application as a JNLP launch file and/or as a webpage applet.
I have a customer that updated his MAC OSX system to the latest Java Version 1.8_40. After upgrading the JNLP launch stopped working. It seems to start Java (flashes blue java logo) then stops. No Exception is thrown. I suspect yet another OSX security hurdle.
We adjusted his OSX Security settings to trust our application.
We adjusted his Java security to trust our site.
We also adjusted the Safari preferences to allow the application to run unrestricted ("unsafe mode").
The application is signed with a code signing certificate.
The customer can use the Applet launch method using the safari Java plugin.
All other customers (OSX & Windows) are generally fine.
If this is a new MAC Java issue I'd like to get ahead of it.
Anyone else out there see this? Any clues about what is causing the issue?
Our guess is that the cause of this bug has been backported to 8u40. We find that the application cannot get focus once the new blue Java splash screen is shown. We can also reproduce this on all the demo webstart apps on Oracle's own site, so it isn't our code.
You can confirm this bug by running your webstart instance with -Xnosplash to skip that splash screen. Unfortunately you cannot add that parameter to the jnlp file.
We can only reproduce this problem on OSX 10.10 (Yosemite).
A workaround (if you can control the client Java settings) is to add "-Xdebug" in Java Control Panel -> Java -> View... -> Runtime Parameters.
Update: the bug has been fixed and backported to 1.8u40. Oracle have also silently updated their downloads to the new build (1.8u40b27) as can be seen here I don't know that people already running 1.8u40 will get an update automatically.
When i add '-Xdebug' in the Java Control Panel as a Runtime Parameter it works for me.

Java web start doesn't launch

On my Windows 7 x64 machine, I'm having problems launching my remotely deployed Web Start app (the Web Start app launches correctly on another PC as expected). In IE or FF, I click on the web start launch link, the JNLP is downloaded, it seems to get executed and nothing happens. I see javaws.exe processes running. I don't see a java.exe running.
I don't know if it's related but I also can't get the java console to run. In the Control Panel Java applet settings, I have have enabled "Show console" and "place Java icon in the system tray". I don't see the Java icon in the system tray either.
I'm running Java 1.6.0_21 (32 bit). I'm able to run Netbeans so the it appears as if Java is installed correctly on my machine. Why isn't web start working?
A firewall on my corporate joined domain was the problem. It was preventing web start as well as other types of apps from working correctly or even launching. Opening ports resolved it.
Are you absolutely certain that your Windows browser is binding the JNLP suffix to the javaws executable?
If you download the file, and double click, does it open correctly? If not, then right click, and investigate what is presented under Open With...
I had the same symptoms when I switched JNLP specifiction to 6.0. So I simply solved it by going back to 1.5, which I think is default in NetBeans, at least up til 6.7.
<jnlp spec="6.0+"...

Categories

Resources