java - Unable to access jarfile under cygwin -


i know there many "unable access jarfile" questions on here, feel different enough warrant own thread.

i writing walkthrough, part of walkthrough involves installing cygwin , running .jar file.

the problem .jar file needs called multiple directories, , rather have readers have enter full path .jar every time need run it, them have enter .jar file command after having made simple configuration cygwin.

i have tried adding path ~/.bashrc , have tried adding classpath, have had no success.

every time invoke java -jar file.jar error: unable access jarfile file.jar

what should resolve this?

[edit]

i have spoken bro-in-law, knows bit linux, , has suggested create wrapper execute jar, have had quick search, can't find simple.

any suggestions?

cygwin provides way convert between unix (posix)-style paths , windows (ms-dos)-style paths, it's called "cygpath".

try:

java -jar `cygpath -w ./foo/bar/file.jar command file.1 file.2` 

note: backticks surrounding cygpath invocation.

using cygpath eliminates need write own bash script pass things to, , jar file can located anywhere on computer.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -