JDK-4473108 : the java command cannot be assigned too large a classpath
  • Type: Enhancement
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 1.3.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2001-06-22
  • Updated: 2001-06-22
  • Resolved: 2001-06-22
Related Reports
Duplicate :  
Description

Name: bsC130419			Date: 06/21/2001


java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

You recommend that the classpath be specified using the -classpath option for
the various tools (e.g. the javac and java commands).

I highly agree.

But on my win2000 system, the shell window (or command interpreter, if run from
a bat file) has a short line length limit.

So how do I specify a fairly long classpath using the -classpath option?

The javac and javadoc commands face a similar problem with specifying long lists
of source files and package lists.  There you guys provided a nice solution,
which is to supply an argument of the form "@sourcefiles" or "@packagelist".

The -classpath option needs a similar @file capability!!!

Actually, i guessed and experimented and found that the javac command DOES
support this capability -- the following syntax actually works:
    javac -classpath @classpathlist.txt ...

But the java command does NOT seem to work with that syntax at all, but I really
need it to.

I consider the lack of such support to be a bug.

Your standard tool documentation
    <JAVA_HOME>/docs/tooldocs/win32/classpath.html
does not describe this situation well at all.  At the very least, it should
mention the @file support for the javac command, and should also describe how to
handle large classpath cases.

Please get back to me ASAP.
(Review ID: 126648) 
======================================================================

Comments
WORK AROUND Name: bsC130419 Date: 06/21/2001 Use the classpath environment variable ======================================================================
11-06-2004

EVALUATION The @file syntax needs to be supported for all tools. The only problem is, how would a user pass an argument to their own main program that starts with an "@"? I suggest only @names appearing before the name of the user's main program be expanded. neal.gafter@Eng 2001-06-22
22-06-2001