Steps:
Mac Machine
- brew install gradle
- gradle -v / gradle --version
error shown as “Error: Could not find or load main class “-Xms756m”
Kindly help asap
Steps:
Mac Machine
Kindly help asap
Do you have an environment variable GRADLE_OPT defined? If so, what is the value.
Do you have a file ~/.gradle/gradle.properties? If so what are the contents.
I set env variable as “GRADLE_HOME=/usr/local/Cellar/gradle/5.2.1”
I have a file gradle.properties and the content is
#App related
groupName
projectName
springBootAppJar
appPort
docker.application.debug.port
javaVersion=1.8
versionNumber=1.0
buildNumber=0
envType=dev
nexus_environment=snapshots
docker.registry.image.name=
docker.registry.image.path=
docker.registry.artifactory=
docker.registry.username=
So no GRADLE_OPT env var?
There may be a gradle.properties file somewhere that is configuring command-line args for the JVM that has a typo. Check the project directory where you are running gradle and in your home directory. I can’t remember where else it might look.
You need to find the spot that has the ‘-Xms756m’ and see why it might be considering that as the main class name instead of a JVM argument. Is the ‘-’ something that was copied from an email for example, and it isn’t really the ASCII minus sign?