How to set a long Java classpath in Windows?

后端 未结 12 1129
清酒与你
清酒与你 2020-11-27 15:18

I\'m trying to run a particular JUnit test by hand on a Windows XP command line, which has an unusually high number of elements in the class path. I\'ve tried several varia

12条回答
  •  长情又很酷
    2020-11-27 16:04

    (I suppose you do not really mean DOS, but refer to cmd.exe.)

    I think it is less a CLASSPATH limitation than an environment size/environment variable size limit. On XP, individual environment variables can be 8k in size, the entire environment is limited to 64k. I can't see you would hit that limit.

    There is a limit on windows that restricts the length of a command line, on WindowsNT+ it is 8k for cmd.exe. A set command is subject to that restriction. Can it be you have more than 8k worth of directories in your set command? You may be out of luck, then - even if you split them up like Nick Berardi suggested.

提交回复
热议问题