Opening a file with FILE_SHARE_DELETE mode (Only on Windows)

Hi,
We have an application that imports logs from several 3rd party vendor's applications. Basically what we do is import the logs in real time, i.e we do have a live FileInputstream connection to the log file. Now, when the 3rd party applications that rotate these logs (many of them do when they grow big or scheduled periodically), all unix flavors dont see to have any problem, while the windows does complain that the device or resource is busy and the original application is not allowed to rotate it. When i dug into the native code of windows jvm, i found that the file is not opened in the FILE_SHARE_DELETE mode and only with FILE_SHARE_READ and FILE_SHARE_WRITE modes. When we wrote a separate C++ application the opens a file with FILE_SHARE_DELETE mode, we found that the logs are rotatable.
Now, how can we instruct the JVM to open a file with FILE_SHARE_DELETE mode? Is there any such implementation already or do i have to come up with another class extending the FileInputStream and use a totally different open method where the file is opened with this mode in the native code?
Thanks
Manava

Hello,
I think you can write :
Runtime.getRuntime().exec("start.exe " + MyFileDialog.getDirectory() + MyFileDialog.getFile());
So, "start.exe" choose the application (not valid for NT machine), ".getDirectory()" return the PATH and ".getFile()" return the NAME.
Best regards from France
Thierry

