Lacking true native "Deferred" or "Promised" file drag from JAVA

Hello all,
I have been playing around with the drag and drop APIs for quite some time (about 1.5+ years) and I am having a problem producing functionality similar to dragging network-based files in "Windows Explorer". I am not sure if I have overlooked something or if DnD with the native OS is lacking a huge piece of functionality. I would appreciate hearing people's feedback or experience with similar problems.
First, some background. My company's applications provide remote access to a central storage of digital assets (read "files"). Our client provides a view of the files on the server. We have C++-based applications running on both Windows and the Macintosh are able to drag from our application to the desktops and Explorer windows. However, in these drag operations, they each employ a mechanism to hold-off providing the native OS file data until the drop has successfully completed. The OS in each case provides a "callback" to notify our application that the drop succeeded and that we should go and transfer the files. In this way, we can pay the price of transferring the files locally ONLY when the drop occurs (same thing can be applied to the Clipboard).
However, from what I can tell, the AWT/SWING DnD APIs provide no mechanism to do this type of operation. In order to drag files to the native OS, you must explicitly provide the files BEFORE you initiate the drag operation (or place them on the clipboard). This places doing viable native drag and drop from our JAVA applications in serious jeopardy and is causing a great deal of displeasure from our management who are questioning the "readiness" of JAVA.
Since I can't seem to find a way to accomplish this, I have tried entering enhancement requests (about 8 to date), but I have failed to hear back about a single one. I think that either Sun does not monitor some of their enhancement lists or they do not want to address this heavily-desktop oriented issue (I am not sure if this scenario is even possible on a UNIX machine where most things must be "mounted" locally before they can be viewed -- SMB browsing may be the only exception that comes to mind but I do not know if anyone has done this).
In the meantime, we have attempted to change the workflow of our application. We have provided a JAVA window that mimics the filesystem so that we can get the drop event and provide the illusion of a "deferred" drag. In addition, we have provided and "export" feature that places the file locally afterwhich they may grad anywhere they desire. Both of these solutions are hacks and leave a very bad taste in our user's mouths. We can try to write JNI pieces, however, there are just too many UI locking issues to contend with to ensure a timely release of our software.
Has anyone else run into this before? Can anyone provide a more useful workaround? Is it possible to get this issue looked at from SUN? If SUN is looking at it already, what kind of timeframe are we looking at until a potential solution?
Thank you for your time.
Michael Macaluso

I am curious about the verdict for "deferred" file transfers. I have hit the same wall. I have a JAVA client window that allows the user to browse a network file repository. Most of our clients use a Windows platform, so that is my primary interest. I was hoping to: 1)capture the drop event, 2) request the data from the server, and 3) stream it to a temp file/ or to the destination directory, and 4)allow the file system to transfer the temp file. However, I cannot find any documentation regarding this issue.
So I wanted to swtich tracks and set my transferrable data to represent a file on the central server, but that would require a URL object, and I have failed to set the MIME types correctly for NTFS to recongize the transfer. Sorry I don't have any answers. Any suggestions?

