STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Note that in Java 8, the file chooser will strip the trailing whitespace and change to the "x" directory, which is also probably the wrong thing to do, but not nearly as bad as an unexpected and not-easily-catchable runtime exception. If directory "x" exists, attempting to change to it in JFileChooser by entering text in the "File Name:" field and hitting enter will fail with an InvalidPathException if "x " (actual filename with a space added) is accidentally entered. Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode) Java(TM) SE Runtime Environment (build 9.0.4+11)
0 Comments
Leave a Reply. |