Desktop.getInstance().open(file) does nothing (nothing happens)

I 've seen this on a user's computer:
Desktop.getInstance().open(myFile);
does nothing: no exception, no stacktrace, nothing.
It doesn't work for pdf or for xls files (and probably for all other file types too).
However, if he double clicks on a pdf or xls file in Windows Explorer it opens (in acrobat reader / MS Excel).
This also works in DOS-prompt: "start C:\myFile.pdf"
Making it canonical first doesn't work either:
Desktop.getInstance().open(myFile.getCanonicalFile());
Environment:
Java 6 update 16
Windows XP SP 3
A webstart application with all security permissions.
I've removed all JRE's and even removed the USER_HOME/application data/Sun map.
He upgraded from Windows XP SP2 to SP3 with no change.
Has anyone any idea what is causing this?
This problem has been metioned before, but they don't mention a cause or solution: http://forums.sun.com/thread.jspa?threadID=5338022

Hi,
I also have the same problem, but with my JNI and C++ expertise, I was able to isolate the problem.
My platform:
- Microsoft Windows XP, Family Edition (French), Version 2002, Service Pack 3
- JRE 1.6.0_21
In the source of the JDK6 (Src/windows/classes/sun/awt/windows/WDesktopPeer.java), the Desktop.open(file) calls the native method
ShellExecute(*uri.toString()*, "open")
For example, if you try to open "c:\helloworld.pdf",
uri.toString() = "*file:/c:/helloworld.pdf*"if I call ShellExecute("C:\\helloworld.pdf", "open"), it works
but if I call ShellExecute(" file:/c:/helloworld.pdf", "open"), it doesn't work on my platform.
In both case, the ShellExecuteW or ShellExecuteA function of the Windows API return the integer 42 (> 32), saying that the functions succeeded. If the file object is not correct, the function should return a value <= 32.
=> The bug is not due to Java implementation, but to a bug in the Windows API.
Other remark:
I also tried the "ShellExec_RunDLL" entry point of the Shell32.dll library using RunDll32 utility. Both commands below are running correctly:
rundll32 SHELL32.DLL,ShellExec_RunDLL "C:\hello.pdf"
rundll32 SHELL32.DLL,ShellExec_RunDLL "file:/C:/hello.pdf"My conclusion:
1) A workaround could be implemented in the JRE: use the file path without the "file:/" protocol prefix.
2) This bug seems to be present only one some version of Windows XP (to confirm).
Rodolphe.

