JDK-6646617 : Dropping a file on a Java Web Start desktop symbol DELETES the file
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2008-01-02
  • Updated: 2011-02-16
  • Resolved: 2008-02-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b13Fixed 7Fixed
Description
FULL PRODUCT VERSION :
6.0

A DESCRIPTION OF THE PROBLEM :
I am the author of Pauker (http://pauker.sourceforge.net), a free flashcard programm written in Java. I use Java Web Start for application deployment.
 
I got a bug report from a user who wanted to start Pauker by dragging and dropping a lesson to the Pauker Java Web Start desktop symbol. Unfortunately, this failed and the lesson was DELETED! This kind of bugs are catastrophic.
I could reproduce this problem both on Linux and on Windows. The following exception gets thrown at startup:
 
 InvalidArgumentException[ Ung��ltige Argumente angegeben: {C:\Dokumente und Einstellungen\Nutzer\Desktop\test.pau.gz, C:\DOKUME~1\Nutzer\LOKALE~1\Temp\javaws6 }]
 at com.sun.javaws.Main.launchApp(Unknown Source)
 at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
 at com.sun.javaws.Main$1.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)

There is already a forum discussion here:
http://forum.java.sun.com/thread.jspa?threadID=5245103&tstart=0


REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION Problem is actually in two places, _tempfile is set to args[0] which is wrong in Main.java. This needs to be fixed too for the testcase to work.
08-02-2008

EVALUATION When javaws.exe is invoked with more than one non-parsable arg (ie more than one arg that the native code dosn't sepcifically recognize) the order is reversed, and the first one is moved to be the last one. This causes the java code to think the second arg is the jnlp file. The native code also makes a copy of the jnlp file and passes that instead of the original, and passes -Djnlpx.remove=true to java. Unfortunately, this causes the javaws java code to remove the other file instead of the jnlp file copy.
16-01-2008