I'm trying to set the javac
heap size for it's java vm permanently. I have set my JAVA_OPTS
to -Xmx64m
which works great when I call java
but not javac
. I still get heap size issues. Is there a different variable I can set in my .bashrc to change is permanently?
When I run javac -J-Xmx64m
it works great. So I just need a way to make that -J-Xmx64m
option permanent.
FYI - I'm running Ubuntu 11.10 with OpenJDK 1.7
Very pragmatic solution (assuming you use bash):
# find out where javac lives, and note the path
$ which javac
/path/to/javac
$ vi ~/.bash_aliases
alias javac='/path/to/javac -J-Xmx64m'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With