vikbehal
vikbehal

Reputation: 1524

Running a jar file from cygwin is throwing error where from commad prompt it is running, why? (in windows)

this is the command.

java -cp clojure.jar;sum.jar CalculateSum

sum.jar is a jar file made from clojure and java code. CalculateSum is file which contains main method of java.

error from cygwin

can't execute binary file, Error 126

Upvotes: 0

Views: 1973

Answers (3)

vikbehal
vikbehal

Reputation: 1524

java -cp "clojure.jar;sum.jar" CalculateSum this is working

Upvotes: 0

yoprogramo
yoprogramo

Reputation: 1306

Try:

java -cp clojure.jar:sum.jar:. CalculateSum

If you execute in the place you have the root of packages for CalculateSum.class

Upvotes: 1

skuro
skuro

Reputation: 13514

Cygwin provides you with a *nix environment within Windows, so that you might have to change the classpath separator to colons:

java -cp clojure.jar:sum.jar CalculateSum

Upvotes: 2

Related Questions