Subject: Re: Need to run a .jar file
To: None <netbsd-users@NetBSD.org>
From: None <sigsegv@rambler.ru>
List: netbsd-users
Date: 07/28/2004 06:54:29
Steven M. Bellovin wrote:

>In message <20040727182312.A0B0C1AE6F@berkshire.research.att.com>, "Steven M. B
>ellovin" writes:
>
>  
>
>>>I just removed it and installed lang/sun-jdk14. Now the -jar option is 
>>>there, but now whenever I try to run it (for anything other than just doing 
>>>"java -?"), I get the following error:
>>>
>>>  Java HotSpot(TM) Client VM warning: Can't detect initial thread stack 
>>>location
>>>  Error occurred during initialization of VM
>>>  Could not reserve enough space for object heap
>>>
>>>I'm running a more-or-less GENERIC -current kernel built from sources about 
>>>10 days ago (userland is the July 15 -current snapshot from 
>>>releng.netbsd.org). This is running in a VMWare client VM with 256MB of 
>>>memory allocated to it. Is there some option I need to put in my kernel 
>>>config? A missing library? 
>>>
>>>      
>>>
>>'ulimit -d 262144' will get rid of the "Could not reserve enough space" 
>>problem.  The message about the thread stack is a warning; I don't know 
>>how to make it go away, but it doesn't seem to hurt, at least in the 
>>few cases I've tried lately.
>>
>>    
>>
>
>Thinking more about the thread stack message, I realized that I hadn't 
>tried any threaded programs...  I did google for the phrase, and found 
>this note:
>
>http://www.mail-archive.com/freebsd-questions@freebsd.org/msg60015.html
>
>I have /proc mounted; here's my fstab entry:
>
>	procfs          /proc   procfs  rw,linux
>
>but I'm still seeing the message.  Any suggestions?
>
>		--Steve Bellovin, http://www.research.att.com/~smb
>
>
>
>  
>
This is what I have in my fstab:

procfs /emul/linux/proc procfs rw,linux

where /emul/linux is a symlink to /usr/pkg/emul/linux

And this is my ~/.profile:

ulimit -d 262144
export JAVA_HOME=/usr/pkg/java/sun-1.4
PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin
PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:$JAVA_HOME/bin

Also I had to install the following packages to get java working:

suse_base-7.3nb5    Linux compatibility package
suse_compat-7.3     Linux compatibility package with old shared libraries
suse_x11-7.3nb2     Linux compatibility package for X11 binaries
sun-jre14-2.5       Sun's Java(tm) 2 Runtime Environment 1.4.2
sun-jdk14-2.5       Sun's Java(tm) 2 SDK, Standard Edition 1.4.2