I am using Apache Cassandra 3.11.2 with my application.
My application is getting installed under C:/Program Files/My Application/Some Folder/.
And cassandra C:/Program Files/My Application/Some Folder/cassandra.
So when I am using enhanced startup scripts cassandra not getting up and running and I am getting below error:
"Error: Could not find or load main class Files\My"
One of the solution I got is moving cassandra to another location where location path does not contain spaces. But this is not good way of getting this problem resolved.
After doing detailed analysis of all the scripts I found the solution below:
Inside file cassandra-env.ps1 at line number 380:
$env:JVM_OPTS = "$env:JVM_OPTS -XX:CompileCommandFile=$env:CASSANDRA_CONF\hotspot_compiler"
$env:JVM_OPTS = "$env:JVM_OPTS -XX:CompileCommandFile=""$env:CASSANDRA_CONF\hotspot_compiler"""
Fix here is the double quotes added before $env:CASSANDRA_CONF and at the end.
At other places this case is well handled. But missed at this place.