Here is a good resource to check out first
First of all, check what command is run when you in fact launch your app. For me (Create minecraft mod) this command was executed when I run runClient
configuration (line breaks, tabs and backslashes added for readability):
/home/tooster/.sdkman/candidates/java/14.0.1-open/bin/java