Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8713125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:15:59+00:00 2026-06-13T05:15:59+00:00

So, here is the code that I have: try { PlayerSave save = new

  • 0

So, here is the code that I have:

try  
{  
  PlayerSave save = new PlayerSave(this);   
  save.playerLooks = look;        
  File test = new File("C:/cache/" + playerName + ".tmp");  
  test.createNewFile();  
  FileOutputStream f_out = new  
      FileOutputStream("C:/cache/" + playerName + ".tmp");  
  ObjectOutputStream obj_out = new ObjectOutputStream (f_out);  
  obj_out.writeObject (save);  
  obj_out.close();  
  f_out.close();  
}  
catch (Exception e)  
{  
  e.printStackTrace();  
} 

Upon execution, I get the following error:

java.io.FileNotFoundException: C:\cache\Bobdole.tmp (The system cannot find the path specified)

I have also tried using this code:

    try
    {
      PlayerSave save = new PlayerSave(this); 
      save.playerLooks = look;      
//      File test = new File("C:/cache/" + playerName + ".tmp");
//      test.createNewFile();
      FileOutputStream f_out = new
          FileOutputStream("C:/cache/" + playerName + ".tmp");
      ObjectOutputStream obj_out = new ObjectOutputStream (f_out);
      obj_out.writeObject (save);
      obj_out.close();
      f_out.close();
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }

However, it produces the same error. I am confused as to why this is not working, as everything seems to be right. If you guys can figure out the problem that would be so helpful.
Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:16:01+00:00Added an answer on June 13, 2026 at 5:16 am

    That’s telling you that the directory C:\cache does not exist. The directory must exist in order for you to be able to write files to it. You can either create it manually, or with something like:

    File directory = new File("C:\\cache");
    directory.mkdir();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no idea what this means. But here is the code that it
Basic question here - I have many lines of code that look something like:
Here is the code that I have for my cell of my UITableView: forKeys:[NSArray
Here's the c# code that I have: private double get806Fees (Loan loan) { Loan.Fee.Items
enter code here I have a ListView that have a different Layout XML for
Here is the piece of code that I have used for Java 5.0 TreeSet<Integer>
I have some code here that uses bitsets to store many 1 bit values
I have the following code here that won't run on ARC since it combines
I have a piece of code here that does not work despite me using
Here's the code for a simple page I have that is not working: <head>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.