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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:22:29+00:00 2026-06-17T08:22:29+00:00

Java: 1.6 OS: Win XP I have been having an issue with a scheduled

  • 0

Java: 1.6
OS: Win XP

I have been having an issue with a scheduled task i made that kicks off a java program i created. The issue is that the program uses large chucks of data which is causing the program to seize up mid way.

I went ahead and split the program up into different sections so they do not have to run all at once but Im unsure how to build my .cmd file for the scheduled task. I need it to run each piece and after each piece, kill java / run garbage collection and then run the next task.

Original piece:

java -jar CommandLine.jar -f p d pr d dr d e d qp d ea d pa d pb d as d ndp d g d sc d 2> ErrorLog\cmdErrorLog.txt

Each piece is represented by p d, or pr d.

So would something like this actually stop java? (testing is hard cause im running on live data sets that get effected when ran):

java -jar CommandLine.jar -f pr d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f dr d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f e d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f qp d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f ea d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f pa d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f pb d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f as d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f ndp d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f g d 2> ErrorLog\cmdErrorLog.txt
java -jar CommandLine.jar -f sc d 2> ErrorLog\cmdErrorLog.txt

Or is there a better way to kill java between each piece? I really just need the memory cleared and java restarted.

Also Note that I have given Java as much memory as i can on the box it is running off of.

Any help would be insight or help would be greatful.

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-17T08:22:30+00:00Added an answer on June 17, 2026 at 8:22 am

    Each execution of Java represents a new and self-contained JVM. So executing multiple times will obviously work to completely relinquish all memory before the next instance is started.

    If you can easily modify the CommandLine program though, then a more efficient approach would be to use Main method to split the work up within the same process. It could basically do exactly what you are doing with the multiple JVM executions, but without having to stop/start new a JVM each time. That does mean that the program would need to be written correctly to relinquish all resources on each iteration though so that the garabage collector could do its job.

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

Sidebar

Related Questions

I have made a Java application with Java 1.7 my problem is that it
I have a java webapp that has to be deployed on either Win or
I am having a ghost problem. I have included Java in my install package
I have a simple jsp form that the customer uses to send us emails.
I'm trying to create a Java program that flips two coins to see who
I have installed Java x64, Eclipse Classic Juno x64 + ADT Pluggin. OS win
I have a java program which collects realtime sensor data from a COM port
I have a java app that gets commands from a webpanel, and when it
on WIN XP SP3 and Netbeans 6.7.1 IDE, I have installed Java SDK 6.17
I have a webpage that is encoded (through its header) as WIN-1255 . A

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.