Set Java Classpath Cygwin

Set Java Classpath Cygwin

Setting Java classpath in Cygwin environment is little different than Linux classpath setting. Please have below example to set classpath in Cygwin:

Let’s say if you have below structure:

Set Java Classpath Cygwin


  • Config — Contains all configuration file
  • lib — Contains all dependencies jars

VM Parameters:

  • logging.dir=..\
  • Java class: com.javahonk.TestVM

Set as below:

java -Dlogging.dir=..\ -classpath ‘cygpath  -u ..\config;..\lib\*;’ com.javahonk.TestVM

For more information please visit Cygwin documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *