Here is a java prog with one operative line that just creates a JFileChooser.
It hangs on java 1.7 on Linux, but I used to use JFileChooser all the time and it worked fine.
It still runs fine on my Mac with java 1.6.
Does anyone know what to do about it?
What is your intention when passing in "." to the constructor? If you want it to point to the user's default directory then you should pass in null instead. Passing in a file path will always give different results on different platforms.
Slightly longer for null than a named folder, hardly any difference for root.
posted 6 years ago
E Armitage wrote:Do you get the same delays with null passed in?
Passing a null argument is ambiguous:
JFC_hang.java:8: reference to JFileChooser is ambiguous, both method JFileChooser(java.io.File) in javax.swing.JFileChooser and method JFileChooser(javax.swing.filechooser.FileSystemView) in javax.swing.JFileChooser match
Passing NO argument works quickly on the Mac, and hangs on Linux.
posted 6 years ago
E Armitage wrote:Also does the time become different if you run as root vs non root user?
Previous to last Friday, the delays were insignificant. Since then the delays have been HOURS; I kill the thing after waiting, say, over night.
It runs on my Mac regardless of whether I am root or not. On Linux I am unable to use root, so I don't know. The java versions are different:
iMac: java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
linux: java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
Crusading Chameleon likes the size of this ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop