5 Replies Latest reply: Sep 22, 2010 6:52 AM by DarrylBurke RSS

    Desktop.open() method doesn't work,

    843810
      Hi,

      I'm developing file explorer with JDK6.
      But when I try to open file with native asscociation programs with java.awt.Desktop class, I found that's not work at all.

      there is no response, exception and error. it just 'silent.'
      I checked each line of code. File is exist, Desktop support Open action.
      OS association with file is correct. I couldn't find any problem.

      so I tested tutorial code 'DesktopDemo'. it worked well Browse() but not Open(). open() method isn't work. (It also silent)

      How can I open file with native association?
        • 1. Re: Desktop.open() method doesn't work,
          796365
          Desktop methods have some problems with some files, don't know why. For me, a .doc file won't open.

          I'm not aware of any Java alternative.
          • 2. Re: Desktop.open() method doesn't work,
            843810
            Thanx for your answer :-)

            I solved it by using lastest JDIC Component.

            I think JDK Desktop Component and JDIC Desktop Component are

            same. but there are some difference.
            • 3. Re: Desktop.open() method doesn't work,
              843810
              I have the same issue. Has someone a ref where this is handled?

              Thanks
              Wolfgang R.
              • 4. Re: Desktop.open() method doesn't work,
                843810
                This seems to be a long-running problem related to Desktop.open in combination with Windows and some Account/Profile settings on Windows which are as of yet undetermined.

                Unfortunately the moderators of this forum have the tendency to close/lock old topics so we cannot add new information to a long running problem anymore after a while. They forgot to close this one so luckily I can still add some info here.

                I would like to invite anyone wanting to read details on and discuss this issue to do so on my blog. The comments on that post will never be closed or locked.

                java.awt.Desktop open() fails silently without exception
                [http://stijndewitt.wordpress.com/2010/09/22/java-awt-desktop-open-fails-silently-without-exception/|http://stijndewitt.wordpress.com/2010/09/22/java-awt-desktop-open-fails-silently-without-exception/]

                You may also want to have a look at these related (but unfortunately locked) forum posts:
                [Desktop.open fails without exception, nothing happens (Locked)|http://forums.sun.com/thread.jspa?threadID=5338022]
                [Desktop.getInstance().open(file) does nothing (nothing happens) (Locked)|http://forums.sun.com/thread.jspa?threadID=5413798]
                • 5. Re: Desktop.open() method doesn't work,
                  DarrylBurke
                  Please don't post to threads which are long dead, and don't hijack another poster's thread. When you have a question, start your own thread. Feel free to post a link to a related thread.

                  Discussions may be kept on the forum. This is not a place to advertise your blog.

                  I'm locking this thread now.

                  db
                  StijnDeWitt wrote:
                  This seems to be a long-running problem related to Desktop.open in combination with Windows and some Account/Profile settings on Windows which are as of yet undetermined.

                  Unfortunately the moderators of this forum have the tendency to close/lock old topics so we cannot add new information to a long running problem anymore after a while. They forgot to close this one so luckily I can still add some info here.

                  I would like to invite anyone wanting to read details on and discuss this issue to do so on my blog. The comments on that post will never be closed or locked.

                  java.awt.Desktop open() fails silently without exception
                  (blog link removed)
                  >
                  You may also want to have a look at these related (but unfortunately locked) forum posts:
                  [Desktop.open fails without exception, nothing happens (Locked)|http://forums.sun.com/thread.jspa?threadID=5338022]
                  [Desktop.getInstance().open(file) does nothing (nothing happens) (Locked)|http://forums.sun.com/thread.jspa?threadID=5413798]