wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Cant get App to respond to DnD from outside only on Linux (maybe a swing forum q) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Cant get App to respond to DnD from outside only on Linux (maybe a swing forum q)" Watch "Cant get App to respond to DnD from outside only on Linux (maybe a swing forum q)" New topic
Author

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

Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
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

Joined: Jul 08, 2003
Posts: 24166
    
  30

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.


[Jess in Action][AskingGoodQuestions]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

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 ]

http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cant get App to respond to DnD from outside only on Linux (maybe a swing forum q)
 
Similar Threads
drag and drop from file system to web page or standalone application
Deploying executable within a WAR
What Tools that you usually use for developing Swing application?
Finding Location of a recently created file?
Memory Leakage - Is "System.gc()" good to help solve this?