Opening a file succeeds in Linux but fails in Windows

Hi,
I have written an addon to OO Writer. It works properly with GNU-Linux (Ubuntu 9.04, JAVA 6)
I tried it under Windows 7 RC (I have no other Windows OS available)
I have a problem opening a file.
Here is the code I use
class Dictionary {
   ArrayList brutEntry = new ArrayList();
   ArrayList entryList = new ArrayList();
   DicEntry temp = null;
   public boolean enamdictEnabled;
   public boolean edictEnabled;
    * @param dicFileName A String representing the name of the edict  file which contains the dictionary entries
    * Each entry correspond to a line of the file
    * The dictionary must be EUC-JP coded.
    * @exception exceptions No exceptions thrown
   Dictionary(String dicFileName, String signature) {
      File f=new File(dicFileName);
         WarningHandler.displayMessage("I did; File f=new File(dicFileName); with "+dicFileName+" as a file name"+
                 "\nthe reselt is: "+f.toString()+" with f.toString()");
      BufferedReader i = null;
      try {
      i = new BufferedReader(new InputStreamReader(new FileInputStream(f), "EUC-JP"));//dicFileName
         String str1 = null;
         while ((str1 = i.readLine()) != null) {
            // System.out.println(signature+"making a new entry"+Integer.toHexString(index));
            temp = new DicEntry(str1);
            temp.entrySignature = signature;
            entryList.add(temp);
      } catch (IOException ex) {
         System.out.println("Error message: "+ex.getMessage());
         Logger.getLogger(Dictionary.class.getName()).log(Level.SEVERE, null, ex);
         WarningHandler.displayMessage("There was a problem opening or reading the " + dicFileName +
                 " dictionary file. Please check that your file and filepath are correct and" +
                 "that your dictionary file is EUC-JP encoded");
      } finally {
         try {
            i.close();
         } catch (IOException ex) {
            Logger.getLogger(Dictionary.class.getName()).log(Level.SEVERE, null, ex);
  At first I used
     i = new BufferedReader(new InputStreamReader(new FileInputStream(dicFileName), "EUC-JP"));//dicFileNamewithout the intermediate File creation but the result is the same, under Linux it works and under Windows it fails opening the file.
From my WarningHandler.displaymessage method I can see taht the file name is correctly (at least I guess) as it is:
/home/jaaf/jilt/theFileName with Linux
c:\Users\jaaf\jilt\thefileName with Windows
For information the file theFileName is EUC-JP encoded and contains Japanese Characters
Thank you for help
Edited by: meaulnes on Jul 8, 2009 5:19 AM
Complementary information after investigation
I split the line
i = new BufferedReader(new InputStreamReader(new FileInputStream(f), "EUC-JP"));//dicFileName
in 3.
It seems that FileInputStream and InputStreamReader pass without problem.
But the line
i=new BufferedReader(isr); where isr is the InputStreamReader makes the program crash (Even the catch is not treated).
The message I get is:
Run Time Error
prog C:\ProgramFiles\OPenOffice.org3\program\soffice.bin
The application has requested the RunTime to terminate it in an unusual way.
please contact application support....
Edited by: meaulnes on Jul 8, 2009 5:31 AM

Hi,
Thank You for help;
I used stack trace
It seems that the error comes from the encoding.
Here is the trace:
java.io.UnsupportedEncodingException: EUC-JP*
+     at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)+
+     at java.io.InputStreamReader.<init>(Unknown Source)+javascript:void(0);
+     at com.zoraldia.openoffice.Dictionary.<init>(Dictionary.java:71)+
+     at com.zoraldia.openoffice.Jilt.createDictionaryDialog(Jilt.java:2477)+
+     at com.zoraldia.openoffice.Jilt.dispatch(Jilt.java:1948)+
Jul 8, 2009 4:23:32 PM com.zoraldia.openoffice.Dictionary <init>*
SEVERE: null*
java.io.UnsupportedEncodingException: EUC-JP*
+     at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)+
+     at java.io.InputStreamReader.<init>(Unknown Source)+
+     at com.zoraldia.openoffice.Dictionary.<init>(Dictionary.java:71)+
+     at com.zoraldia.openoffice.Jilt.createDictionaryDialog(Jilt.java:2477)+
+     at com.zoraldia.openoffice.Jilt.dispatch(Jilt.java:1948)+
I don't understand why on Linux it works but not on Windows

Similar Messages

  • Problem opening freehand files stored in linux server

    hi,
    i have mac and i work using a file server that has a linux.
    The problem is that when i saved a freehand file, after cloosing
    the program and reconect to the local server, i try to open the
    file but freehand ask me for the images the the document has. Is
    like freehand forget the links of the images or can't find it in a
    linux server where they are when i create the file.
    Anyone knows what can i do?
    thanks

    Yes, i know if we put the images in the same folder or i we
    embedded de images in the document the problem doesn't ocurre, but
    we used to work with the same image in lots of documents, like ads,
    catalogues, flyers,... and we can't put each image in each folder
    the disk quote will increase a lot. Moreover if we embedded the
    images the document file will be higger and it's not good to send
    it .
    Thanks

  • Open report file generated from AfterReport trigger fails

    Hi,
    I generate reports files using rwrun.exe.
    In order to know if my report file has been generated without error, I call TEXT_IO.FOpen(..., 'r') into my afterreport to see if any file has been generated.
    It works fine under win2000 but not under Solaris 5.8.
    The report file is generated but for some strange reason TEXT_IO.FOpen( ) generates a non oracle exception -302000.
    Any idea about what happens and how to fix that?
    Thanks,
    Manu

    Hi Sripathy,
    Thanks for your answer.
    In the afterreport trigger, I just open my file as read only to see if it's there.
    The process has just created the file, so, it should be able to open it just to read.
    Anyway, I checked the rights on the file and they are Ok.
    Actually, I think it's a problem with the OS because sometimes, it works fine and the next report, it fails.
    Maybe the file is still "locked" by some other process as I try to read it.
    That's a pain to not be able to check if the report went fine from the afterreport trigger.
    Manu

  • Adobe CS6 crashes after opening a file authored in CC but saved in CS6 format

    I generally create my project assignments for school on the Mac side of my computer (10.9) using Adobe CC 17.1 (latest version).  However, if I am not done, and need to do my normal job, I just bootcamp over to Windows 7, and use CC there to finish the job.
    I then save the AI file in CS6 format via CC, and submit it to my instructor.  However, in both instances (both projects I submitted tha were converted to CS6), they wouldn't open on my instructors  Mac CS6 client.  No error showed up, nothing froze, Adobe CS6 just showed the splash screen, then closed.  Nothing else.  She was able to view them in another reader, but of course, that causes issues.
    Normally the workflow is like this:
    My Mac (10.9):  Open CC Illustrator, and design the work.
    My Windows 7 (Bootcamp):  Open saved CC AI file and continue work.
    ------(same system):  Save CC AI file as CS6 (on windows or mac, either one has producted this result)
    Submit to instructor.
    Instructor opens on CS6 on her Mac, and it just will not open.
    I am wondering if perhaps there is a conversion issue between CC on Mac side, and opening it on CC windows side, and then saving it.
    I may have more information, assuming my instructor provides some more details about her mac, etc.  But, right now, that's all I have.

    Is there anything in Event viewer that might provide a clue? Are you using the same font manager/font server on all systems that you tried to open the file?  Any possibility of trying to open on a Mac, where we might be able to get a real crash report? (I'm on Windows as well.) :(  Try setting the prefs to not check links on open and see if that makes a difference, and uninstall any font activation plugin if you have one. I don't use a font' manager here -- never found one I thought was any good that I could make work with my system (Font Agent Pro was a candidate, but didn't like my user profiles being on drive D:).

  • Can't open cr2 files from my 5D but can from my 20D

    i just got a new computer (windows vista) and on my old computer i could open cr2 files from both my 20d and my 5d just fine. but now on my new computer i can't open the cr2 raw files from the 5d but can from the 20d. I have photoshop cs2. I am not planning to upgrated to cs3 anytimes soon, do I just need to install a plug in? Please help.

    Kristen,
    No, no, no. The DNG Converter is a stand-alone executable program. You can even put it on your desktop. You would need it only if your camera model is NOT supported by ACR 3.7, which is the latest version you can use with Photoshop CS2.
    In that case, you would use the DNG Converter to convert your raw images to DNG files first and then opening the DNG files in ACR 3.7.
    Now, the ACR 3.7 plug-in has to be installed in the correrct location, which is where the old ACR plug-in resides. You will be replacing that old, obsolete ACR plug-in (while Photoshop is NOT running).
    [The default Photoshop installation comes with and installs that obsolete ACR plug-in.]
    Read the instructions on the download page very carefully, and refer to the FAQs of this forum on the same page where you added this topic.

  • Getting ORA-22288: file or LOB operation FILEOPEN failed in Windows XP

    Hi All,
    I am getting the error message
    ORA-22288: file or LOB operation FILEOPEN failed
    when I attempt to call a stored procedure containing the following code.
    bfile_in := BFILENAME( 'SP_IMPORT_NIF20_DIR', v_filename );
    /* Open the input file */
    DBMS_LOB.FILEOPEN(bfile_in);
    It works fine on UNIX but fails when running on my Windows XP Pro Oracle 9i install. I suspect that it has something do to with the file permissions. I can get this same error on UNIX if the file permissions are not set correctly. I get it every time on Windows XP Pro even though I think that the file permissions are
    set correctly. Perhaps the Windows XP Pro permissions are not as I think! or perhaps the Oracle instance needs to be granted access to the XP directories etc. I am not sure how this would be done.
    Any suggestions much appreciated.

    You have EXPLORER set to "Use Simple File Sharing". Uncheck that option for the folders and you will get the security tab.
    I am not sure why you can't run Oracle as a specific user. I do this all the time. In fact, I create an Oracle group and add a user called Oracle and then configure that user/group for all the permissions it needs (and none it doesn't), environment set up, etc. and then run the service as that user. Can you get a specific error message?
    As a side note, I am clueless why Oracle doesn't do this for you. They do on Unix installs.

  • Unable to open help files in Pagemaker 7.0.1a in Windows 7

    I see this question has been asked before, but the link to the solution no longer works.   Page maker works fine in Windows 7 64 bit, but when I click  on the help button, nothing happens.  If the link on the previous solution can be updated or expounded upon, that would be great.  Thanks for your time, Steve

    Did Indesign fix the skew problem?
    I scan lots of old books and then need to set the resulting tif files.  They are never exactly right and have skew.  In PageMaker I could fine tune the skew to the nearest .1 degree. In InDesign, only to the nearest degree.  You will notice the difference.  Lots of pages deskew at .3, .2, -.5 degree.  Note these are all tenths.  I ran into this problem, I did not see a solution, I dropped the trial version of InDesign.
    PS as I'm stuck with PM7, I made the mistake of trying to move the help files from IE to Google Chrome, not remembering that Chrome will not open local files.  I've wiped out the IE code that will run IE and now have no help files.  (File: Preferences: Online)  Moving to Firefox does not work for the same reason:  It won't open local files because of security problems.  PM7 is hardwired in such a way as to mis-present the local file, such that even if Firefox could open it, it won't.  So we need the original magic code, as without it, PM7 cannot start IE, which means that IE cannot display html formatted help pages.
    Many thanks for your help.
    PPS:  Contiunued fussing about, I found the PM help files, under Adobe/PM/RIS??/USEnglish/Help (I think) and then went to the main help.htm and double clicked.  Came right up in >>Google Chrome<< which supposedly does not run local files.  I then bookmarked it.  So I can't get to the help from inside PM7, but I can hit the bookmarked file in Chrome.  Chrome displays it better than IE.

  • "open recent file" menu item - 2 issues / aspects (Mac & Windows)

    regarding the  "open recent file" menu item in the File menu.
    1)   should have a way to "clear recent items".  Most software solves this by appending an item "Clear Recent Items" to the bottom of the list of aliases that springs forth from the menu.
    2) Further, in the preferences it should be able to be set to 0 to prevent the function entirely, not just natural #s 1-99.  This is the case in Windows Adobe REader, and on the Mac it was the case the last time I was able to check, but due to the bugs in 9.1.x regarding the ability to handle a case-sensitive file system I haven't been able to even open the preferences on the mac for a while.

    Michael:
    Thanks for your quick reply.
    Please note that this issue:  "open recent file" menu item that is not clearable, nor is the system preference able to be set to retain 0 files,
    has absolutely nothing to do with the file system issue.  It is just a design choice (or oversight or bug depending on your point of view).
    It is an issue of security/privacy to not have the Reader keep a list of recently viewed files, or to at least allow the user to clear the list.
    Thanks again for your time, interest, and speedy reply.
    Cheers!

  • Can't open Keynote files on my Mac - but they open fine on other Macs

    +I had this query in the Keynote 8 section, but was getting no replies - so I'm posting it here too.+
    If I attempt to open any Keynote files, I now get this error message.
    "Can't open file "+File path: file name+.key"
    To clarify, the text in italics above shows the actual file's file path and name.
    The file will then will appear on screen, but is unresponsive to any clicks or menu commands.
    The files will open successfully on other Macs, so they aren't corrupt.
    The same applies when creating a new file from Keynote: All screen menus / buttons are dead - all I can do is drag the main window around the screen.
    I've tried to reinstall Keynote, but this hasn't resolved the problem. I've checked that I'm running the latest version (4.04 of Keynote 8) - and I have nearly 12gb free on my hard disc. I've also thrown out any Keynote related files I could find in library or preferences in case some application settings had been corrupted. (Having said that, I don't know if I caught them all - as I just used Spotlight to find files with the name Keynote.)
    Are there specific preference / system files that I should look for and dump? Is there an easy way to do a complete uninstall of Keynote so I can try another install? Or is this a symptom of something else?
    All ideas gratefully appreciated!

    All the issues I describe in my questions around this time re: Keynote were actually symptoms of a soon-to-die laptop. The Hard Disc was corrupting, and Keynote was the first application to be affected.

  • Trying to transfer file via Ethernet Cable - but failing. Why?

    Hi,
    Many thanks for your attention.
    I am trying to transfer a small file from a MacBook Pro to a Mac.
    What step am I missing?
    1. Both Macs on. On both Macs, Airport is turned off.
    2. A Crossover Ethernet Cable plugged into both Macs.
    3. Under System Preferences/ File Sharing is turned On in both computers.
    4. Don't know if this is necessary - but under System Preferences/ Security - Allow all Incoming Connections is checked.
    5. On the computer that I want to receive the file:
    Under Finder/ Go/ I select Connect To Server
    6. Then I click the Browse option.
    7. The 1st Computer's icon appears in a window.
    8. I click on the icon.
    9. For a few moments, it says - "Connecting - "
    10. But then after a few moments - Connection always Fails.
    Followed these steps via other Posts, but they must have neglected to mention a step I am missing.

    moonlightcaravan wrote:
    Second, seeing "connecting" and connection failed is normal. You must click on "Connect As" in the Finder window and then enter the username and password for the admin account on the other computer. That should fix things.
    Thanks for responding.
    When does clicking on "Connect As" happen in the process above?
    After step six? Seven?
    After the connection has failed?
    Is this the FInder window that shows the icon of the computer you want to copy the file from?
    You should see "Connect As" in the Finder near the top right of the window as shown below:
    !http://blog.brothersoft.com/wp-content/uploads/2008/11/howto_copy_files_to_or_from_your_iphone02.jpg!

  • Currently cannot open pdf files when using firefox, but can open them in ie... have current adobe downloads..what could prevent opening pdf files such as forms on irs site using firefox

    When attempting in firefox to open a pdf file such as forms on the irs site, I get a white screen with a black long oval in the center with a blue line inside the black oval. Can go to internet explorer and it works fine. Have loaded the latest adobe acrobat. Also went to firefox help and looked at add ons and plug ins and do not see anything obvious

    Hi
    What's your portal version ?
    What response headers do you receive from the webcache port ? (using something like IEhttpheaders but for mozilla, maybe Firebug will help you to get them).

  • Unable to open Macro file in Excel 2013 but opens fine in Excel 2010

    Hello,
    Hopefully someone can help us.  We have a Macro Excel file created with Password Protected to open as well as to Modify.  The file opens fine in version 2010. However, in Excel 2013, we get an error message "Cannot run the macro "filename.xlsm'!QC'.
    The macro may not be available in this workbook or all macros may be disabled.  However, if we removed the password all together, the file can be opened in Excel 2013 without any issues.  We do NOT want to have the file without the password so any
    help is appreciated.
    Thank you in advance.

    Hi,
    Do you have the latest update of 2013, there has been changes in dec 2014 that causes problems with VBA code.
    Maybe that is also the reason here. See below link for more information.
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2014/12/11/forms-controls-stop-working-after-december-2014-updates-.aspx
    Regards,
    Reshma
    Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered

  • Applet fails in Linux but works on Windows and MAC

    Hey I've been testing my RMI Chat and everything seems to work fine when I connect to it from a MAC machine or Windows machine but when I try to connect on Linux (openSUSE) the applet gets a connection timeout.
    The applet will load initially but when it connects to the server, I get a connection timeout exception. The exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.ConnectException: Connection refused to host: 192.168.1.103; nested exception is:
         java.net.ConnectException: Connection timed out: connect
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
         at java.lang.Thread.run(Thread.java:595)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
         at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:124)
         at ds.rmi.server.ChatServerImpl_Stub.registerClient(Unknown Source)
         at ds.rmi.client.ClientUI.start2(ClientUI.java:360)
         at ds.rmi.client.ClientUI.register(ClientUI.java:282)
         at ds.rmi.client.ClientUI.start(ClientUI.java:334)
         at sun.applet.AppletPanel.run(AppletPanel.java:420)
         at java.lang.Thread.run(Thread.java:595)The address to connect to the Chat is: 192.168.1.102:8080/dschat and the 192.168.1.103 is the address for the linux machine.
    Has it got to do with the /etc/hosts?? I also have java.rmi.hostname set in the server class
    Thanks in advance for any help
    Brian

    Check to see if you can access your server from other machines over the internet using telnet. That is in command prompt go to the drive that has the OS. Say it is C:
    Then write:
    C:\>telnet <your servers external ip address> <port number that you are trying to access>
    If everything is fine you will get a blank window with the cursor blinking on the top left hand corner of the window.
    Generally this connection timed out exception occurs when the client can't find the server.

  • User system gets freeze / Hang when he opens a file from SharePoint. But in chrome it works fine.

    Hi,
    This is the only USER who is facing above issue. But when he hold CTRL key and click on the file. It works fine. We are using IE 8 32 bit. Please note it works fine in IE 8 64 bit. 
    Could you please advise why it happens? Is this something share point admin should resolve or TECH SUPPORT should take care this issue?
    Thanks
    srabon

    There will be something odd setup in his IE settings. Get him to try to connect from another machine which also uses IE 8 32bit, the problem shouldn't be present there.
    That means that the issue is down to his local machines configuration which generally puts it under the tech support / desktop support teams purview.
    To help them along, blow away his cache and reset any of his settings you can find to the default.

  • Unable to open PDF files with Adobe Reader v11.0, in Windows 8, using C# Process.Start()

    I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File")
     in windows 7 or windows 8 with all previous versions of Acrobat32 reader.
    However, with v11.0, the same command, in Windows 8,
     does not open the PDF document. I can see the Acrobat(32) started in the task manager,
    but the document does open. Not sure how I can troble shoot
    this problem.
    As a test, I created ta batch file, with a simple command that calls AcroRD32.exe with a PDF file as a parameter. When I executed the batch file in cmd window, it opens the PDF document. If I execute the batch file using Process.Start(), again it does not
    work. The CMD window opens but, the document does not open. The cmd window just stays open.
    So, there must be something with opening the PDF using the Process.start() command.
    Any help would be appreciated.
    Thank you,
    - Kam
    Intel Engineer

    This is something Adobe has to troubleshoot. Probably the pdf file association is broken. I suggest you to visit forums.adobe.com to ask Adobe about your problem.
    Visual C++ MVP

Maybe you are looking for