conscript icon indicating copy to clipboard operation
conscript copied to clipboard

Error: Unable to access jarfile ~/.conscript/sbt-launch.jar

Open GratefulTony opened this issue 11 years ago • 15 comments

The file is present at the specified location, but anny attempt to run cs results in this error...

$ ./cs
Error: Unable to access jarfile ~/.conscript/sbt-launch.jar

This is in cygwin on Win7

what could be the problem here? I am attempting to install giter8.

GratefulTony avatar Apr 08 '13 18:04 GratefulTony

It seems like Java cannot understand Cygwin paths. I am struggling with the same task and managed to bypass this problem using

set CONSCRIPT_HOME=C:/cygwin/home/YourUserName/.conscript
java -jar %CONSCRIPT_HOME%/sbt-launch.jar @file:/%CONSCRIPT_HOME%/n8han/conscript/cs/launchconfig n8han/giter8

from the Windows CLI. Also note the file:/ after @: I got "Error during sbt execution: Could not find configuration file" without it. Mind that I am not done with this yet, as I am still figuring out what I must put into launchconfig for everything to work smoothly.

stepan-sadovnykov avatar May 06 '13 09:05 stepan-sadovnykov

+1 even without cygwin cs.bat throws this error because the installed jar filename includes the version number: sbt-launch-0.11.3.jar

However, copying this to sbt-launch.jar doesn't help because the file is empty:

Error: Invalid or corrupt jarfile C:\Users\MICHOW\.conscript\sbt-launch.jar

quantoid avatar May 30 '13 10:05 quantoid

Did anyone find solution ? we are facing the same issue

Amrutas avatar Jul 04 '13 11:07 Amrutas

@Amrutas I think you have several options:

  1. Don't use conscript with cygwin. Use cmd instead.
  2. Manage your conscript files (those in ~/bin and ~/.conscript) by hand using cygpath command to convert windows paths to posix ones (doesn't make much sense)
  3. Clone the repo and fix the bug (this is the best choice :) )

alun avatar Jul 04 '13 11:07 alun

Hello, I had the same problem on Mac OS. I added my own sbt-launch.jar to the ~/.conscript directory and it worked fine. I don't know what is the problem with the sbt-launch-0.12.2.jar in this directory.

benoitguigal avatar Sep 03 '13 20:09 benoitguigal

Same issue here. I had to replace .conscript/sbt-launch-0.13.jar.

hseeberger avatar Nov 15 '13 14:11 hseeberger

Using Cygwin 64bit. I had to replace the 'cs' file.

DEFAULT INSTALL: java -jar /home/<username>/.conscript/sbt-launch-0.13.7.jar @$HOME/.conscript/n8han/conscript/cs/launchconfig "$@"

COMMANDLINE: java -jar sbt-launch-0.13.7.jar @file:C:\\cygwin64/home/<username>/.conscript/n8han/conscript/cs/launchconfig "$@"

Slowly, considering @alun's advise...lol and I do mean slowly.


I should have mentioned that, because I was using cygwin 64bit, applying the change above installed conscript into my windows user location (C:\Users). In my windows user directory I see:

Created Directories
.conscript
bin
.sbt

It's a weird result, but I understand that cygwin conflicts with %HOMEPATH% when installing this tool.

dghant1024 avatar Apr 24 '15 04:04 dghant1024

in case you'll want to install gitter8, you'll probably need as well to change .conscript/n8han/conscript/cs/launchconfig

[boot]
  directory: C:/cygwin64/home/<username>/.conscript/boot

ysusuk avatar Jul 23 '15 09:07 ysusuk

@hseeberger What do you mean "replace" the jar? What did you replace it with?

edit: I figured it out, I have sbt installed with homebrew:

ln -s /usr/local/Cellar/sbt/0.13.5/libexec/sbt-launch.jar ~/.conscript/sbt-launch.jar

cjmatta avatar Aug 05 '15 19:08 cjmatta

I also have the same problem while installing giter8 and sbt

lyricpoem avatar Feb 09 '16 11:02 lyricpoem

Hit same error. Downloaded https://dl.bintray.com/sbt/native-packages/sbt/0.13.9/sbt-0.13.9.zip and extracted the jar to ~\.conscript. cs.bat wasn't in path, adding ~\bin to %PATH% solved it.

mnn avatar Feb 14 '16 15:02 mnn

I can confirm to that @mnn 's solution works. Although I am running Ubuntu 14.04, I had the same issue while installlng giter8.

dpkshrma avatar Feb 29 '16 10:02 dpkshrma

Shouldn't cs be looking for sbt-launch.jar from the $PATH, instead in ~/.conscript/ dir? I had added path to sbt's bin folder so, command sbt-launch.jar was available.

dpkshrma avatar Feb 29 '16 10:02 dpkshrma

Is this still happening with the latest version of conscript?

eed3si9n avatar May 15 '16 18:05 eed3si9n

cs is working on 0.5.0 in cygwin environment

I've changed cs file like this:

$ more cs #!/bin/sh

java $JAVA_OPTS -jar /home/gilbird/.conscript/sbt-launch.jar @file:\D:\cygwin64\home\gilbird.conscript\foundweekends\conscript\cs\launchconfig "$@"

gilbird avatar Aug 29 '16 02:08 gilbird