wood burning stoves 2.0*
The moose likes Servlets and the fly likes out of environment space.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "out of environment space.." Watch "out of environment space.." New topic
Author

out of environment space..

Hemanth Gopalakrishna
Greenhorn

Joined: Oct 09, 2002
Posts: 4
Hi,
I recently downloaded JSWDK1.0.1 from sun's site. I don't know for some reason I get this out of environment space error.
I looked in troubleshooting and found the following instructions.
Out of Environment Space error message
On Windows 95/98 systems, you may see an Out of Environment Space error message when starting the server. This happens if Windows provides too small a space for environment variables. To
work around this limitation:
1.Close the DOS window (the error can corrupt its CLASSPATH variable).
2.Open a new DOS window.
3.Click on the MS-DOS icon at the top left of the window.
4.Select the Properties option.
5.Click on the Memory tab.
6.Adjust the Initial Environment drop-down box from Auto to 2816.
7.Click OK.
8.Start the server.

I did all of the above but no use.
Could some one throw some light on this.
Thank you
Hemanth
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12784
    
    5
If you are still getting that out of environment space error, just jack that parameter up some more. It doesn't hurt to have more than you need, mine is set at 3072.
While you are in that dialog, I suggest you increase the "initial size" setting on the "Screen" tab.
I'm curious, what is the date on the files for that JSDK? Supposedly Sun turned all that development work over to the Apache organization for bringing it up to Servlet 2.2 and JSP 1.1 standards.
Hemanth Gopalakrishna
Greenhorn

Joined: Oct 09, 2002
Posts: 4
Thanks for the reply Mr.William, But it didn't work either.
I'm not sure about the dates you are asking, If it's the modified date then it is 09/09/1999
thanks once again.
Hemanth
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12784
    
    5
If you want to work with the latest and best supported servlet and JavaServer Page engine you should be using the TomCat server - see jakarta.apache.org
Sun turned over development of the "reference" servlet engine to the Apache organization, so the JSWDK from Sun's site is sort of a dead end.
The only cause for an out of environment space error is that the MSDOS console runs out of environment while trying to run the servlet engine. Perhaps there is another error message somewhere that will tell us more.
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hemanth,
I am just shooting in the dark. I am curious about the size of your conventional memory, is it 32/64/128MB? My friend had a similr problem on Win98 with 32 MB ram but when he upgraded to 64 MB and the DOS environ space was set to 3072, the problem disappeared.
However as Mr. William has recomemnded, it is better to go in for TOMCAT. Though U may face some hiccups with the initial setup, it is fun after that.
HTH
Ajay Kumar


Regds<BR>Ajay Kumar
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have the same problem and any solution so far..
bye
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hi Hemanth and newtoservlets,
Could U just cut and paste the startservet.bat file found in the root directory of the JSWDK? I remember changinh something on my friends PC but not exactly sure. If U could do the above I may be able to help. Remember in the bat file it says something liKe the bat file is optimised and tested on the WIN NT system and I see that U are using Win95/98.
Anyway see if the above is possible and I amy be able to help.
Shoot me an email otherwise, I will try to reply asap (by tomorrow evening at the latest).
Bye for now
Ajay Kumar
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

I hope i am sending u the required file info. If this is not correct just tell me precisely from where I should paste ths code
Thanx for ur interest in our problem
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
newtoservlets,
I think U are using UNIX system (at least UR startserver.bat looks like it). I am extemely sorry to say that i do not know much about it. Since hemanth mentioned that he was using Win95/98 I thought U were also on the same environ. Someone else may be help U out.
Thanks
Ajay Kumar
Hemanth Gopalakrishna
Greenhorn

Joined: Oct 09, 2002
Posts: 4
Hi Ajay,
Thanks for your reply and I'm sorry for not responding Cos I was away. here is startserver.bat

