1

I am developing a java application which gathers some data, processes it and serialize them every 30 minutes into a file which makes it a time sensitive in that way. During the test mode, this writing-to-file feature is disabled.

I started the application by mistake in test mode and it is running since last few hours collecting data in memory but data isn't written into file as application is running in test mode. Though it would keep collecting data until it writes it into a file, which would never happen.

Is there a way to change the execution mode from "run" to "debug" or pause it and run some operations on in-memory data such as run a method manually that write them in a file?

1
  • try using flush() after you write some bytes. Commented Jan 18, 2016 at 16:53

1 Answer 1

4

Sorry to say, but no. When you run in debug mode, the JVM is started in such a way that a debugger can interact with the running classes. An already running JVM would not allow those collaborations post-startup, partially by inadvertent design and partially as a security measure.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.