How to write or read any files saved on scratch from OOD

There is OUT OF MEMORY error msg
or
the application freezes on OOD

The out of memory issue should be solvable on the user end by adding a Java environment variable.
It’s either _JAVA_OPTIONS or JAVA_OPTS where you can add the memory run options. They work slightly different from each other, but I believe either will work for this issue.

ex.
export _JAVA_OPTIONS="-Xmx4g"

Hi Sasmita,
It is not clear when do you get the OOM error message. Could you describe what steps/commands you executed before you received the error message. The OnDemand environment in each institution is different, so to make your question (and the following answer) helpful to the community, it would be very useful if you be more descriptive and specific about the steps that led to the error, provide the exact error message and in the solution you posted, please be more specific where one needs to execute the commands you posted or in which file and in which directory they need to save those commands. Thank you.