Similar Messages

  • Remote File accessing from java WebNFS

    Hi
    I am using java WebNFS package provided by sun to access the remote file system from java class. A class called com.sun.xfile.XFile does this functionality and it is almost similar to java.io.File. My issue is I am trying to lookup a Windows NT File Server through the XFile constructor and list out all the files in a particular directory. When I run the sample class from a Windows Machine it is working fine. But when I run the same class from a Linux machine, the XFile class couldnt resolve the path. Do those Linux server and the Windows NT File server should have been mounted ? Suggestions are welcome. Thx in advance.

    viswa07 wrote:
    Ya Darryl.Thanks for ur reply.Tell me now how to do that action..????What Darryl is pointing out is that no one is going to reply to you because you have a history of not replying to questions - think about it - if someone asked you a question and you asked them a question to help you understand what they were asking and they walked away, and then did that again - would you keep trying to help?

  • Call header file(.h) from java

    i want to include a .h file in my java program, is it possible? how?

    i want to include a .h file in my java program, is it
    possible? how?Why?
    What are you attempting to do?
    Call C/C++ (native) code from Java? Look into JNI
    http://java.sun.com/docs/books/tutorial/native1.1/
    Or just do some pre-processing stuff (like include a file, some #defines etc), well. Java does not support that, but you can always use a 3rd party program.

  • How to call windows help files .hlp from Java program

    Hai all everybody
    How to call windows Help file that is xxx.hlp files from java programs
    any help great!!!!
    regards
    veeru

    How about
    Runtime.getRuntime().exec("start xxx.hlp");

  • Determining the name of the jar file running from JAVA

    Hi everyone,
    This is probably a silly question, but how do you determine the name of the jar file running from within the jar file.
    E.g. If I'm running the jar file "Test.jar", then how can I get the String value "Test.jar" from within my program?
    Any help would be appreciated! Thanks:)

    I think that you can use the solution above to get the jar file resources associated with a particular jar file, and then use the JarFile class to get a manifest of whats in there, and then find your class?
    This is only off of the top of my head, and I haven't tested it. Let me know if it works

  • Can i open a flase file (swf)from java application

    i tried to converte the flash file to exe type
    and call
    Runtime.getRuntime().exec(flashName.exe)
    and it worked.
    the broblem is that the exe file is big.
    i want to open the swf file not the exe.
    i tried to call
    Runtime.getRuntime().exec(flashName.swf)
    but exception was throwen.
    does someone know how can i open the swf flash type?
    thanks .

    I just thought of an idea. Assuming that the flash plugin is installed and that you're targeting Windows, why don't you use one of the Java-COM bridges available on the internet and integrate the flash player into your application?
    I know of a few such bridges and I've provided links below to help you. Using these bridges means you won't have to rely on IE or opening a browser to view the file. The player is a seamless part of your application.
    http://j-integra.intrinsyc.com (commercial)
    http://sourceforge.net/projects/jawinproject/ (open-source, freeware)
    http://www.relevancellc.com/halloway/JavaWin32.html (a whole bunch of links for Java-COM interoperation)
    http://danadler.com/jacob/ (open-source, freeware)
    As far as I know, the flash player is installed as an ActiveX control on the system, so integrating it should not pose too much of a problem.
    Hope that helps,
    Cheers

  • Regarding Excel file generation from java

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • Resolving file names from java package

    Hello Everyone,
    I was wondering if there is a way to get the names of all the java classes inside of a package from my app. What I would like it to do, is to read the names of the classes in the package, and then use reflection to create an instance of each. At the moment, I have a properties file that contains all the class names. The app reads the file and uses reflection to create an object of each. This is not as good for me because i would rather be able to drop a new class into the package and have it work instead of having to edit the properties file first.
    So, is it possible get the list of files that are contained in a package?
    Thanks,
    Bryan Campbell

    So, is it possible get the list of files that are
    contained in a package?No, but why not let the application scan a folder?
    Kaj

  • Not able to access CD file system from java (or how to)

    I am trying to access CDROM from java
    program that is running from my HD. I am
    accessing as d:\data\ (d: = my cd rom drive)
    I am using windows 2000 and jdk1.4. I am getting
    java.io.IOException - Access denies.. any pointers please..
    - Ravi

    Hi friends,
    i want to develop an online exam application.
    but i am not having any idea how to access CDROM databse from java programe????
    Any help ???
    Thanks in advance
    Navik Pathak

  • File direct from database to open/save, without tempfile

    Hello, everyone.
    I've got the file uploading to the database, and that is working most excellent.
    How do I get it to open/save immediately without first using CFFILE action="write" to save it to a server folder, first?
    I'm using the following code:
    <cfcontent variable="#getFile.contents#" reset="true"><!--- binary data for file, pulled from "varbinary(max)" --->
    <cfheader name="content-disposition" value="attachment;filename=#getFile.fileName#">
    <cfheader name="content-type" value="application/octet-stream">
    <cfoutput>#toString(getFile.contents)#</cfoutput>
    <cfabort>
    .. but all this does is open a dialogue asking the user to either open or save the CFM file calling it, but the .cfm is replaced with .ZIP.
    The files are not all going to be the same MIMEtype - some will be Word documents, some Excel documents, some PowerPoint documents, and some PDF documents.
    ^_^

    Filetypes that can be uploaded into the database are PDF, PPT, DOC/DOCX, and XLS/XLSX (PDF, PowerPoint, Word, Excel).  I am setting the MIMEtype by using a CFC I built that creates an array of extensions and the MIMEtypes they are associated with (for example, if the filename ends in .DOCX, the array returns a MIMEtype of "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; if the filename ends in .DOC, the array returns a MIMEtype of "application/msword"; if the filename ends in .PDF, the array returns a MIMEtype of "application/pdf".  The CFCONTENT tag is then set for that type.)
    This is an internal web app that cannot be accessed outside of this network.  Every computer that has access to it has Office 2007 installed, as well as Adobe Reader, so when given the option to open or save, the "open" is always associated with the proprietary application (.xls is always given an option for Microsoft Excel; .docx is always given an option for Microsoft Word; etc.)
    Theoretically, once the binary of the Excel/Word/PowerPoint/PDF file is stored in the database, I should be able to read that binary data, give it the CFCONTENT and CFHEADER tags that it needs, and it should download and save, or open in the native application (this much is working.)  What is confusing me is why the applications feel that the files are corrupted and need to be recovered.  The file is being insert as binary, being retrieved as binary.  What _could_ cause the data to be misconstrued as corrupted?  I'm _not_ using TRIM for insert or select, or any kind of encoding/decoding.
    ^_^

  • File Name in Java Map

    Hello,
    I want to add the time stamp in the file name in JAVA map.
    Actually we are directly writing the file on to the file system from Java map and also giving its output to other map.
    So we need when we write the file on the file system the file name should be ABC_timestamp.
    Can anyone help me how to do this in Java Map.
    Thanks and Regards
    Hemant

    Hi,
    >>>Actually we are directly writing the file on to the file system from Java map and also giving its output to other map.
    are you sure you want to do this?
    this is highly inadvisable as mappings do not support restarts and any error handling
    further more what if the mapping will crash but the file will be created?
    if you restart the mapping you will get a second file?
    I'd recomment not doing anything like that - maybe think about your scenario once more ?
    Regards,
    Michal Krawczyk

  • Printing xml spreadsheet file from java

    Does anyone know if it is possible to print an xml spreadsheet file directly from java.
    I'm quite new to java and any help would be greatly appreciated.
    Thanks in advance.

    Does anyone know if it is possible to print an xml
    spreadsheet file directly from java.
    I'm quite new to java and any help would be greatly
    appreciated.
    Thanks in advance.Are you crazy, mad or stupid???
    Just messing.....
    If you're new to Java then don't bother. Otherwise try [url http://jakarta.apache.org/poi/index.html]here for jakarta's API.
    Honestly though, if you're not new to programming then fair enough. BUT, if you are new to Java and programming then acknowledge the fact you'll have to whack yourself alot before u get anywhere.
    Ted.

  • Printing a Binary Print File from java

    I would like to print a binary print file directly from java. The file is normally created when you print and choose "Print to file". I have not found any way of doing this. Could anyone help me out on this one.

    Different printers use different binary formats to drive them. Different manufacturers, alas, use different codes.
    Print to file typically dumps these printer codes to a file, and it requires a driver specific to the language the printer in question uses.
    Now I'm not yet sure about how the java.awt.print stuff handles the different propriatry formats. It's clearly picking up stuff from the operating system to do the job (since it brings up system standard dialogs and options which Sun won't know about.)
    It's clearly not going to extend easilly.
    You can check out the attributes stuff in javax.print. Maybe there's one to divert print output.

  • Native file drag and drop

    I was wondering if anyone has an example piece of code where a file is dragged from windows explorer onto a java app where the file is then used inside java? The documentation says it's possible but I don't see how at this point.
    thanks

    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%2Bjni+%2B%22windows+explorer%22

  • I am unable to drag and drop image files in a JAVA supposrted site. I have all the lastest versions of softwarte here - everything is up to date.

    I am no longer able to drag and drop image files int this JAVA supported site. It had always worked flawlessly in the past.
    I would open the site, go to Send Files, allow access, fill out the fields and then drag and drop my image files. Now I can only use the ADD (+) button to do so.
    I have the latest versions of OS-X Lion and JAVA installed on my computer
    http://www.clippingprovider.com/CP_II_EU/Welcome.html

    This is the Tech Sheet on the subject:
    Photoshop Help | Managing paths
    It contains this item under Manage Paths:
    When you use a pen or shape tool to create a work path, the new path appears as the work path in the Paths panel. The work path is temporary; you must save it to avoid losing its contents.
    Ok, the red you referred to is a Stoke you added. Then QuickMask is not involved.

Maybe you are looking for

  • How to put current date time in a JTextField?

    Hi all, I have a problem. How can I put current date time in a JTextField? Pls help me! Thank you!

  • Receiver FCC

    Hi All, I am having an issue in reciever FCC, where my last field being 10 space and each record is separeted by a new line, the last field gets trimmed for the space, Could you provide your inputs. For example, my output record shd be like, without

  • Want to install the new OS X Lion

    I have a macbook that i purchase in summer of 2009 is up to date except that i never install snow leopard and i would like to install the new Lion, can someone tell me if i have to have snow leopard in order to do that and how can i get it....

  • My PC is freezing everytime I wanna sync my iPod 5th Gen

    Hallo, everytime i wanna sync my iPod with the iTunes Bibliothek my PC is freezing. I'dont no why and 2 weeks ago it worked without any problems? please could anybody help me?

  • How make a 'link' look like 1: all bluey & 'link-y'

    I have opened a site online then copied it's site address from my internet address box. Then I pasted it to my basic apple Text Edit box, and to an Email I am composing. Why isn't it look 'blue-ish', like they do, and why doesn't my cursor turn to a