Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running sbt with the '-java-home' option fails #4768

Closed
dubaut opened this issue Jun 3, 2019 · 5 comments · Fixed by sbt/sbt-launcher-package#272
Closed

Running sbt with the '-java-home' option fails #4768

dubaut opened this issue Jun 3, 2019 · 5 comments · Fixed by sbt/sbt-launcher-package#272

Comments

@dubaut
Copy link

dubaut commented Jun 3, 2019

steps

sbt version: 1.2.8

problem

As suggested by @eed3si9n in the (closed) issue 4766 I tried to run sbt with the -java-home option but it failed with the following error:

[error] Expected symbol
[error] Not a valid command: -
[error] Expected end of input.
[error] Expected '--'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected 'addPluginSbtFile'
[error] -java-home
[error]  ^

expectation

sbt compiles against the specified JDK.

notes

  • Windows 10 Professional
@eed3si9n eed3si9n added the area/windows Windows-specific issue label Jun 4, 2019
@eed3si9n
Copy link
Member

eed3si9n commented Jun 4, 2019

Thanks for the report. It looks like a missing feature in Windows batch file.
Would you consider sending us a PR to fix this?
https://github.com/sbt/sbt-launcher-package/blob/master/src/universal/bin/sbt.bat

@dubaut
Copy link
Author

dubaut commented Jun 4, 2019

I'd love to but I am afraid I do not know CMD scripting.

@virpara
Copy link

virpara commented Jun 29, 2019

@eed3si9n I'd like to send PR for this fix. I should submit PR against the repository sbt/sbt-launcher-package, right ?

@eed3si9n
Copy link
Member

@virpara Yes, please.

@gladiac
Copy link
Contributor

gladiac commented Jun 30, 2019

@dubaut I already implemented the missing functionality in my fix-sbt-bat branch. Could you please check it out at https://github.com/gladiac1337/sbt-launcher-package/tree/fix-sbt-bat and test it? I already created PR sbt/sbt-launcher-package#272 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants