Desktop.open() fails when file contains German umlauts

Hello,
I want to open a file using the Desktop-API:
// check whether opening a file is supported or not
if (!desk.isSupported(Desktop.Action.OPEN)) {
  // display error message box
  JOptionPane.showMessageDialog(getFrame(),getResourceMap().getString("errLinkUnsopportedMsg"),
         getResourceMap().getString("errLinkUnsopportedTitle"),JOptionPane.ERROR_MESSAGE);
  return;
desk.open(linkfile);I'm catching all possible exceptions here:
             catch (IOException e)
            catch (IllegalArgumentException e)
            catch (SecurityException e)
            catch (UnsupportedOperationException e)
            catch (URISyntaxException e)But when I want to open a file that contains German umlauts, my application throws following exception:
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException:
Non-Java exception raised, not handled!
(Original problem: *** -[NSCFArray initWithObjects:count:]:
attempt to insert nil object at objects[0])
at apple.awt.CDesktopPeer._lsOpen(Native Method)
at apple.awt.CDesktopPeer.lsOpen(CDesktopPeer.java:53)
at apple.awt.CDesktopPeer.open(CDesktopPeer.java:33)
at java.awt.Desktop.open(Desktop.java:254)
at zettelkasten.ZettelkastenView.eventHyperlinkActivated(ZettelkastenView.java:9609)
at zettelkasten.ZettelkastenView.access$6000(ZettelkastenView.java:119)
at zettelkasten.ZettelkastenView$14.hyperlinkUpdate(ZettelkastenView.java:7014)The file does definitely exist. I chose it with a filechooser, and I debugged the source step-by-step. Before calling the desktop.open() command, I check whether the file exists or not (File.Exists()).
When I open any file without umlauts, everything is fine. Only files with umlauts in their filename seem to make trouble.
My OS is:
Mac OS X 10.5.5, running the latest Java 6, using NetBeans 6.5
Is there any solution, or at least a workaround?
Thanks in advance!
Daniel
Edited by: DnlLdck on Jan 29, 2009 6:23 AM

Same thing happened to me, but I was trying to browse an URI which contains non-English characters. Haven't try it on Windows yet. Maybe it does not support non-English characters on Mac.

Similar Messages

  • I bought and installed many fonts for a project and one font in particular which is showing up in the font list on a new file, is missing when I open an existing file containing that font. I can't understand why that's happening and the font is Centrale S

    Hi
    I am encountering a missing font error on Adobe Illustrator for a font that I recently bought - Centrale Sans Bold. This font is clearly installed in the system's font folder and is also showing in the font list on Adobe Illustrator. But when I open an existing file containing this font it is giving the error "The document uses fonts or characters which are not available or are in a different format than originally specified".
    We have also bought Centrale Sans regular from a different website as we couldn't find both on one, could that be clashing somehow?
    Also the existing file was created on MAC plattform and we are using a windows plattform to open it. That to me doesn't seem like an issue as all other files are opening up fine and I have bought around 47 fonts and only this font seems to be not working. I have also written to the website I bought it from but I have also bought around 20-25 fonts from them and all the other fonts are working fine too. Maybe its an illustrator related problem?
    Please help!!!!!!

    There is one way its getting fixed. Once I update my Adobe Illustrator CC to Adobe Illustrator CC 2014 it is further allowing me to go into the system folder and allocate the font to the file so that it can replace it. My only concern now is that our MAC partners who will receive these files back from us have Adobe CS6. We will down save it to CS6 but I hope they won't experience any font issues because of us using CC 2014? Any light you can shed on this?

  • Get program error message when I try to open a JPG file containing smart objects

    I get a program error(not code #) when I try to open a JPG file in PhotoshopCS3 containing smart objects.
    I am running OS 10.5 on Intel Mac.
    Appreciate any feedback

    Smart Objects are layers.
    JPEG files can't contain layers.
    So, that doesn't quite make sense.
    Also, this is the Windows side of the Photoshop forums :-)

  • Opening one particular desktop folder fails when it immediately closes

    Hi. Working on a Macbook Pro from 2008, and I have one folder on my desktop that just today refuses to open. When I double click on it it flashes the window too briefly to see the contents, then the whole screen goes blue for a half-second, and the finder reappears. Restarting the finder or the whole computer doesn't help. I can copy the folder to another drive, but when I then try to open it on the other drive, the same thing happens. Haven't had a chance yet to try verifying the drive.
    Thanks,
    BL99

    Hello BL:
    Welcome to Apple discussions.
    If the finder is the problem, trashing the preference file (com.apple.finder.plist) and restarting will usually fix it.
    Barry
    P.S. If the folder is, somehow, corrupted, restoring it from an earlier TM (if you use it) version will also fix the issue.
    Message was edited by: Barry Hemphill

  • SQLConnection.attach() fails when file path contains apostrophe

    Hello,
    Any help on this would be much appreciated. Issue occurs when user has apostrophe in their windows username and therefore an apostrophe in their File.applicationStorageDirectory path.
    e.g. if the user logs into windows as j.o'reilly, then it will be:
    C:\Documents and Settings\j.o'reilly\Application Data\application name\local store
    Have tried with Air Runtimes: 2.5.0.16600,2.6.0.19120,3.2.2070
    Have tried with Air SDKs: 2.0, 2.7, 4.5
    To replicate without creating a windows user with an apostrophe, the same result occurs if the files themselves are named with an apostrophe:
    var __connection:SQLConnection;
    __connection = new SQLConnection();
    __connection.open( File.applicationStorageDirectory.resolvePath("mainfile.s3db"), SQLMode.UPDATE );
    __connection.attach( "secondary", File.applicationStorageDirectory.resolvePath("user'name.s3db") );
    Result:
    SQLError: 'Error #3125: Unable to open the database file.', details:'near 'name': syntax error', operation:'attach', detailID:'2003'
        at flash.data::SQLConnection/internalAttach()

    https://bugbase.adobe.com/index.cfm?event=bug&id=3220380
    Community support? You mean I can checkout the source of flash.data.SQLConnection and fix it? Can you please post the repo url?
    The workarounds we attempted involved escaping the apostrophe were defeated by the File class removing the escaping.
    //Attach() Does not accept strings
    File.applicationStorageDirectory.resolvePath(sqliteFileVO.fileName).nativePath
    //Attach will not work with files which have their path escaped DOS style
    var f:File = new File( '"' + File.applicationStorageDirectory.resolvePath(sqliteFileVO.fileName).nativePath + '"');
    //Passing as url does not escape the apostrophe
    var f:File = new File(File.applicationStorageDirectory.resolvePath(sqliteFileVO.fileName).url);
    //passing using url notation does not escape the apostrophe
    var f:File = new File("app-storage:/"+sqliteFileVO.fileName);
    //Escaping the native path this way means the file cannot be found
    f.nativePath = f.nativePath.replace(r,"%27");
    //Escaping the native path this way does not work
    f.nativePath = '"'+f.nativePath+'"';
    //cannot be escaped with \ or / they will be interpreted as separator
    //you may pass in escaped file path, but File will unescape it for us immediately
    var regfind:RegExp = /'/g; //'
    var strreplace:String = "%27";                   
    var strclean:String = fileName.replace(regfind,strreplace);
    file = new File("app-storage:/"+strclean);

  • Can't login with username containing german umlaut with SQL Developer 2.1

    hello,
    we run SQL Developer on W2K.
    In SQL Developer Release 1.5 we have no problems connecting with a username containing a german umlaut (like "jörg"). Now we tested Version 2.1 and fail. The error message is ORA-01017.
    sqlplus or TOAD also haven't any problems - just SQL Developer 2.1.
    Heike

    hello,
    we run SQL Developer on W2K.
    In SQL Developer Release 1.5 we have no problems connecting with a username containing a german umlaut (like "jörg"). Now we tested Version 2.1 and fail. The error message is ORA-01017.
    sqlplus or TOAD also haven't any problems - just SQL Developer 2.1.
    Heike

  • Desktop.open() fails to start application

    Hi, any suggestions as to why this api is not working ? I have just installed the jdk6 rc and its still not working for me. The DesktopDemo application launches a Browser OK but also fails to launch the default application when passed a file name.

    Hi,
    Here is great blog for your reference.
    Tips and Tricks for Deploying the Application Catalog in System Center 2012 Configuration Manager
    http://blogs.technet.com/b/configmgrteam/archive/2012/07/05/tips-and-tricks-for-deploying-the-application-catalog-in-system-center-2012-configuration-manager.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Connection Failed when File Sharing and High CPU Usage

    I have a small wired network where a G5 Tower (10.5.8) has an external drive connected via FW800 set as shared so it can be accessed from a C2D iMac (10.6.4). This has been working great since it was setup in Feb.
    Today the iMac was unable to access the G5. It didn't show either the Public folder on the G5 or the shared FW drive. When clicked it showed "Connection Failed." Immediately the G5 spun up to 100% CPU usage. Activity monitor showed AppleFileServer as the culprit, and when quit, resumed to normal usage.
    Same happens when trying to access the G5 from a Mac Mini (10.5.8)
    Once the iMac gave a warning of something like: "Failed to connect because there are too many users." Which is rubbish because no one was connected or could connect, and this was verified in the Sharing Pref Pane.
    I've tried restarts, disk repairs off a boot disk, and enabling / renabling File Sharing. The G5 can connect to the other macs, and they to each other, just not to the G5.
    Anyways, any help is much appreciated. Thank you.

    So somehow I got the computers to connect to the G5 with file sharing. I went through a bunch of steps, and not really sure what worked.
    I believe it had something to do with the 'Public' user folder only being listed in the file sharing pane, instead of the User folder. Why that would also stop the shared external drive from being seen, I'm not sure.

  • Opening an external file containing javascript code

    I'm trying to develop a PDF in two languages. When pushing a button, all questions and list-of-values for possible answers should be translated.
    I created and initialized several variables with the two language phrases with javascript. Everything is inside my code.
    Is there anyway that when a button is pressed an external file is read, bringing that javascript code for questions ans list-of-values? My concern is that currently I have a duplicated code, but if I want to implement three, four languages it will grow without control.
    This is an example I wrote in my code:
    var TxtAuxL1ESP = new Array();
    var TxtAuxL1ING = new Array();
    TxtAuxL1ESP[0]=", como ";
    TxtAuxL1ING[0]=", such as ";
    TxtAuxL1ESP[1]=": el último año ha obtenido ";
    TxtAuxL1ING[1]=": last year it obtained ";
    TxtAuxL1ESP[2]="%, en los últimos tres años ";
    TxtAuxL1ING[2]="%, in the last three years ";
    TxtAuxL1ESP[3]="% y en los últimos cinco años ";
    TxtAuxL1ING[3]="% and in the last five years ";
    if (P1.BtnIdioma.border.edge.stroke == "raised") {
        var TxtAuxL1=TxtAuxL1ESP;
        var TxtAuxL2=TxtAuxL2ESP;
        var TxtAuxL3=TxtAuxL3ESP;
    else {
        var TxtAuxL1=TxtAuxL1ING;
        var TxtAuxL2=TxtAuxL2ING;
        var TxtAuxL3=TxtAuxL3ING;
    What I was thinking is to store TxtAuxL1ING in one file, TxtAuxL1ESP in another file and read them from my javascript code inside the PDF. Is it possible?
    Regards
    JC

    Hi,
    maybe this solution ist interesting for you.
    It populates form fields with data read from an attached XML file.
    http://thelivecycle.blogspot.de/2011/01/populate-data-from-attachment.html

  • Background job - failing when file not on app server

    Hi Experts,
    I am facing an issue, while I am trying to run a program in background.
    Let me explain u the situation.
    My program runs in background and pick one file from predifined folder from application server and process that file. if file is not in the folder batch job goes into cancel status. but what i want if proposed file is not available then batch job will run and finished; it should not go into cancle status.
    waiting for valuable inputs,
    Prarthan.
    Edited by: Julius Bussche on Feb 20, 2009 1:06 PM
    Please use meaningfull subject titles

    hi
    below is my piece of code for application server.
    thanks.
    FORM application_server .
      TYPE-POOLS: kcde.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
      DATA wa_src01 TYPE string.
      DATA: BEGIN OF wa_src0,
           material         LIKE bapi2017_gm_item_create-material,
           consumption_qty(13) TYPE c,"  like bapi2017_gm_item_create-entry_qnt,
           base_uom         LIKE bapi2017_gm_item_create-entry_uom_iso,
           movement_type    LIKE bapi2017_gm_item_create-move_type,
           cost_center      LIKE bapi2017_gm_item_create-costcenter,
           doc_date         LIKE bapi2017_gm_head_01-doc_date,
           post_date        LIKE bapi2017_gm_head_01-pstng_date,
           plant            LIKE bapi2017_gm_item_create-plant,
           storage_location LIKE bapi2017_gm_item_create-stge_loc,
           END OF wa_src0.
      DATA : lt_src0 LIKE TABLE OF wa_src0.
      DATA : file1 TYPE string.
      DATA : tmp0(20). " type string.
      DATA : intern1 TYPE  kcde_intern.
      DATA : tmp_date LIKE sy-datum.
      path1 = path.
      replace '.txt' in PATH1 with ''.
      IF path IS INITIAL.
        path = '/usr/local/interface/globalone/SFA/SFA_WORK/SFA_'.
        tmp_date0(2) = sy-datum6(2). "date dd
        tmp_date2(2) = sy-datum4(2). "month mm
        tmp_date4(4) = sy-datum0(4). "year yyyy
        CONCATENATE path plant tmp_date '.txt' INTO path.
       concatenate path  tmp_date  into path1.
      ENDIF.
      file1 = path.
      file_nm = path.
    FILE_NM2 = PATH1.
      OPEN DATASET file_nm FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
      IF sy-subrc NE 0.
       MESSAGE e000(zmm002).
       EXIT.
      ELSE.
        DO.
          READ DATASET file_nm INTO wa_src01.
          IF sy-subrc = 0.
             CLEAR wa_src0.
            REPLACE cl_abap_char_utilities=>cr_lf(1) IN wa_src01 WITH ''.
            SPLIT wa_src01 AT cl_abap_char_utilities=>horizontal_tab
                                INTO  wa_src0-material
                                      tmp0
                                      wa_src0-base_uom
                                      wa_src0-movement_type
                                      wa_src0-cost_center
                                      wa_src0-doc_date
                                      wa_src0-post_date
                                      wa_src0-plant
                                      wa_src0-storage_location.
            SHIFT tmp0 LEFT DELETING LEADING '0'.
            wa_src0-consumption_qty = tmp0.
            APPEND  wa_src0 TO lt_src0.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
        CLEAR wa_src0.
        LOOP AT lt_src0 INTO wa_src0.
          REPLACE ',' IN wa_src0-consumption_qty WITH '.'.
          MOVE:  wa_src0-material         TO wa_srcdata-material,
                 wa_src0-consumption_qty  TO wa_srcdata-consumption_qty,
                 wa_src0-base_uom         TO wa_srcdata-base_uom,
                 wa_src0-movement_type    TO wa_srcdata-movement_type,
                 wa_src0-cost_center      TO wa_srcdata-cost_center,
                 wa_src0-doc_date         TO wa_srcdata-doc_date,
                 wa_src0-post_date        TO wa_srcdata-post_date,
                 wa_src0-plant            TO wa_srcdata-plant,
                 wa_src0-storage_location TO wa_srcdata-storage_location.
          APPEND wa_srcdata TO gt_srcdata.
          CLEAR wa_srcdata.
          CLEAR wa_src0.
        ENDLOOP.
      ENDIF.
      DELETE DATASET file_nm.
    ENDFORM.                    " application_server

  • Open fails when using DB_DIRECT_DB

    Hi,
    I'm trying to use the DB_DIRECT_DB flag to bypass the filesystem cache for some experiments I'm running (to clarify results, not for performance reasons). I'm using BDB 4.5.20 (C++ API) with kernel version 2.6.17-1.2142_FC4smp on Fedora Core 4.
    I initialize a database handle as follows:
        Db* db = new Db(NULL, 0);
        db->set_cachesize(0, 1024*CACHE_SIZE, 1); // in kB
        DbEnv* env = db->get_env();
        env->set_flags(DB_DIRECT_DB, 1);
        env->set_msgfile(stderr);
        env->set_errfile(stderr);
        db->set_bt_compare(compare_int);
        db->open(NULL, file, NULL, DB_BTREE, 0, 0);The file already exists (was created by the same version of Berkeley DB, although without the O_DIRECT flag) and is 37MB on disk. Calling db->open generates this error:
    read: 0x86735f0, 4096: Invalid argument
    terminate called after throwing an instance of 'DbException'
      what():  Db::open: Invalid argumentThat address doesn't seem to be aligned to anything...
    Without DB_DIRECT_DB, everything works. I've google'd around but can't find anything useful--I'd appreciate any suggestions!
    Thanks,
    Daniel

    hello,
    You may find the information in the following post helpful as
    it is on a related issue with read() and DB_DIRECT_DB.
    Bug: Specifying DB_DIRECT_DB crashes BDB 4.4.20
    thanks,
    Sandra

  • SQLLDR fails when records contain delimiter

    I am using Oracle 9i and am trying to load logs into a table using SQL*Loader.
    In the control file, one field has been specified as:
    S_STATUS_MSG enclosed by '"',
    However, in the incoming data, a record has the field with the following value:
    "[AUTH] Password supplied for "popenquiries-3" is incorrect."
    The optional delimiter appears in the field itself.
    sqlldr rejects the record saying:
    ORA-02363: No terminator found after TERMINATED and ENCLOSED field
    Any suggestions on how to get around this, and make sqlldr load such records?
    Thanks

    There's only one solution to your problem: make sure that your delimiter does not appear in the field itself.

  • Character encoding problem with german umlaut in propertie files

    Hi,
    I use propertie files to translate application to multiple languages.
    These files contains german umlaut (e.g.: Wareneingänge).
    If I rebuild my application then this files are copied from ../src/view to ../classes/view.
    The file in ../classes/view contains "Wareneing\ufffdnge" instead of "Wareneingänge" which is displayed as "Wareneing�nge".
    My browser-, project- and application settings are UTF8.
    Previously the settings for project and application where "Windows-1252"
    I have found an workarounds but maybe this is a bug in Jdeveloper TP4.
    Therefore I post this problem. Maybe someone can confirm this behaviour.
    Workaround:
    Replace "Wareneingänge" with "Wareneing\u00e4nge" in the ../src/view file
    (Zaval JRC Editior does this for you :-) )
    regards
    Peter

    Hi,
    I think to remember that the same was required for properties in 10.1.3 as well. Not sure if this is an issue in JDeveloper 11. I'll take anot and have a look though
    Frank

  • German umlaute and file download

    hi to all!
    hope someone can help me.
    I have a directory, let's say test, with a WEB-INF directory in it. ordinarry web-app...
    within "test" there is a file called gl�hw�rmchen.pdf. I want to download this file. when i use a link
    Gl�hw�rmchen a 404 STATUS CODE is returned. Tomcat 4.1.18 doesn't find the resource but it is DEFINITELY in there.
    I know that this is no bug, i just don't understand somethig. How can i tell Tomcat 4.1.18 to return files with german umlaute???
    please help...
    ciaou,
    wendigo

    sorry that's not the solution of the problem. I have prooved that my file is in the correct directory. It's NOT a context path problem. Other files are downloaded.....
    test.txt
    gl�hw�rmchen.pdf
    gluehwuermchen.pdf
    The JSP Source Code.....
    <%@page contentType="text/html;charset=ISO-8859-1"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    Textdatei
    Gluehwuermchen.pdf Datei</br>
    Gl�hw�rmchen.pdf Datei</br>
    </body>
    </html>
    when I click the first or second a link, the files are transmitted, but the third file NOT.... The filename is written correctly. The Apache Tomcat 4.1.18 just doesn't find the file. REMEMBER!!! The Webserver FINDS the two other files in THE SAME DIRECTORY BUT NOT THOSE containing german umlaute. WHY????
    hope you can help me...
    wendigo

  • Calling Desktop.open() on avi/mp3/wmv/etc (media) files.

    Hello all,
    I am using the Desktop class to open files on the desktop in my signed applet. This is working perfectly for ppt, pps, doc, xls, txt, jpg, pdf files. However, for some reason I am unable to launch any media-type files using this method. I get errors such as "java.io.IOException: Failed to open file:/C:/Users/Bryan/Desktop/4542-sun/Butterfly.wmv. Error message: No application is associated with the specified file for this operation."
    However, there are indeed applications associated with these file types... namely Windows Media Player. Double-Clicking the file directly launches it in WMP as it should. I have been searching around high and low, and can't find much. Note the fact that it is trying to open a URI, starting with file:/. Originally it was just opening the location directly, but I tried using a URI instead to no avail.
    This has happened on 3 separate computers now.
    I have done a work around using Runtime.getRuntime().exec(). However, some of the filenames I am working with can possibly have asian and other UTF-8 characters. That causes a whole new issue, described in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4947220. I have no idea how to begin using JNI to directly call ShellExecute or if that is even possible from a signed applet standpoint.
    Does anyone have any idea how to fix the issue with Desktop.open() and media files?
    Thanks

    Ok I have searched and searched and found no reliable solution for either of the previous issues. Since this applet is run on a closed intranet, with no fear of malicious intent, I have gone for a different route.
    try {
         desktop.open(new File(fileToOpen.toURI()));
    } catch (Exception e) {
         window.call("launchFile", new Object[] { file.toString() });
    }When the call to Desktop.open() fails, I catch the exception and call a javascript function launchFile(), defined below.
    function launchFile(filename) {
            var o = new ActiveXObject("WScript.Shell");
            o.run(filename);
    }Of course, this limits us to IE ... but it is a necessary evil until Sun fixes the bugs in Desktop.open() and Runtime.exec().
    Hope this helps someone. Again, I still welcome other options.

Maybe you are looking for

  • Problem in inserting a node in Treeview.

    Hi all, I'm having a problem in inserting a node in the treeview always it appends in the end of the sibling. Basically on double clicking of any node in the treeview should create a copy of the double clicked node and just insert the copy of the dou

  • HDCP Error Message

    I have had my Apple TV about 90 days now and have had no problem in playing movies rented from Apple.  Now when I try to watch one, it starts an plays for about 10 or 15 seconds, then freezes.  I try to play it again, and I get an HDCP error message

  • Regarding rental object-I want to add some fields in output list?

    Hi, I am creating Ze program of transaction REISROOC.I want to add some fields in the output list . here logical database is used & for adding some fields i need to write Select query. how n where should i add this query? can anyone help me???? Thank

  • IMAQ user palette not updating outside video loop

    I'm trying to implement a program with a separate video loop and am having issues with changing the user palette. I'm not sure right now, but I think it might be because I'm changing it in another non-video dedicated loop. Does LabVIEW have a problem

  • I have a ipad2 but doesnt exist facetime icon. how can i install it?

    i tried to reinstall ios few times but still no facetime icon. really wired and fed up with...