OpenBSD, Java and /etc/login.conf
After a long absence from OpenBSD I decided to give 5.4 a try. I installed Java and JRuby.
Whenever I was logged in as a regular user and ran this command:
jruby -J-Xms1024m -J-Xmx1024m -J-Xmn256m -S bundle exec rake -T
I would get this error:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
After many hours trying various things I came across a post that mentioned changing the file /etc/login.conf to increase the default limits in place.
As root I changed the line:
staff:\
:datasize-cur=512M:\
...
To:
staff:\
:datasize-cur=2048M:\
...
I logged out and logged back in as my regular account and it worked as expected.
Written by Leo Venegas
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Java
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#