Skip to content

Commit c42e314

Browse files
committed
restore missing main class name to jvm launch command line
1 parent a49e578 commit c42e314

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

dist/bin/common

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ classpathArgs () {
192192

193193
default_java_opts="-Xmx768m -Xms768m"
194194

195+
CompilerMain=dotty.tools.dotc.Main
196+
DecompilerMain=dotty.tools.dotc.decompiler.Main
197+
ReplMain=dotty.tools.repl.Main
198+
ScriptingMain=dotty.tools.scripting.Main
199+
195200
addJava () {
196201
java_args+=("'$1'")
197202
}
@@ -207,11 +212,6 @@ addScripting () {
207212
prepScalacCommandLine () {
208213
withCompiler=true
209214

210-
CompilerMain=dotty.tools.dotc.Main
211-
DecompilerMain=dotty.tools.dotc.decompiler.Main
212-
ReplMain=dotty.tools.repl.Main
213-
ScriptingMain=dotty.tools.scripting.Main
214-
215215
while [[ $# -gt 0 ]]; do
216216
case "$1" in
217217
--) shift; for arg; do addResidual "$arg"; done; set -- ;;

dist/bin/scalac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ PROG_NAME=$CompilerMain
3333
prepScalacCommandLine "$@"
3434

3535
# exec here would prevent onExit from being called, leaving terminal in unusable state
36-
eval "\"$JAVACMD\"" "$DEBUG" "-classpath \"$cp_arg\"" "${java_args[@]}" "${residual_args[@]}"
36+
eval "\"$JAVACMD\"" \
37+
${JAVA_OPTS:-$default_java_opts} \
38+
"${DEBUG-}" \
39+
"${java_args[@]}" \
40+
"$jvm_cp_args" \
41+
-Dscala.usejavacp=true \
42+
"$PROG_NAME" \
43+
"${scala_args[@]}" \
44+
"${residual_args[@]}" \
45+
"${scripting_string-}"
3746
scala_exit_status=$?
3847

dist/bin/scaladoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ -z "$PROG_HOME" ] ; then
2727
fi
2828

2929
source "$PROG_HOME/bin/common"
30-
30+
default_java_opts="-Xmx768m -Xms768m"
3131
withCompiler=true
3232

3333
CompilerMain=dotty.tools.dotc.Main

0 commit comments

Comments
 (0)