开发者

Why is javaw.exe Randomly Disappearing?

I am having a ghost problem. I have included Java in my install package so that I don't have to rely on the user already having Java. The problem is that every now and then the javaw.exe disappears in my package! Upon double-clicking my Desktop-shortcut I get a message saying that it can't find javaw.exe and it asks me if I want to remove the shortcut. I have not been able to confirm it but I think it only happens when the PC is restarted. But not every restart. 开发者_如何学JAVAThat is what makes it a ghost problem. I can't track down what is causing it or when exactly it happens.

This has occurred multiple times on Vista as well as once (so far) on XP Pro. When it happened on the XP Pro, my shortcut also was changed. javaw.exe was replaced with java-rmi.exe. That may have been the result of Windows' search for a solution... Because I have not found any patterns to when the .exe gets deleted I have not been able to test if this issue exists on XP Home or Win 7.

The shortcuts are to:

"C:\Program Files\My Application\jre6\bin\javaw.exe" -jar "C:\Program Files\My Application\main.jar"

There are 3 processes which use the Java in my package. They are all for the same jar, the difference is, I add --argument to the end so as to run a different part of main.jar.

  • One of the processes (added after my problem started appearing on the Vista) starts when the user logs in, it handles the System Tray icon. It uses Java, Swing and JavaFX.
  • One starts at Start-up and runs in the background as administrator. This only uses Java.
  • The other is the GUI interface that runs when the user clicks one of the shortcuts. This one is Java and JavaFX with a rare Swing JDialog.

I am using Java 6 and JavaFX 2 build 36 or 40 (not sure how to be sure which one I have). I don't have any virus scanner on the XP Pro. The Vista does have Windows Defender but nothing else. On the Vista I manually ran the scanner and javaw.exe was not effected. There are no items in my Quarantined area and no indication that javaw.exe was removed by Windows Defender.

Edit: I tried renaming javaw.exe to myjavaw.exe but it happened again on the Vista. There were no items in Windows Defenders Quarantined area. I think a virus scanner can be ruled out. Again this time, it happened after a reboot. Maybe my background process is not ending properly? Could that cause Windows to remove the exe?

Is this my problem or does it have to do with Java or JavaFX and how do I prevent it?


Javaw.exe has been known to trigger false positives with some virus checkers; e.g.

http://java.com/en/download/faq/Trojan3.uj.xml

Try looking in your virus checker's quarantine area / logs to see if the executable has turned up there. If it has, then update your virus checker and (if the problem still occurs) contact the supplier.


This has been resolved.

It turns out that my Uninstall program does a very thorough job. Because I was not doing my part properly when it came to uninstalling the program, the uninstaller could not delete javaw.exe as well as some other files. It then created a task for the next reboot. But I re-installed the program before the next reboot. It then deleted the javaw.exe of the newly installed program.

I am now doing my part of the uninstall process (ending the background program that was using javaw.exe among other things). So, that problem has stopped occurring.

Thank you for the other suggestions. They were very educational.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