Similar Messages

  • Problems opening word files with Word 2011 from a Windows 2012 server volume

    Here is what we are seeing. Open any Word document on our server with Word 2011 (mac) results in an excruciating delay. Even a  simple one page document will take over a minute to open up. The same document opened from the desktop of the mac opens in
    2 seconds. 
    In troubleshooting this I turned on invisibles for my mac and watched the folder on the server where the file resides. Here is what I noticed.
    1. If I open that file from a windows computer there is an invisible temp file created for the file that disappears when I close the document. The file opens on the Windows 7 machine with Office 2010 very quickly (2 seconds)
    2. If I open the file from my mac with the preview of Word 2016 the same temp file is created and the file opens very quickly. (2 seconds).
    3. If I open the file from my mac with Word 2011 it takes over a minute and I don't get a temp file on the server. Closing the document takes just as long.
    So, what I am guessing is that Word 2011 is trying to create the temp file, tries for a minute, and finally gives up and opens the file anyway. When I close the file I am guessing it is looking for that temp file and finally gives up after a minute and closes
    the file anyway. 
    Any insights as to what is going on would be appreciated. Our users are very frustrated with this situations.

    Hi,
    Since the issue only occurs to Word for Mac, I'm not familiar with the mechanism how it opens a file, we mainly supports Office for Windows in this forum. Please post the question in Office for Mac forum for further assistance:
    http://answers.microsoft.com/en-us/mac
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Opening a file with custom FileDialog. (VERY URGENT)

    hi everybody,
    I have a problem and stuck. I have developed a MDI application that provides all function like open saved files, create new, edit and lots of other. It only opens, save ,edit etc the graphical diagrams inside JInternalFrames. I have an icon on my desktop when clicked opens this Application. Just like Editplus, Word or some other application when you click on the icon it opens that. Same way I have created such functionality.
    Now instead of this I have created a custom FileDialogfrom which the user selects this application and is opened. Now I have small icon for this FileDialog on the desktop when opened gives the interface to select the files to be opened. My FileDialog just looks like the FileDialog but some more functionality and more components like JComboBox, Jlist, JtextField, JButtons etc. in it and have removed some of them. I am extending JDialog. But now my probelm is when you select a file and click open, it should open the selected file. How can I achive this functionality in my custom FileDialog as I am not extending FileDialog and as it is built in the FileDialog. How can I open the files with any extension in it's related application e.g .doc files to be opened in MicrosoftWord, .txt to be opened in notepad, .c or .cpp in Visual Studio C++ etc.
    How can I put this kind of functionality in my custom FileDialog. It's really important for me please any comments will help me alot. Thanks for the help

    Hello,
    I think you can write :
    Runtime.getRuntime().exec("start.exe " + MyFileDialog.getDirectory() + MyFileDialog.getFile());
    So, "start.exe" choose the application (not valid for NT machine), ".getDirectory()" return the PATH and ".getFile()" return the NAME.
    Best regards from France
    Thierry

  • Cannot open PDF files with Reader XI message appears Adobe Reader has stopped working

    Cannot open PDF files with Reader XI message appears Adobe Reader has stopped working. A problem has caused the program to stop working

    Which Operating system you are using?
    Can you open Adobe Reader by itself?  If so, try disabling Protected Mode [Edit | Preferences | Security (Enhanced)] and then try to open the file.

  • Unable to open jsp file in Design mode

    Hi,
    I am unable to open jsp files in design mode, I am using eclipse Version: 3.6.1.
    Please help.
    Regards,
    Ale Hasan

    Hi Ale,
    Thank you for the additional information. Unfortunately, there does not seem to be anything unusual about your project based on your description. I'm surprised you don't see any processes listed in the process view while waiting for the page to open. I thought you might see something related to a queue manager job to "Manage Resource Event Jobs".
    Are there any messages in the error.log? You can open a view to the error log from the menu option, "Window -> Show View -> Error Log". I'm curious if there are any messages about a process timing out, unable to reset some object within a certain time, or any exceptions logged.
    If you change to another workspace with just a single JSF web project containing a smaller number of JSP, do you experience the same behavior?
    Can you also try using a more recent release of OEPE to see if that helps? The 11.1.1.6.1 release is about a year old.
    http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html
    Kind regards,
    Carlin

  • Issues opening RAW files with CS2...

    I find if a bit complicated to open RAW files with Photoshop CS2 in iPhoto 08 (I'm using OS X 10.5). Currently the only way I've been able to do this is do a search for the file name in the finder, at the bottom of the Finder window, in the path, double click on the folder that the RAW files are in (user/my name/pictures/iphoto library/originals/2007/RAW files), then highlight the NEF files (the cameras a Nikon D200) I want to open, hit command/O then Photoshop CS2 opens the files in the RAW converter. If I try this from CS2 (command/O) the path goes as for as iphoto library (user/my name/pictures/iphoto library), at this point the iphoto library icon is ghosted out and can not be opened. If I drag and drop the image from iPhoto to the CS2 icon in the dock it opens as a jpg not the RAW file I need. If I try clicking my way to the folder from the left side of the finder, my name/pictures/iphoto library this is as far as I can go. There's something strange going on here. How can you go to a folder only one way and not the others? There seems to "hidden" folders now.
    So... My question (finally), how can I simply open RAW files from iPhoto 08 in CS2?

    In iPhoto's Advanced preferences select the checkbox under RAW Photos: "Use RAW when using external editor". That will open the Cr2 file in the raw editor. To get the edit to show in iPhoto you'll need to click on the Open Image button so the jpg version is created with the edits you made to the RAW file. Then when you save you'll need to navigate in the Save window to the Modified folder and save it into the folder representing the event that the original is in. It's not easy. I've not done much with RAW, just a few tests, so there may be an easier way to get iPhoto to recognize the edited version.
    If you don't use the Open File and close iPhoto won't display the edits you made to the RAW file.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Cs4 opens cs3 files with errors

    Here's a big heads up for anyone considering upgrading to cs4 - don't!  I've been working on a cs3 project and decided to upgrade to cs4 for the extras in the 3D toolset.  All the Adobe propoganda implies this can be achieved no problem, as did soemone on telephone tech support.  Perhaps I didn't clearly ask 'can I open my cs3 file in cs4'.  I can BUT the clips are very much 'out of synch.  I'll lick my wounds and go back to finishing in cs3 but don't purchase cs4 if you think you can seamless import your sc3 project.  Because it seems you very much can not!

    Dennis,
    Many thanks.
    Date: Thu, 11 Feb 2010 05:21:44 -0700
    From: [email protected]
    To: [removed]
    Subject: Premiere Pro cs4 opens cs3 files with errors
    Jarrod,
    As I've stated here in this forum, we're trying to transition Adobe technical support to a new organization and providing the best support we can to our customers.  That being said, it is a long and sometimes painful process, which is why I am here on the forums at times to lend some support.  This doesn't help you and you might not even care so...
    Here's a couple of suggestions:
    1. make sure your software is updated (Premiere Pro 4.2.1) by going to help>updates
    2. clear your prefs - http://blogs.adobe.com/genesisproject/2009/11/having_weird_behavior_with_an.html
    3. try importing (ctrl-I) a CS3 project into CS4
    Try these things and let me know how you make out.  Also, it would be very helpful if you told us about your system and the specs.  I've posted about the importance of 64-bit and lots of memory many times.  You can find one link here: http://blogs.adobe.com/genesisproject/2009/03/64_bit_os_and_adobe_products.html
    The future of Premiere Pro is 64-bit only: http://blogs.adobe.com/genesisproject/2009/10/its_official_64bit_is_the_futu.html
    Beyond that if you'd like me to look into your case, please post your case # here or in a private message to me and I'll gladly look at it.
    I sense your frustration and its understandable - give us a chance to help you.
    Dennis
    >

  • Cannot open pdf files with Firefox's built-in pdf viewer

    This just started (I think) with Firefox 37.01. This is on Win7-X64. I cannot open pdf files with the Firefox built-in pdf viewer. If I click on the file or try to open it from within Firefox, it brings up a "opening filename.pdf" message. If I select the "Open with" radio button as 'Firefox (default),' it just keeps looping on this process; it never opens. In Tools => Options => Applications, Portable Document Format (PDF) is indicated as 'Preview in Firefox.' I've never had any other PDF viewer installed on this computer. I've tried disabling all plug-ins and extensions, but it still doesn't work. I searched for solutions but haven't found any for this specific issue.
    Thanks for the help.

    Hello,
    Have you tried, to start Firefox in safemode you can do so by following these steps
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • How do I get firefox to open pdf files with Adobe reader instead of google?

    Firefox is unsucessfully using google to open pdf files.  How do I get firefox to open pdf files with Adobe reader?
    Message was edited by: veeryTalonted

    "Google" is a search engine (website) and NOT (repeat: NOT) a PDF viewer. It can't and won't open PDFs in any real or imaginable way.
    Firefox added their own proprietary PDF viewer with version 20 - they're on 21 now. I'll be the first to admit "it sucks". You CAN'T fill in PDF forms with it, and you can't email them from the page like with Opera, Safari or Chrome (which use the reader plug-in still).
    Unfortunately, the ONLY option you have now that they've added it and killed the ability for the Reader plug-in to work with Firefox, is Tools>Options>Applications - select Portable Document Format(PDF) and choose "Use Adobe Reader (Default)". What that will do is FORCE Firefox to download the PDF instead of opening it in their terrible PDF viewer in the browser window.
    Or... use one of the other browsers I mentioned. They're all free.

  • Can't open PDF files with IE10.

    I cannot open PDF files with IE10. I had other issues, as well, with IE10 so I went back to IE9. Then it was suggested that not updating to the latest edition of IE could lead to security issues and sure enough my computer was hacked shortly thereafter. Now I am back with IE10. How do I change the registry to be able to open PDF files?

    Please try turning Enhanced Protected Mode OFF in IE10 and see if it makes a difference.   Navigate to Internet Options, select the Advanced Tab, scroll down to the Security section, and uncheck the box that says "Enable Enhanced Protected Mode".

  • Inquiry about opening any file with internet explorer

    Dear all,
    i am opening any file with internet explorer on the client machine.but i want to open it as READ-ONLY. so is there any parameter i should add to the command.
    the command i am using is :
    client_host('"\Program Files\Internet Explorer\iexplore.exe " "'||v_file_name||'"'; );
    Thanks in advance

    Hi,
    I don't think there is a way to open a file as read only using Client_Host. But i can give you another suggestion. Change the permission of the file to readonly (may be using chmod command) before opening the file in the browser.
    client_host('chmod -w '||v_file_name);Regards,
    Arun

  • Error WUC-14 after open a File with CLIENT_TEXT_IO.FOPEN (Oracle 10g)

    Hi,
    the error WUC-14 occurs during open a file with forms10g.
    F_VersandZahlen := CLIENT_TEXT_IO.FOPEN (F_Dateiname,'w');
    Afterwards the error message it ist possible to write into the file and close it correctyl (without am error message - also the Information is correkt).
    During debugging the error occurs in the function GETPROPERTY (Webutil).
    the error occurs only sometimes.
    Can anybody help me to solve the problem ?
    best regards,
    Alexandra Schermann

    Hi Alexandra,
    You can catch the exception in Exceptions part and close the file. Something like,
    DECLARE
    F_VersandZahlen CLIENT_TEXT_IO.FILE_TYPE;
    BEGIN
    F_VersandZahlen := CLIENT_TEXT_IO.FOPEN (F_Dateiname,'w');
    <do your processing>
    EXCEPTION
      WHEN OTHERS THEN
       CLIENT_TEXT_IO.FCLOSE(F_VersandZahlen);
    END;-Arun

  • Hi, I have a version of CS4 on my Mac.  I can not longer open Raw files with it from my Canon 5D.   I never had problems with it in the past.  What can I do?

    Hi, I have a version of CS4 on my Mac.  I can not longer open Raw files with it from my Canon 5D.   I never had problems with it in the past.  What can I do?

    is that the eos 5d?
    if so, you only need cr 3.3 or greater.  what version do you have in your cs4? (help>about plugins>camera raw)
    if you need to update it, http://www.adobe.com/downloads/updates/

  • CS4 opens unchanged file with changes made to different saved file

    Ok, I searched for this but couldn't find anything. Probably because I have no idea what is happening. 1) I opened a raw file from a CD in photoshop cs4, lets call it photo1.nef. 2) I saved the file with a different name on my HARD DRIVE after making changes, photo1b.tif. I did not in any shape or form save the file on the CD (can't anyways). 3) Now, whenever I open the original file, photo1.nef on the CD it opens with all the changes I made previously to the file saved as photo1b.tif (remember this is the original unchanged file not the file I changed). But, when looking at thumbnails it appears to be the unchanged version of the file. I have closed photoshop and deleted all my temp files and still it opens the file with the changes, even though other programs open the file in it's original state without any of my changes. How do I stop this? I think I may be going nuts over this! Help! My wife is laughing at me when I show her.

    Sounds like you may be using a centralized cache for your Camera Raw adjustments (as opposed to sidecar XMP files).  Check your preferences inside Camera Raw or do an Edit>Camera Raw Preferences from Bridge.
    You should be able to clear the edits by right-clicking the image in Bridge and selecting Develop Settings>Clear Settings.
    Only Adobe programs are going to use those edits by the way.  That's why opening the file in other programs doesn't show them.

  • Trouble opening acrobate files with reader 10.1.7.

    I have trouble opening acrobate files with reader 10.1.7. When I click  on the file to open it with adobe reader x, nothing happens. If I click  on Adobe Reader X icon, a message comes up: preparing to install. After  that, I can open a PDF, but only until the next reboot.

    Something went amiss during the install. Windows keeps trying to finish the incomplete install every time Reader opens.
    Use the Adobe Cleaner to completely remove Reader.
    Download the offline installer and reinstall without a download manager

