MichaelJakubec / gtkjfilechooser

Automatically exported from code.google.com/p/gtkjfilechooser
1 stars 0 forks source link

UI replacement is failing on jdk7 on ubuntu 11.10 #84

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Just run the demo

I believe it might be some classloader shenanigans.

Original issue reported on code.google.com by i30817@gmail.com on 27 Dec 2011 at 5:52

GoogleCodeExporter commented 9 years ago
/gtkfilechooser$ java -jar gtkjfilechooser-demo.jar 
UIDefaults.getUI() failed: createUI() failed for 
javax.swing.JFileChooser[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignment
X=0.0,alignmentY=0.0,border=javax.swing.border.EmptyBorder@4c2a38be,flags=0,maxi
mumSize=,minimumSize=,preferredSize=,approveButtonText=,currentDirectory=,dialog
Title=,dialogType=OPEN_DIALOG,fileSelectionMode=FILES_ONLY,returnValue=ERROR_OPT
ION,selectedFile=,useFileHiding=true] 
java.lang.reflect.InvocationTargetException
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:729)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:774)
    at javax.swing.UIManager.getUI(UIManager.java:1002)
    at javax.swing.JFileChooser.updateUI(JFileChooser.java:1798)
    at javax.swing.JFileChooser.setup(JFileChooser.java:370)
    at javax.swing.JFileChooser.<init>(JFileChooser.java:343)
    at javax.swing.JFileChooser.<init>(JFileChooser.java:296)
    at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.<init>(FileChooserDemo.java:147)
    at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.main(FileChooserDemo.java:650)
Exception in thread "main" java.lang.NullPointerException
    at javax.swing.JFileChooser.isTraversable(JFileChooser.java:1596)
    at javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:575)
    at javax.swing.JFileChooser.<init>(JFileChooser.java:344)
    at javax.swing.JFileChooser.<init>(JFileChooser.java:296)
    at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.<init>(FileChooserDemo.java:147)
    at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.main(FileChooserDemo.java:650)

Original comment by i30817@gmail.com on 27 Dec 2011 at 5:53

GoogleCodeExporter commented 9 years ago
Mmmm i just realized i no longer need the project for java 7.

Thanks for your great work prodding Oracle ;)

Original comment by i30817@gmail.com on 27 Dec 2011 at 6:38

GoogleCodeExporter commented 9 years ago
:|

Spoke too soon - guess i need FileChooser to select files and dialogs.

Original comment by i30817@gmail.com on 27 Dec 2011 at 7:15

GoogleCodeExporter commented 9 years ago
I get a very similar error on jdk 1.6 (using openjdk not sun)

Original comment by arju...@gmail.com on 26 Jan 2012 at 5:29

GoogleCodeExporter commented 9 years ago
Got the same Exception when running the demo. The file dialog won't show at all.
java version "1.7.0", Arch Linux

Original comment by markus.k...@gmail.com on 31 Jan 2012 at 9:39

GoogleCodeExporter commented 9 years ago
Update: Same septup but older VM java version "1.6.0_17" works. Both VMs are 64 
bit. gtkjfilechooser seems to not work with java 7.

Original comment by markus.k...@gmail.com on 31 Jan 2012 at 9:51

GoogleCodeExporter commented 9 years ago
Since JDK 1.7 the new FileDialog (that uses GTK natively) supports also 
multiple file selection:

http://download.java.net/jdk7/archive/b123/docs/api/java/awt/FileDialog.html#set
MultipleMode%28boolean%29

Oracle wanted to add my code for the JFileChooser, therefore I worked on a 
GtkFileDialog peer and they include my contribution in the OpenJDK 7+

Original comment by c.ce...@gmail.com on 31 Jan 2012 at 11:02

GoogleCodeExporter commented 9 years ago
Thanks, for your work. Looks promising! However ImagePreview seems not to be 
available with the new AWT FileDialog.

Original comment by markus.k...@gmail.com on 1 Feb 2012 at 1:53

GoogleCodeExporter commented 9 years ago
Thing is, i'm not looking for multiple selection but directory selection (or 
file and directory).

Original comment by i30817@gmail.com on 31 Mar 2012 at 12:28