Illegal Character in startScripts - Error

This code used to work in 8.8 but fails in 9.4 with illegal character error for the ‘*’.

startScripts {
   classpath = files("%APP_HOME%/lib/*")
}

This is needed for applications with lots of dependencies or you end up with command line length limit errors on Windows. Why did this stop working?

Sounds like a bug you should report.
Most probably related to JavaExec considers a single wildcard class path entry as executable jar · Issue #17477 · gradle/gradle · GitHub

1 Like

What is strange is that it seems to work sometimes. I can’t make heads or tails out of it.

Ignore the escape char. I think the forum added that. Escaping the asterisk doesn’t even compile.

Yeah, sorry, that was my fault when adding proper formatting to your post I forgot to remove the escape character.

The problem is in the files collection. It cannot be built with a string containing asterisk.