Maybe you are looking for

  • Calendar weekly view: unwanted nonbreaking spaces before the column link

    Hello, I have a column link in a calendar. In the weekly view, before the link text appears (specifically before the anchor element) multiple nonbreaking spaces are output. The more links I add to the calendar, the more spaces appear, so the links ar

  • Large file stuck in mail que

    I attempted to mail a large video file 23 Mb to my parents.  The video was to big for yahoo and now it's stuck in the "Recovered Messages (Yahoo)" part of my mailbox.  What makes it even worse, is there are now 3035 duplicate files of the same thing.

  • Cannot change colors in Image

    Hi All, I really don't know any further in that problem, it can only be a small thing, but I don't come behind: I'm creating a JPanel component with its own paingComponent method so that I can draw some things within that component: JPanel p = new JP

  • How to fetch Errors in Workflow E-Mail

    Hi All :-) Just a short Question. We´re using OWB 10.1.0.4.0 and Workflow 2.6.x. Now i try to use the E-Meil Activity in a Workflow. Everything works fine, Mails delivered correct. So far so good... Now i want to fetch the evantually appearing Errors

  • Huawei e170 dongle, where do I find out what firmware it has on it?

    Does anybody know how to find it? I have problems running it and thought the firmware is not up to date to run under SL? Also how to update the FW if needed?