Getting error (The input line is too long) after running the batch file .

  • Thread starter Thread starter incredible
  • Start date Start date
I

incredible

Hello All,

I have created a batch file ,where i am setting the env varriables
required for the Server to start.

If I start the server through console then the server is starting
properly.When i am trying to create a service of the Server so that it
can be started through the service as well,getting error as "The input
line is too long". When i am creating the service through the batch
file, i am passing the parameters as well.

Please help me if any one knows the workaround .

Thanks in advance.

Subu
 
incredible said:
Hello All,

I have created a batch file ,where i am setting the env varriables
required for the Server to start.

If I start the server through console then the server is starting
properly.When i am trying to create a service of the Server so that it
can be started through the service as well,getting error as "The input
line is too long". When i am creating the service through the batch
file, i am passing the parameters as well.

Please help me if any one knows the workaround .

Thanks in advance.

Subu

Answering your own posts?

Let's have a look at the batch file!
 
Sorry , as i mistakenly pressed Submit twice more.

The command which i am calling to create the service is :

%D_APPSERVER_DIR%\Service.exe -install TestAppServer %D_JRE_DLL%
%D_HOTSPOT_OPTIONS% %JAVA_OPTS% -Xms%D_APPSERVER_HEAPSIZE%m
-Xmx%D_APPSERVER_HEAPSIZE%m -Xnoclassgc -Djava.class.path=%D_CLASSPATH%
-start org.jboss.Main -method main -params %APP_ARGS% -stop
org.jboss.Main -method systemExit -err
%D_APPSERVER_DIR%\log\APPServer_err.log -current %D_APPSERVER_DIR%
-path %D_JDK_DIR%\bin;%D_APPSERVER_DIR%\bin -manual

Before calling , I am setting the below parameters .
%JAVA_OPTS% - this is a set of many parameters appended to it.
%APP_ARGS% - this is a set of many parameters appended to it.

One more thing i forgot to mention , this is running in Win XP
perfectly but in Win2k, it is showing the problem.

Regards
Subu
 
Win2000 has a limit of 2048 characters for the length of
a batch file line. Your batch file exceeds this limit, which
is quite incredible (same as your pen name . . .). Modify
your command so that it reads most of its parameters from
a configuration file (which is the standard way of doing such
things). The process will become much more maintainable!
 
Thanks for your explanation.

Can we create any property file and call it at the time of calling the
batch command.i.e. including in the Service Creation Command.

As it contains so many parameters which if we are going to modify now,
will be a big task.So is there any workaround available.

Sorry for troubling

Thanks
Subu
 
Thanks for your explanation.

Can we create any property file and call it at the time of calling the
batch command.i.e. including in the Service Creation Command.

As it contains so many parameters which if we are going to modify now,
will be a big task.So is there any workaround available.

A search of previous posts indicates that the file cmd.exe from Windows
XP can be copied to Windows 2000 to allow for longer command lines.
http://groups.google.com/group/micr...8+limit+command&rnum=2&hl=en#f7925bedc7ea70e9
I cannot say if that is safe or reliable. Simplifying your command as
already suggested is definitely a better
solution.
 
Back
Top