0

Can anybody guide me how to run a maven project jar along with sqljdbc jar in the classpath from the command prompt??

Im currently running the following command from command prompt :

java -cp streaming-etl-0.1.2-SNAPSHOT.jar:sqljdbc4.jar zDaly.pubsub.app.Application

I have main jar and sqljdbc4.jar in the same directory.

Running the above command is returning the below error :

Error: Could not find or load main class zDaly.pubsub.app.Application

zDaly.pubsub.app.Application is actually present in the main jar.

Running the same command without sqljdbc in classpath will actually run the jar successfully.

Below is the command which runs successfully:

java jar streaming-etl-0.1.2-SNAPSHOT.jar zDaly.pubsub.app.Application

Please someone help me out to run jar with sqljdbc jar. I also tried setting the sqljdbc path in CLASSPATH variable but no luck yet.

Girish kumar
  • 735
  • 6
  • 8

0 Answers0