FileLock is not working in Mac OS  - Used in Javafx application

In my application, there is pause & resume functionality on the file download.
To achieve this, we used java.nio.channels.FileLock to lock the file.
It is working fine in Windows, not in Macintosh OS 10.8.
We are using JRE 1.7 u 15 to run the application.
Here is the code I am using to lock a file which is working fine in Windows, but not in Macintosh
FileOutputStream file = null;
FileChannel dbFc = null;
FileLock dbFl = null;
file = new FileOutputStream( new File(sFilePath));
dbFc = file.getChannel();
dbFl = dbFc.lock();
file.write(buffer,0,read);
When I am applying lock on the FileChannel, it is not able to lock on Mac OS systems.
Is there any alternate I can use instead of FileLock .
All this logic is part of JavaFx application which will run from user's machine
Please suggest

Not really a JavaFX question, but a quick google search indicates that on some Apple OS version, lock is not supported.

Similar Messages

  • FileLock is not working in Mac OS

    In my application, there is pause & resume functionality on the file download.
    To achieve this, we used java.nio.channels.FileLock to lock the file.
    It is working fine in Windows, not in Macintosh OS 10.8.
    We are using JRE 1.7 u 15 to run the application.
    Please suggest.

    Well, my question is regarding the alternative for FileLock to make it work in Mac OS
    Here is the code I am using to lock a file which is working fine in Windows, but not in Macintosh
    FileOutputStream file = null;
    FileChannel dbFc = null;
    FileLock dbFl = null;
    file = new FileOutputStream( new File(sFilePath));
    dbFc = file.getChannel();
    dbFl = dbFc.lock();
    file.write(buffer,0,read);
    When I am applying lock on the FileChannel, it is not able to lock on Mac OS systems.
    Is there any alternate I can use instead of FileLock .
    All this logic is part of JavaFx application which will run from user's machine
    Please suggest
    Edited by: 989455 on Feb 25, 2013 9:41 PM

  • Camera not working in Photobooth-in use by other application or not connect

    Upon entering photobooth, the internal camera is reported to be either in use by another application or not connected. It doesn't appear to be working in other applications either. Any suggestions?

    Does the camera have a setting for plain old DV output. (and 4.3 three if you don't want it Letter-boxed)
    iChat tends not to see anything else from Firewire cameras.
    Have you tried Shutting down the Computer and restarting ?
    Do a full shut down and use the power Button to Restart (not the Restart Option)
    If that does not work, then try the second part of this FAQ by Gulliver
    http://discussions.apple.com/thread.jspa?messageID=607640&#607640
    It suggest running the CRon Scripts with OnyX or Cocktail (MacJanitor unfortunately does not work in Leopard) The others come as Trials and do other things.
    9:01 PM Monday; June 16, 2008

  • Audio captcha is not working in mac safari 5.1.7. We used below code snippet that is working in other browser like IF 7,8,9, crome and firefox. Audio refresh is also not happening. When submit Audio Captcha then jcapcha framework giving InvocationTargetEx

    Audio captcha is not working in mac safari 5.1.7.
    We used a code snippet that is working in other browser like IF 7,8,9, crome and firefox.
    Audio refresh is also not happening.
    When submit Audio Captcha then jcapcha framework giving InvocationTargetException.
    <Edited By Host>

    Audio captcha is not working in mac safari 5.1.7.
    We used a code snippet that is working in other browser like IF 7,8,9, crome and firefox.
    Audio refresh is also not happening.
    When submit Audio Captcha then jcapcha framework giving InvocationTargetException.
    <Edited By Host>

  • I m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me. thanks ravi

    i m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me.
    thanks
    ravi
    <Email removed by Host>                                                                                                                                                                                                                                       

    sounds more like Bluetooth rather than moue, but w/o knowing w/o posting mac model type/year we... will... not... know... what you have
    All computers are personal computers, a PC though is also "non-Apple" in common usage.
    Mac also is platform and OS.
    Very confused reading what you are trying to tell us.

  • The rating system is not working.  I'm using LR 5.4 on a Mac with OS 10.8.5.  Any suggestions please?

    The rating system is not working.  I'm using LR 5.4 on a Mac with OS 10.8.5.  Any suggestions please?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Control key (^) combined shortcuts does not work on mac book pro

    All shortcut combinations with the control key (^) do not work. I´m using Mac Book Pro 13 (late 2013) with Os X Mavericks 10.9.4

    The Logic Board is the Main system board. In the Windows world better known as the Motherboard. Except with Apple Mac computers the CPU and the GPU are Soldered to the logic board and if it is a Retina screen model the RAM is also Soldered to it.
    So replacing the Logic board is like replacing the compete system and costs accordingly.
    But there isn't much else you can do if you can't get that switch unstuck. Or just go without sound from the built in speakers. They aren't that good anyway.

  • I have a licensed copy of Adobe Acrobat X Pro for Windows.  I recently switched over to MAC OS and would like to move my Adobe X Pro over but the CD will not work for Mac OS?  Can anyone assist me with this conversion?  Best,  James.

    I have a licensed copy of Adobe Acrobat X Pro for Windows.  I recently switched over to MAC OS and would like to move my Adobe X Pro over but the CD will not work for Mac OS?  Can anyone assist me with this conversion?
    Best,
    James.

    you cannot use your pc license to install on a mac.  you would need a separate license (and serial number) for that.
    adobe allows platform swaps, but only with the latest (xi) version, Order product | Platform, language swap
    your option to use acrobat on a mac are to upgrade to acrobat pro xi and change platforms, use a windows emulator (parallels/boot camp etc) on your mac or swap with a third party.

  • JNLP is not working with MAC OS 10.8.2 Java 7U9, any help ?

    I am running Firefox on MAC OS 10.8.2
    Java 7U9 nac osx x 64
    JNLP files are not working fine. I used to run by double click but now asking me Open with and I can not find any app to link it with Java.
    I searched the internet and found a number of people has the same issue.
    any help will be highly appreciated to link the JNLP files to Java by double clicking and helping me doing my business utilizing that application.

    Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality

  • IMessage and FaceTime not working on Mac Pro and message stating to contact Support came on

    iMessage and FaceTime not working on Mac Pro and a message stating to contact Support came on with a verification code.  It was working on 8/29 but stopped on 8/30.  When I called support to even speak with anyone they wanted $19.  I don't want to pay $19 for an Apple problem.  I cleared my key chain, also reset my apple ID password but still not working.  Works fine on my iPhone.

    There is no official public documentation of that error message as far as I know, but according to reports, it can mean (at least sometimes) that the same Apple ID is being used with the iTunes Store or one of the other Apple content stores, and the payment method is invalid. Sign in to the store and review your account. You do not, of course, have to provide any billing information to set up an account to use only with iMessage, as it's a free service.
    Otherwise, do what the error message tells you to do. According to reports, you won't be charged for the call if you select "Apple ID" as the product you need support for, and cite the customer code in the alert as the "validation code" to the support representative.

  • Multiple Image Upload not working on macs

    Hello everybody,
    I have searched everywhere for an answer to this issue and I'm not sure if there is a solution yet.
    I am hoping someone reads this and tells me if either I need to use another product or post a fix for this to work.
    I am developing a website for a photographer who needs to upload the pictures he takes for his clients to review on his website.
    So on the backend I have created an application where he logs in and creates a new client and then uploads multiple images to that client's folder.
    I am of course developing the site in ADDT version 1.0.1. in Dreamweaver CS4.
    Everything works as expected except for the image upload part, where he is unable to upload even a single image.
    He is using Mac OS X and Safari 3 to access his site.
    I use a PC and can upload images perfectly, but the whole purpose of the website is for him to be able to upload images without me.
    I read somewhere that ADDT's Multiple Image upload did not work on Macs because of the way that the OS handles image uploads to the server via HTTP. I also know that Flash v.10 had an issue with this behaviour in the past, but that it's been fixed with ADDT's v. 1.0.1, which is true since as I said I am able to upload images from my PC using that Flash version.
    There is a product called MultiPowUpload from Element-IT (http://www.element-it.com/MultiPowUpload.aspx) that seems to do the exact same thing as ADDT's Multiple Image Upload, and I have tested the Demo version both on Mac and PC and works perfectly well.
    I really would like my ADDT behaviour to work, first because I already have the whole site developed in it, plus I am used to the software already, and also because Element-IT's product is a bit pricey for a multiple server license (which I would need for other sites I plan to develop for Mac users).
    Any thoughts or pointers you might have will be greatly appreciated.
    Thank you in advance.
    Luis Herrero.

    Thanks a lot for your replies and helpful ideas.
    It turns out that for some strange reason the problem was with the hosting provider.
    I have moved another site which was not working with Macs either to a new provider and everything works now as it should be, without changing any files at all.
    I have in fact v.1.0.1 in both those sites (those were the first things I checked before posting here) and Flash Player v. 10 both on the Mac and PC, so it will remain a mystery as to why the server behavior did not work with that particular host on Macs.
    Thanks again.
    Best regards.

  • My Help Viewer is not working for mac help

    My Help viewer is not working for mac help. Everytime i choose mac help the window opens then closes. But when i open another help like safari help it opens and works fine. If i switch it back to mac help the window just closes and the application quits.
    If you know how to fix please telll!

    noname212,
    Using "Search Discussions" with the term "Help Viewer" you will lead you to numerous posts which refer to Troubleshooting Help Viewer by Dr. Smoke.
    Good Luck
    ;~)

  • Open firmware commands do not work on Mac mini

    Open firmware commands do not work on Mac mini. At least on Mac mini 1.83 GHz Intel Core Duo (2 GB RAM and 80 GB HD) with Mac OS X 10.4.8.
    Holding:
    Option Command OF
    when restarting does nothing!
    Option: alt key.
    Command: Apple key ().
    Is this a flaw or am I missing something?
    Thanks.

    Since there is no Open Firmware, there's no reason to reset the Open Firmware defaults. I would assume that since there's no current interface to reset the EFI defaults, this operation is not necessary. I can't say that for certain. But, just like "zapping the PRAM", which used to help when troubleshooting issues with Mac OS 9, doing it in Mac OS X doesn't change or affect as many settings so it's really not necessary.
    -Doug

  • I am trying to set an open DNS using the MacAir. But when I tried to flush the existing one at utilities/terminal, it will not work.  I am using Yosemite.  May I know what should be the command line so that I can shift to an open DNS?  Thanks

    I am trying to set an open DNS using the MacAir. But when I tried to flush the existing one at utilities/terminal, it will not work.  I am using Yosemite.  May I know what should be the command line so that I can shift to an open DNS?  Thanks

    >SystemPreferences>Network>DNS

  • My gps is not working.  I cannot use turn-by-turn navigation in google maps.  I downloaded a GPS test app and it showed my phone is not locking on any satellites.  How can I correct this?

    My gps is not working.  I cannot use turn-by-turn navigation in google maps.  I downloaded a GPS test app and it showed my phone is not locking on any satellites.  How can I correct this?

    We certainly want to make sure you get the most out of the GPS, wplaxico! Was this tested primarily outdoors? When did this begin? Any other recent apps of updates installed when this started?
    Thank you,
    YaleK_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

Maybe you are looking for