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

  • Home
  • SEARCH
  • 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 8666141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:39:17+00:00 2026-06-12T17:39:17+00:00

I have installed openjdk-6-jdk on my machine linux , the function renameTo does not

  • 0

I have installed openjdk-6-jdk on my machine linux , the function renameTo does not work ?
have you an idea please about this problem ?

Thank you.

  • 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-12T17:39:18+00:00Added an answer on June 12, 2026 at 5:39 pm

    At run time the program does not rename the file (it does not moving the file).. i have an error when the programm will use the file in the new destination (when i insert command linux mv in my code java it works !!!)

    Based on those symptoms, I’d say that you are attempting to rename a file from one file system to another.

    The "mv" command can do this, but the File.renameTo(...) cannot. (And incidentally, neither can the "rename" system call.) This is not an OpenJDK bug. Rather it is a documented limitation. The javadoc says this:

    "Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful.

    Note that the Files class defines the move method to move or rename a file in a platform independent manner."


    The fact that it works on some other machine may simply be down to the fact that the source and destination for the move are in the same file system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed a C# windows forms app on a client machine which does
I have installed msysGit 1.7.10 on my Windows 7 machine. What I need to
I have installed xampp on Windows7(64bit).I want to work with PHP, Apache and MySql.
I've set up Eclipse in Ubuntu 10.04. I currently have the OpenJDK JRE installed
I'm running IntelliJ Idea under linux. I have created a project and a module
I have installed bootstrap to my Rails 3.2 app this way (through Gemfile): gem
by default ubuntu comes with openjdk. I installed jdk from sun, and removed openjdk,
I'm having a pretty hard time with this! I have installed the java documentation
I have installed java-1.6.0-openjdk-devel. $java -version java version 1.6.0_24 OpenJDK Runtime Environment (IcedTea6 1.11.3)
So, I have rvm installed on my machine, and I type: rvm install jruby

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.