• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic