Redirect core dump file

This seems like a fairly simple problem, but I cannot seem to find it in any searches...How can I set the core (or heap) dump directory to "/usr/scratch" instead of the current directory. I running 1.4.2 for now. Thanks for any help!
[254 byte] By [DrJ22a] at [2007-10-3 2:53:27]
# 1

Hi, Im not familiar with heap dumps so i apologize if this isnt helpful...

http://blogs.sun.com/roller/page/alanb?entry=heap_dumps_are_back_with

If you don't want big dump files in the application working directory then the HeapDumpPath option can be used to specify an alternative location - for example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated in the /disk2/dumps directory.

https://hat.dev.java.net/doc/README.html

For example, to run the program Main and generate a binary heap profile in the file dump.hprof, use the following command:

java -Xrunhprof:file=dump.hprof,format=b Main

also:

http://www.hp.com/products1/unix/java/infolibrary/prog_guide/hotspot.html

-XX:+HeapDumpOnOutOfMemory

The HeapDumpOnOutOfMemory command line option causes the JVM to dump a snapshot of the Java heap when an Out Of Memory error condition has been reached. The heap dump format generated by HeapDumpOnOutOfMemory is in hprof binary format, and is written to filename java_pid<pid>_<.hprof in the current working directory. The option -XX:HeapDumpPath=<file>_< can be used to specify the dump filename or the directory where the dump file is created. Running with application with -XX:+HeapDumpOnOutOfMemoryError does not impact performance. Please note the following known issue: The HeapDumpOnOutOfMemory option does not work with the low-pause collector (-XX:+UseConcMarkSweepGC). This option is available starting with the 1.4.2.11 and 1.5.0.04 releases.

TuringPesta at 2007-7-14 20:42:28 > top of Java-index,Java Essentials,Java Programming...