This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
Ranch Hand
Posts: 131
  • 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
 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • 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.
 
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!