java specifying jar file while running program from command line

Solution:

Spent one whole day to figure out semicolon(;) in windows is equivalent to specifying colon(:) on unix platform.

If all of the jars are placed into a folder called ‘jars’ in the current directory.

on Windows –> java -cp .;jars/* AbsoluteClassname arguments

Unix –> java -cp .:jars/* AbsoluteClassname arguments

 

Problem:

Exception in thread “main” java.lang.NoClassDefFoundError:

Advertisements