I wonder if the java command accepts variables with double quotes on the path. In order to ensure the path and space problems.
Better use "%1". This is a bat file, and the first variable is introduced when dragging and dropping the file.