#! /bin/sh
#
# $Id: startup.sh,v 1.2.2.1 1999/09/09 01:45:27 gonzo Exp $
# Shell script to startup the server
# This script is known to work with the standard Korn Shell under
# Solaris and the MKS Korn shell under Windows.
# There are other, simpler commands to startup the runner. The two
# commented commands good replacements. The first works well with
# Java Platform 1.1 based runtimes. The second works well with
# Java2 Platform based runtimes.
#jre -cp runner.jar:servlet.jar:classes com.sun.web.shell.Startup $*
#java -cp runner.jar:servlet.jar:classes com.sun.web.shell.Startup $*
baseDir=`dirname $0`
jsdkJars=${baseDir}/webserver.jar:${baseDir}/lib/jakarta.jar:${baseDir}/lib/servlet.jar
jspJars=${baseDir}/lib/jsp.jar:${baseDir}/lib/jspengine.jar
beanJars=${baseDir}/examples/WEB-INF/jsp/beans:${baseDir}/webpages/WEB-INF/jsp/beans:${baseDir}/webpages/WEB-INF/servlets
miscJars=${baseDir}/lib/xml.jar
appJars=${jsdkJars}:${jspJars}:${beanJars}:${miscJars}
sysJars=${JAVA_HOME}/lib/tools.jar
appClassPath=${appJars}
cp=$CLASSPATH
# Backdoor classpath setting for development purposes when all classes
# are compiled into a /classes dir and are not yet jarred.
if [ -d ${baseDir}/classes ]; then
appClassPath=${baseDir}/classes:${appClassPath}
fi
CLASSPATH=${appClassPath}:${sysJars}
export CLASSPATH
if [ "$cp" != "" ]; then
CLASSPATH=${CLASSPATH}:${cp}
export CLASSPATH
fi
echo Using classpath: ${CLASSPATH}
# We start the server up in the background for a couple of reasons:
# 1) It frees up your command window
# 2) You should use `stopserver` instead of ^C to bring down the server
java com.sun.web.shell.Startup $* &
if [ "$cp" != "" ]; then
CLASSPATH=${cp}
export CLASSPATH
else
unset CLASSPATH
fi
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hemanth,
If U say U are using W95/98 U are certainly on the wrong track. The file U just cut and paste was for the UNIX version.

@echo off
rem $Id: startup.bat,v 1.19.2.5 1999/08/31 19:38:43 gonzo Exp $
rem Startup batch file for servlet runner.
rem This batch file written and tested under Windows NT
rem Improvements to this file are welcome
set jsdkJars=.\webserver.jar;.\lib\jakarta.jar;.\lib\servlet.jar
set jspJars=.\lib\jsp.jar;.\lib\jspengine.jar
set beanJars=.\examples\WEB-INF\jsp\beans;.\webpages\WEB-INF\servlets;.\webpages\WEB-INF\jsp\beans
set miscJars=.\lib\xml.jar;.\lib\moo.jar
set appJars=%jsdkJars%;%jspJars%;%beanJars%;%miscJars%
set sysJars=%JAVA_HOME%\lib\tools.jar
set appClassPath=.\classes;%appJars%
set cp=%CLASSPATH%
set CLASSPATH=%appClassPath%;%sysJars%
if "%cp%" == "" goto next
rem else
set CLASSPATH=%CLASSPATH%;%cp%

:next
echo Using classpath: %CLASSPATH%
rem pause
rem start java com.sun.web.shell.Startup %1 %2 %3 %4 %5 %6 %7 %8 %9
java com.sun.web.shell.Startup %1 %2 %3 %4 %5 %6 %7 %8 %9
rem pause
rem clean up
set CLASSPATH=%cp%
set port=
set host=
set test=
set jsdkJars=
set jspJars=
set beanJars=
set miscJars=
set appJars=
set appClassPath=
set cp=
rem pause

This is how my friend's startserver.bat looks like after modification. He just emailed it to me. U may have downloaded the wrong version. Please Check and let me know.
Bye
Ajay Kumar
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Guys any progress. U suddenly seem silent after a lot of activity in the night.
Let me know if U still have problems.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have installed in win95/98 version only , I don't know why u feel it is for unix platform.
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Originally posted by newtoservlets:
I have installed in win95/98 version only , I don't know why u feel it is for unix platform.


Take a look at the bat file. I do not think WINDOWS recognizes the $ sign in its bat file. It however recognizes the % sign for the classpath.
Maybe someone else in this group can help.
Thanks
Ajay Kumar
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12784
    
    5
The Tomcat distribution contains both Windows style BAT files and UNIX .SH shell scripts. Several of the messages in this thread have some reason quoted the shell scripts, not the bat files.
For easiest debugging, modify the startup.bat by commenting out the @echo off in the first line. You will then get a flood of messages which hopefully will suggest whats wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: out of environment space..