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

Folders:

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

VM Parameters:

  • app.name=JavaHonk
  • logging.dir=..\
  • environment.target=DEV
  • Java class: com.javahonk.TestVM

Set as below:

java -Dlogging.dir=..\ -Dapp.name=JavaHonk -Denvironment.target=DEV -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 *