How do I stop getting an "Access is denied" when writing to a folder?

Hello,
I'm getting this exception:
java.io.FileNotFoundException: C:\Users\code3\Desktop\DESKTOP\testX\photoAlbum01 (Access is denied)
From:
public static void main(String[] args) {
    String source = "C:/Users/code3/Documents/NetBeansProjects/siteacctj2ee/web/images/travoola_logo/travoola_logo.jpg";
    String dest = "C:/Users/code3/Desktop/DESKTOP/testX/photoAlbum01";
    copyDefaultImage(source, dest);
    public static boolean copyDefaultImage(String source, String dest) {
         FileChannel in = null, out = null;
         boolean answer = true;
         try{
       in = new FileInputStream(source).getChannel();
       out = new FileOutputStream(dest).getChannel();
       long size = in.size();
       MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
       out.write(buf);
         }catch(IOException e){
             e.printStackTrace();
             return false;
         if( (in !=null) && (out != null) ){
             return answer;
         }else {
             return false;
     }I changed permissions on both file (source and destination) to allow sharing and have granted permissions on all levels. I'm developing locally on my laptop: Windows Vista Home Premium. I don't know what to do after this. I'm not sure if it is a java error (I don't think so because of the "Access is Denied" message) or a network/OS issue though I think I've granted all possible permission. I'm the only user/user account for this computer/laptop. Thanks I appreciate the help

hi code3,
try this
String dest = "C:/Users/code3/Desktop/DESKTOP/testX/photoAlbum01/A_NAME.jpg";

Similar Messages

  • How do I stop getting email notifications from Apple. I have checked all of the "no" boxes. Help!

    How do I stop getting email notifications from Apple support. I have checked all the "no" boxes. Help!

    https://discussions.apple.com/docs/DOC-3661
    Message was edited by: deggie

  • Notifications ...  how do I stop getting email notifications?

    Notifications ...  how do I stop getting email notifications?  I like this site but now I get 20-50 or more notifications a day in my email.  I would rather shut that off and check back on my own now....  

    Once you've turned off notifications, you won't get new ones. But you still have to cancel the notifications you've been receiving. This thread explains how at the top: https://discussions.apple.com/static/apple/tutorial/email.html

  • How do I stop getting text messages on my macbook air

    How do I stop getting text messages on my MacBook Air?

    Hi,
    The Mac has an App that is called Messages and one of the accounts in it is the iMessages one that can sync with the iOS one.
    Open the Messages app and go to the Preferences (In the drop down Menu in the Apps name in the Menu Bar)
    In the Preferences select the Accounts tab.
    Select the iMessages account  if it is not selected.
    Untick the iPhone Number to stop iMessages sent to your iPhone Number appearing on your Mac.
    Also go to the General section of the Preferences.
    There is an items that reads "When I quit, set the Status to Off Line"  select this.
    This will stop any incoming Messages (from any source that Messages can join) from launching to app when you have not started it but your Computer is On.
    You may also want to go to your iPhone Settings and remove the Apple ID.
    9:22 pm      Wednesday; July 30, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How do i stop getting the same notifications on all my devices?

    How do i stop getting the same notifications on all my devices?
    Is it possible for me to read an email on my iPhone, and then not have to see the notification on my mac?

    Get a separate email address (gmail) to use for messages on your iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
     Cheers, Tom

  • How do I stop getting all songs put on two I-Pods when sharing the same library?

    I am trying to figure out how to stop my I-Pod from syncing everything in the I-Tunes. We have a Music Library that other I-Pods in the house operate on as well. I want to stop getting the music they purcased when I plug my I-pod into the computer and go on I-Tunes. Can somebosy please help me?

    It will only sync what you select to sync.
    If you do not want it on your device, then do not select it to sync.
    I use playlists and sync only the playlists I choose to my device.  My wife does the same.

  • How do i stop getting emails from support!!!!

    How do I stop getting emails from support!!!!

    To stop all email notifications or to select those you want to have go to Your Stuff in the top right of this window. Then select Your Preferences. When that page loads you will see a tab for Email Notifications. Select that and go through the choice for how or when you want to be notified by email, or not.

  • How do I stop getting emails

    How do I stop getting emails fro the apple support community ? I have way too many emails

    https://discussions.apple.com/docs/DOC-3661

  • How do i stop getting my wives contacts from her iPhone on mine??

    How do i stop getting my wifes contacts from her iphone on mine?
    Also how do you sync notes from imac to iphone??

    For the Notes issue, on the iMac go to Apple Menu > System Preferences > iCloud and insure Notes is one of the items checked.
    The following is a previous discussion on setting up a separate Apple ID for using iCloud but still sharing the same iTunes if desired: https://discussions.apple.com/message/23204265#23204265

  • How can I stop getting everyone's reply on group messages?

    How can I stop getting everyone's reply on group messages?

    i wish there was a way around this as well (pretty annoying)
    i even have group messages shut off on the phone and i still get them as a group instead of just from the message originator

  • How do I stop getting copied on all emails I send?

    How do I stop getting copied on all emails I send?  Help

    Go back into your email settings and make sure you don't have bcc turn on.

  • How do i stop getting the page about syncing, it opens a window everytime for this action

    how do i stop getting the page about syncing, it opens a window everytime I start firefox

    It sounds like it's loading as (part of) your homepage. Have a look in Tools | Options | General.
    See [[How to set the home page]] for more info.

  • How do I stop getting so much junk mail besides marking it as junk?

    I keep receiving a bunch of junk mail in the last week & haven't done anything out of the ordinary. Other than marking it as junk mail or changing my email, how do I stop getting so much junk delivered to my email?

    You can't, so mark it as Junk.

  • I use yahoo business mail, but I am getting hundreds of spam message on my Mac Air. I don't get them on my iPhone. Ive run a Malware app. Does anyone know how I can stop getting all this junk mail. Thanks

    How do i stop getting spam coming to my mailbox using Yahoo Business mail? I use Yahoo Biz Mail, but am now getting a huge amount of spam. I don't get any using the same address on my iPhone. I ran a Malware app - didn't help. Any ideas??

    Hello SkeeterOz,
    It sounds like you’re seeing spam emails in the Mail application on your MacBook Air, but you aren’t seeing those spam emails on your iPhone. The article linked below will walk you through enabling Junk Mail filtering in Mail and specifying what you want to do with the emails that are filtered.
    Mail (Mavericks): Change the junk mail filter
    I hope this helps.
    -Jason

  • HT1206 How do I stop getting updates for my husbands Itunes account?

    I no longer want to get updates for my husbands Itunes acounnt. How do  I stop getting his updates?

    Deauthorize All, then authorize the active computers.

Maybe you are looking for

  • Does anyone know how to change the settings for siri as all he keeps saying to me is he can only look up businesses in the u.s

    my siri seems to be a bit confused as he thinks im in america but im in northern ireland is ther anyone who knows how to change the settings as i cant find them alsao he doesnt understand a word im saying

  • Generate non interactive pdf

    Hi, I want to generate a pdf programmatically and display it to the user. I have a WDJ application. After submitting the data, I would like to give a display only view of the data (using pdf) the user has entered, so that he/she can save the pdf or t

  • Accounting period problem for doing PGI

    Hi Friends I am getting this error while doing PGI , I have entered Actual goods issue date in delivery header  manually . 15 .11.2008 . I am trying to do PGI on 7.12.2008 . u201C@5C\QError@     E     F5     286     900001     Period 008/2008 is not

  • Removing items from overhead menu bar.

    i recently downloaded intego security which is a one year subscription. when the subscription expired, it only said renew subscription. there was no option to uninstall. so i used cleanmymac, which that failed, followed by appcleaner, which managed t

  • Shipping lock error on CM1415fnw

    I'm getting a shipping lock error on a genuine HP cartridge. (The other cartridges are not HP, and was getting the same error on a similar color previously).  I read this post [HP Color LaserJet CP2025 remove shipping lock error] and I am not going t