This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: path separator


samitj wrote:

what is the path separator in Cygwin for paths, classpaths etc..

this works...
$ java -cp lib/matrix/matrix.jar
com.test.matrix.simulation.SimulationApplication

this fails..
$ java -cp lib/matrix/matrix.jar:bin/
com.test.matrix.simulation.SimulationApplication
Exception in thread "main" java.lang.NoClassDefFoundError:
com/test/matrix/simulation/SimulationApplication


Can you please advise on this?

java is not a Cygwin program, it's a Windows program so it uses Windows notation (or their own if they choose to change it).


In Windows the classpath separator is ';'

$ java -h
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
*------------->   A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
...
--
René Berber


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]