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 6723529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:34:48+00:00 2026-05-26T09:34:48+00:00

Java function moveFile uses the native move command to move the output report file

  • 0

Java function moveFile uses the native move command to move the output report file to ready directory. It was working well earlier but now it started throwing the below disk space exception now. But when i check the diskspace there is a lot of sace available in the directories and i did a clean up also. I tried to rerun it but still i am getting the below error. Not sure what is the issue.

java.io.IOException: Cannot run program "mv": error=12, Not enough space
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
        at java.lang.Runtime.exec(Runtime.java:593)
        at java.lang.Runtime.exec(Runtime.java:431)
        at java.lang.Runtime.exec(Runtime.java:328)
        at powertel.usageExtract.ctfCompactExtract.moveFile(ctfCompactExtract.java:507)
        at powertel.usageExtract.ctfCompactExtract.run(ctfCompactExtract.java:1189)
Caused by: java.io.IOException: error=12, Not enough space
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
        at java.lang.ProcessImpl.start(ProcessImpl.java:65)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)

private int moveFile(int moveto) {

String runCmd = “”;
Process p = null;
int extVal = 0;

if (moveto == 1) {
    runCmd = "mv "+ outfile + " " + localbaseDir+"/ctf/ready/";
}
else {
    runCmd = "mv "+ outfile + " " + localbaseDir+"/ctf/error/";
}

try {
    Runtime r = Runtime.getRuntime();
    p = r.exec(runCmd);
    p.waitFor();
    extVal = p.exitValue();
    log.debug("Process exit value: " + extVal);
}
catch (IOException e) {
    extVal = 1;
    log.error("IO Exception - "+ e.getMessage());
    e.printStackTrace();
}
catch (InterruptedException e1) {
    extVal = 1;
    log.error("Interrupted Exception - "+e1.getMessage());
}

return extVal;

}

  • 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-05-26T09:34:49+00:00Added an answer on May 26, 2026 at 9:34 am

    The ‘not enough space’ error isn’t referring to disk space, it’s referring to memory when trying to fork to execute a process.

    When forking, temporarily your Java process’s memory is copied, and there needs to be enough swap space on the system to hold both the parent and child process (which for a certain time has the same memory usage as your parent process) for a short amount of time. If you are spawning lots of processes quickly, you might need even more memory.

    This can be a major issue when your Java process is very large, such as an appserver.

    The issue is well described here:

    https://wiki.jenkins-ci.org/display/JENKINS/IOException+Not+enough+space

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

Sidebar

Related Questions

I'm working on a Java function that should be called infinitely . This function
I saw a java function that looked something like this- public static<T> foo() {...}
Is there any Java function or util class which does rounding this way: func(3/2)
How do I return a vector in a java function. I want to unserialize
I need a java script function that converts the document object of the current
I have a java script function that i have called on body load mousemove()
I have a problem using the Java search function in Eclipse on a particular
When overriding the equals() function of java.lang.Object, the javadocs suggest that, it is generally
I have a calc function in java script that takes three integer parameters, following
I need this for calling a C function from Java class (JNI) and I

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.