How to set a long Java classpath in Windows?

后端 未结 12 1086
清酒与你
清酒与你 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:05

    If I were in your shoes, I would download the junction utility from MS : http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx and then map your "C:\path" to say, "z:\" and "c:\path2" to say, "y:\". This way, you will be reducing 4 characters per item in your classpath.

    set CLASS_PATH=C:\path\a\b\c;C:\path\e\f\g;
    set CLASS_PATH=%CLASS_PATH%;C:\path2\a\b\c;C:\path2\e\f\g;
    

    Now, your classpath will be :

    set CLASS_PATH=z\a\b\c;z\e\f\g;
    set CLASS_PATH=%CLASS_PATH%;y:\a\b\c;y:\e\f\g;
    

    It might do more depending on your actual classpath.

提交回复
热议问题