Compile w/ multiple classpaths from file listing

Hi,

I have about 70 jar files I would like to place in my classpath. Howver, I want to read them dynamically whttp://forum.java.sun.com/post!default.jspa?forumID=54#

Click for code tagshen I compile.

I am running this on a Window XP machine.

I have the following DOS command line script to compile.

REM <!>Get list of all jar files

dir /s /b jars\*.jar > jarList.txt

javac -classpath @jarList.txt SampleMap.java

However, upon hitting the second jar file in the list, it gives the following error message.

C:\temp\work\gt2-2.2.1-bin>compile

C:\temp\work\gt2-2.2.1-bin>REM <!>Get list of all jar files

C:\temp\work\gt2-2.2.1-bin>dir /s /b jars\*.jar 1>jarList.txt

C:\temp\work\gt2-2.2.1-bin>javac -classpath @jarList.txt SampleMap.java

javac: invalid flag: C:\temp\work\gt2-2.2.1-bin\jars\batik-bridge-1.6.jar

Usage: javac <options> <source files>

where possible options include:

-g Generate all debugging info

-g:noneGenerate no debugging info

-g:{lines,vars,source}Generate only some debugging info

-nowarnGenerate no warnings

-verboseOutput messages about what the compiler is doing

-deprecationOutput source locations where deprecated APIs are u

sed

-classpath <path> Specify where to find userclass files

-cp <path>Specify where to find userclass files

-sourcepath <path> Specify where to find input source files

-bootclasspath <path>Override location of bootstrapclass files

-extdirs <dirs>Override location of installed extensions

-endorseddirs <dirs>Override location of endorsed standards path

-d <directory> Specify where to place generatedclass files

-encoding <encoding>Specify character encoding used by source files

-source <release> Provide source compatibility with specified release

-target <release> Generateclass filesfor specific VM version

-versionVersion information

-help Print a synopsis of standard options

-X Print a synopsis of nonstandard options

-J<flag>Pass <flag> directly to the runtime system

C:\temp\work\gt2-2.2.1-bin>

I have made use of the @file.txt option before. When I use this in the for comiling several files, it works fine. The following DOS command line code to compiles java files in the @file.txt files.

REM <!>Compile all java files into classes directory

javac -classpath"..\final\jcchart.jar" @graphModel.txt @graphControl.txt @graphView.txt @xiong.txt -d ..\classes

How do I use the @files.txt option to compile with several jar files in the classpath?

[3090 byte] By [VanJay011379a] at [2007-10-3 9:27:42]
# 1
It may work if a semicolon is placed between entries in the jarList.txt file during the file's creation.
ChuckBinga at 2007-7-15 4:42:00 > top of Java-index,Java Essentials,New To Java...