how to release memory after java programme execution
I have scheduled a jar file to run on system start up which is using mysql.
it use to push thousands of records from one DB to another, during each execution it occupies lots of cpu memory but once it get finished (execution completed successfully), it never release the occupied cpu memory until system restart.
and this jar is scheduled to run in every 4hours. How c开发者_开发问答an i release this occupied memory?
-- Thanks, Manu
Thanks for your interest :)
Have the Java process exit when it is done with the job; use another scheduler (like cron) to start the Java process again in four hours.
You've gotten memory leak in your program.
Check this question for solving it.
精彩评论