This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JFileChooser and SecurityManager  RSS feed

 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've hit a problem with JFileChooser and would appreciate some advice.
I've implemented JFileChooser in my Client to select the db.db file location and it's working fine.
However, implementing the same thing is the Server, the JFileChooser keep trying to read A: drive even if I specify
new JFileChooser(".");
I believe it's due to the SecurityManager installed in the Server.
Can anyone advice how do I get around the problem?
Thanks.

Han Ming
 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Just like to post here for a workaround to the problem.
Apparently, there seems to be a bug in JDK for Windows that caused the problem and the workaround is discussed in the java.sun.com forum.
Below is the link to it.
http://forum.java.sun.com/thread.jsp?forum=57&thread=137489
I've tried and it works for me.
Hope this helps.

Han Ming
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!