Set main methods accessible no matter what

Allows to run main methods from private classes (like java -cp can)
This commit is contained in:
Alexandre Archambault 2016-07-23 17:17:11 +02:00
parent 127e73abe9
commit 84ce09ab43
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
1 changed files with 1 additions and 0 deletions

View File

@ -199,6 +199,7 @@ case class Launch(
Helper.errPrintln(s"Error: method main not found in $mainClass0")
sys.exit(255)
}
method.setAccessible(true)
if (options.common.verbosityLevel >= 2)
Helper.errPrintln(s"Launching $mainClass0 ${userArgs.mkString(" ")}")