'Could not find or load main class ”-Xms2048m
I use this command to increase heap size export CATALINA_OPTS="-Xms1024M -Xmx2048M" After that i tried to shutdown Appache tomcat (8) , but i get this error
Using CATALINA_OPTS: -Xms1024M -Xmx2048M Error: Could not find or load main class ”-Xms2048m
tried this command export CATALINA_OPTS="-Xms1024M -Xmx2048M" get this Error: Could not find or load main class ”-Xms2048m
Solution 1:[1]
Most likely, you copied the options from somewhere, but you didn't copy an ASCII dash, but some other unicode dash, that looks very much or even exactly the same as an ASCII dash in your font. Like the em-dash. (\u2014)
With ASCII dash:
java -version
java version "17" 2021-09-14 LTS [...]
With em-dash (\u2014): (you can copy-paste java —version to try)
java —version
Error: Could not find or load main class —version
Solution: delete the dashes, and type an ASCII dash on your keyboard instead.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Erwin Bolwidt |
