File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cant get App to respond to DnD from outside only on Linux (maybe a swing forum q)

 
Ravi Sathish
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings Ranchers,

Its a Swing DnD based question for Linux. Sheriff if you feel its more suited for Swing forum please move it to that forum.

I am trying to drag and drop files from Desktop onto my Java application. it works well with Windows XP.

But when I try to do the same on Redhat Linux(psyche) with KDE version 3.0.3-8. the components are not responsive at all. I thought its got to do with the way I was running my Java application through the shell. Hence i tried running my app through RunCommand on KDesktop but still the same result.

I appreciate any suggestions/solutions/work arounds for this problem.

TIA
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, there are two different common DnD mechanisms used on Linux. They're mutually incompatible. One is more or less part of X, while the other is a Linux-specific innovation. It's been a while since I had to deal with this, but last time I looked, Sun's JRE and KDE weren't using the same one. I think there's very little you can do about this, unfortunately.

One app I recall that was Swing-compatible DnD-wise was Mozilla -- you could DnD text between Mozilla's URL bar and Swing apps.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well - I don't have kde installed on my current PCs, but remember, that you can do it, if you do it while opening the java-application (I can't with gnome-nautilus).

Somewhere the action is specified to happen, by double-clicking a .class or a .jar file.
I guess right-clicking on .class-File opens a context-menu, where you may modify what to happen.

The action is to start java with this class, and to pass the arguments.
Something like:

perhaps with full name of path to java included.

I can't test it, but I hope this will move you a step ahead.
[ August 13, 2005: Message edited by: Stefan Wagner ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic