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

Comments

@dubaut
Copy link

@dubaut 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

This comment has been minimized.

Copy link
Member

@eed3si9n 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

This comment has been minimized.

Copy link
Author

@dubaut dubaut commented Jun 4, 2019

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

@virpara

This comment has been minimized.

Copy link

@virpara 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

This comment has been minimized.

Copy link
Member

@eed3si9n eed3si9n commented Jun 30, 2019

@virpara Yes, please.

@gladiac1337

This comment has been minimized.

Copy link

@gladiac1337 gladiac1337 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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.