zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
126 stars 55 forks source link

Use Custom JDK for tomcat launch, instead of project default? #134

Open ccorneli opened 2 days ago

ccorneli commented 2 days ago

I would like to launch Tomcat using different JDK from the default project configuration but there doesn't seem to be a way to do that.
In my case I'm trying to run TC9 using JDK 1.8 when my project SDK is JDK21. (assuming the project is set to compile for JDK8 compatibility)

The plug-in doesn't seem to apply setenv.bat to force the JAVA_HOME, nor does it work to try to override that with ENV in the plugin config

I'm guessing it would need to be patch created here: https://github.com/zengkid/SmartTomcat/blob/cb4ea9e5b1aa21c177b1fea71962e8dc55d0531d/src/main/java/com/poratu/idea/plugins/tomcat/conf/TomcatCommandLineState.java#L145

yuezk commented 2 days ago

@ccorneli Try this https://plugins.jetbrains.com/plugin/24555-smart-tomcat-pro

image