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

bash start script fails with java_cmd: readonly variable #94

Closed
hackmann opened this issue Nov 27, 2013 · 1 comment
Closed

bash start script fails with java_cmd: readonly variable #94

hackmann opened this issue Nov 27, 2013 · 1 comment

Comments

@hackmann
Copy link
Contributor

We have a PlayFramework that I'm trying to package using sbt clean universal:package-zip-tarball. This generates a tgz file. When I unpack it and run -h it says that I can pass JAVA_HOME as the command line argument

-java-home <path>         alternate JAVA_HOME

but this doesn't work:

$ /opt/IDEC-1.0-SNAPSHOT/bin/idec -java-home /usr/lib/jvm/java-7-oracle
line 201: java_cmd: readonly variable

In bash.template line 255

declare -r java_cmd=$(get_java_cmd)

and on the last line it calls run() which calls proccess_args and on line 166 java_cmdis redefined

 -java-home) require_arg path "$1" "$2" && java_cmd="$2/bin/java" && shift 2 ;;

I can see that as part of revision 69c3bd5b53b6a7a3e7ecbd4b02e5248be917d040 when the main bash script was moved from JavaAppBashScript.scala to bash.template it changed

declare java_cmd=java

to the current

declare -r java_cmd=$(get_java_cmd)
@jsuereth
Copy link
Member

Great diagnosis! Thanks for the report. If you have time to submit a quick pr, I can patch the 0.6 series. I'm a bit swamped today with holidays in the US, but I'll get to this as soon as I can.

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

No branches or pull requests

3 participants