Similar Messages

  • Drag and dropping an address from address book to the desktop, the address file does not go where my mouse is positioned.

    If I drag and drop an address from address book to the desktop, the address file does not go where my mouse is positioned. It winds up somewhere in the middle of my screen. Any way to have the address file land and stay where my mouse pointer is?

    You have to assign the favicon yourself to the desktop shortcut (right-click the shortcut: Properties) after you have dragged the link to the desktop.
    You can usually find the favicon in Tools >Page Info > Media and save the icon there.
    Otherwise use the main domain of the website and add favicon.ico (e.g. mozilla.com/favicon.ico ) to display the favicon in a tab and save that image to a folder.

  • Can I use Desktop.getDesktop().open(file) to open a file instead of Applet

    Hi
    I was assigned a task in which a file has to be downloaded from a server. Right now, the code was already there which is written using applet. That is file is downloaded to local directory then it will get opened. Why cant I code in the following way.
    1. Reading the file from the server and writing it to a local directory.
    2. Opening the file from that directory using Desktop.getDesktop().open(file)
    Since I am a newbie to java i could not understand the difference between these two things.
    can anyone please explain me so that i can proceed with the right way.
    Thanks in Advance.

    Dinesh wrote:
    Hi
    I was assigned a task in which a file has to be downloaded from a server. Right now, the code was already there which is written using applet. That is file is downloaded to local directory then it will get opened. Why cant I code in the following way.
    1. Reading the file from the server and writing it to a local directory.
    2. Opening the file from that directory using Desktop.getDesktop().open(file)This is highly confusing. What you describe is what is apparently implemented in this applet. So what do you want to code differently? And WHERE do you want to run this code? There must be a reason why it is right now an applet. Are you talking about a web environment like servlets/JSPs?

  • InDesign CC Server 2014 app.open() File does not exist.

    I've set up InDesign CC Server 2014 trial on a Windows Server 2008 R2 and trying to run a simple script that converts a idml to PDF.
    Here's the code
    document = app.open(File("C:\inetpub\wwwroot\presentation\Documents\Resumes.idml"));
    document.exportFile(ExportFormat.PDF_TYPE, File ("C:\inetpub\wwwroot\presentation\Documents\file.pdf"));
    document.close();
    I'm running the script in ExtendScript Toolkit CC and it gets hung up every time on the first line, open() method.
    I've verified the path and permissions are fine as other scripts work that write output, such as this one.
    //HelloWorld.jsx
    //Create a new document.
    var myDocument = app.documents.add();
    //Get a reference to the first page.
    var myPage = myDocument.pages.item(0);
    //Create a text frame.
    var myTextFrame = myPage.textFrames.add();
    //Specify the size and shape of the text frame.
    myTextFrame.geometricBounds = ["6p0", "6p0", "18p0", "18p0"];
    //Enter text in the text frame.
    myTextFrame.contents = "Hello World!";
    //Save the document (fill in a valid file path).
    myDocument.save(new File("/c/HelloWorld.indd"));
    //Close the document.
    app.documents.item(0).close();
    No problems at all with that script.
    Please help!

    Figured it out. Path for app.open() needs \\ instead of \.

  • Double-click to open file does not work

    I have Windows XP, ID 3.0.1. When I either double-click an INDD file or try to open it via Start>Documents, I get a dialog box: InDesign_US_R - InstallShield Wizard, Location to save file, etc. What do I do with that? These files open normally if I open them through ID.
    Thanks very much.

    It sounds like your file association in Explorer has been damaged.
    What does Windows say the current association is?

  • File Server Role: Slow access for "opened files" and slow Explorer browsing

    Since we migrated our fileserver from Windows Server 2008 R2 to Windows Server 2012 we are facing two major problems:
    1. Opening files which are already opened by other users takes about 1 minute before the file actually opens. This is not only for Office files such as Excel and Word, but also for other (not office) files. Again, this problem only rises when the file(s)
    is/are already opened by another user. There seems to be a sort of "Lock" check time which is about 45 to 60 seconds.
    2. The other problem is browsing via Explorer through the network drive (all clients are Windows 7 clients). Half of the time there is some kind of "hick up" with displaying the results of the folder. I cannot figure out a patern, but if there
    is no "hick up" then browsing is very fast (also in the busiest times of the working day)... If there is a "hick up" the result can take about 50 seconds to display the content of a folder.
    I suspect the SMB implementation / settings of Windows Server 2012 which are causing the problems...
    Things I tried:
    1. Changed the Oplocks wait time to 10 seconds (which is the minimum). The result is that openening files does indeed go some faster (still taking about 45 seconds).
    2. Disabled SMB2: the result is that browsing is fast... Opening files does go faster. BUT: we are then facing other problems like some files are not able to open... This setting was, after getting a lot of complaints from the users, changed back to enabled
    SMB2.
    3. Within the NIC card properties I disabled "QoS packet Scheduler", "Link-Layer Topology Discovery Mapper I/O Driver", "Link-Layer Topology Discovery Responder" and IPv6 (as we only use IPv4).
    All above with not the promising results.
    The server is a dedicated (virtual machine on vSphere 5.1) fileserver.
    Please Advice since this is not workable, and we have postponed the migration of the fileserver for our aother location.

    Hi Dave,
    I suggest you disable all third party applications like Anti-Virus application to test if it could reduce the waiting time when accessing a file.
    Here are some related threads below that could be useful to you:
    DFS Slowness when Opening Microsoft Documents and Excel Spreadsheets
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/61ec9a99-0027-44cb-815c-0da9276c1c96/dfs-slowness-when-opening-microsoft-documents-and-excel-spreadsheets?forum=winservergen
    Opening files over network takes long time
    http://social.technet.microsoft.com/Forums/windows/en-US/c8ddb65f-8a17-4cee-afd4-dfc09e99d562/opening-files-over-network-takes-long-time?forum=w7itpronetworking
    opening folder or file takes over a minute on Windows 2008R2 File server
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/b9aa98c4-3ef7-4e6d-810d-6099e72b33f6/opening-folder-or-file-takes-over-a-minute-on-windows-2008r2-file-server?forum=winserverfiles
    Best Regards,
    Amy Wang

  • Can't open files in exs24

    Referring to problem in:
    http://discussions.apple.com/thread.jspa?messageID=6520703
    After update 8.01 opening files does work here also, but I still can't open .exs files in exs24!
    If I want to load files they are grey and can't be selected.
    Can someone help me? Thanks in advance.

    jannemarete,
    In addition to what Scott and PrintFusion said, the offending file(s) could have been created in either CS6 or CC.
    In the latter case you will need to download the CC trial (you can use that for CS6 files as well, but there is no need to squander that option before you have some CC files do deal with).
    The CC download can be made from this link:
    http://www.adobe.com/downloads.html?promoid=JZEFS
    An easier option may be to ask for a CS5 version when you receive files from others with CS6 or CC. Also, if you do that, any version induced change in the files will be on them.

  • Berkeley DB: Too Many Open Files

    I've installed BerkelyDB 6.0.3 on Mavericks but when I try to use it I get errors about there being too many open files:
    Apr-10-14 11:20:45 [Worker_10001] BerkeleyDB-CRT-ENV-ERROR (1) in HASH Delay , on file /Applications/assp/delaydb.bdb : BDB:Too many open files
    Apr-10-14 11:20:45 [Worker_10001] BerkeleyDB-ENV-ERROR Delay:  - BDB:Too many open files
    Apr-10-14 11:20:45 [Worker_10001] Delaydb database error: BerkeleyDB-ENV-ERROR Delay:  - BDB:Too many open files
    Does anyone know how to (permanently) increase these limits in Mavericks?
    Thanks,
    James.

    sudo sysctl -w kern.maxfiles=32768
    sudo sysctl -w kern.maxprocperuid=16384
    seemed to work.
    Created file /etc/sysctl.conf containing:
    kern.maxfiles=32768
    kern.maxprocperuid=16384
    so that the setting would survive a reboot.
    Hopefully that permanently fixes it.

  • Mac opens files by itself, cursor jumps around

    I have a MacBook Pro with the latest OS, updated just last week.  The cursor will jump around the screen, scrool to different desktop screens, open files by itself, and when I am typing the text will get erased.  I have tryied reseting the NVRAM, clearing the system cache and reparing disk permissons...

    What mouse are you using, if it's an old Mighty   Mouse it needs to cleaned. If you aren't using a Mighty Mouse then reset the SMC and PRAM.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Wait 15 seconds.
    Attach the computers power cable.
    Wait another 5 seconds and press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Hi, I have a problem with opening files on my desktop. When i double click a file I would lime to open nothing happens. Please help me with this problem :)

    Hi, I have a problem with opening files on my desktop. When i double click a file I would lime to open nothing happens. Please help me with this problem

    hello, this might be a preference in your google search settings. go to google.com/preferences and disable the option to ''Open search results in a new browser window''.

  • Creative cloud desktop opens but does nothing remains empty

    When i tried to use creative cloud desktop it opens and the icon remains in grey the config menu is log out, open in new window, help
    thats all it does after opening a loading gif appears for several seconds and then disapears but nothing happens remains empty
    i have tried the obvious uninstall - install usign the adobe uninstallers and got the removal successfull, downloaded the latest version
    of the C.C.Desktop and same problem i am on mac OS 10.7.5

    Hi there,
    Welcome to the forums!
    Please rename OOBE Folder from the following location
    Mac OS X : Macintosh HD>Library>Applciation support>Adobe>OOBE
    After renaming the OOBE folder please uninstall Adobe creative cloud from the cleaner tool and re-installed the product from from www.creative.adobe.com/apps
    PS: Please uninstall Creative cloud connection if you see in Cleaner tool.
    Ankit

  • There is a problem when i click the "+" tab to "open a new tab" nothing happens. It use to open new tabs and now it does nothing.

    There is a problem when i click the "+" tab to "open a new tab" nothing happens. It use to open new tabs and now it does nothing. Even when i go to "File" and "New Tab" it still does nothing. The only time i can get a new tab to open is if i go to "Help" and click "Firefox Help" then a new tab with firefox help opens.

    Hi, were you able to resolve your problem? If so, please mark this question as '''Solved'''. Thanks !

  • "Preview this File" Does Nothing + Blinding GTK+ open file dialogs...

    ...I have two problems in KDEMod4...did anyone have these problems and how do you fix them?
    Right clicking a file and clicking "Preview this File" does nothing...including folder views, Konqueror, and Dolphin.
    GTK+ open file dialogs alternate between the normal background for my text box and blindingly white background.

    Hi,
    I also have the same problem, but with my JNI and C++ expertise, I was able to isolate the problem.
    My platform:
    - Microsoft Windows XP, Family Edition (French), Version 2002, Service Pack 3
    - JRE 1.6.0_21
    In the source of the JDK6 (Src/windows/classes/sun/awt/windows/WDesktopPeer.java), the Desktop.open(file) calls the native method
    ShellExecute(*uri.toString()*, "open")
    For example, if you try to open "c:\helloworld.pdf",
    uri.toString() = "*file:/c:/helloworld.pdf*"if I call ShellExecute("C:\\helloworld.pdf", "open"), it works
    but if I call ShellExecute(" file:/c:/helloworld.pdf", "open"), it doesn't work on my platform.
    In both case, the ShellExecuteW or ShellExecuteA function of the Windows API return the integer 42 (> 32), saying that the functions succeeded. If the file object is not correct, the function should return a value <= 32.
    => The bug is not due to Java implementation, but to a bug in the Windows API.
    Other remark:
    I also tried the "ShellExec_RunDLL" entry point of the Shell32.dll library using RunDll32 utility. Both commands below are running correctly:
    rundll32 SHELL32.DLL,ShellExec_RunDLL "C:\hello.pdf"
    rundll32 SHELL32.DLL,ShellExec_RunDLL "file:/C:/hello.pdf"My conclusion:
    1) A workaround could be implemented in the JRE: use the file path without the "file:/" protocol prefix.
    2) This bug seems to be present only one some version of Windows XP (to confirm).
    Rodolphe.

  • I cannot print from Websites or my college online course. Tries to save files to desktop as an .xps document but nothing happens and I get an error message that print command did not work. Have reinstalled firefox and adobe, no help. Any suggestions?

    Cannot print anything from internet using Firefox as browser. Please advise. I have to use Firefox for internet college courses, cannot print my assignments. I do not have this problem on Mac or using Internet Explorer. Only happens when using Firefox. When I select print a message comes up to save information to desktop as .xps file. Select save, sometimes it is on the desktop but I cannot open the file or it simply does not save file and get an error message that print command failed. What is happening?

    {Ctrl + P} and select your printer in the Printer - Name box near the top of that window.
    http://kb.mozillazine.org/Problems_printing_web_pages

  • Ive just signed up for the adobe photoshop pack, i use a mac, when i click download, nothing is happening..  Am I doing something wrong?? When I try and open the software I already had from trial it says its expired,  or i need to use a serial number... H

    Ive just signed up for the adobe photoshop pack, i use a mac, when i click download, nothing is happening..  Am I doing something wrong?? When I try and open the software I already had from trial it says its expired,  or i need to use a serial number... HELP Anyone else experienced this?

    If there is an option to "license this software", and it takes you to a sign-in page with username and password (not a serial number) - then just go ahead and sign in.
    If it insists on a serial number you need to uninstall the trial. Then try to download again.

Maybe you are looking for