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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s