Find version of IDEA at runtime (from the current application )
已回答
Hi team,
Are you aware of any reliable method to identify the version of IDEA at runtime from the current application that is being executed?
I'd like to be able to validate that my users are using newer versions of the IDE while running my application
请先登录再写评论。
it is a standard Maven Java application (not Spring). The application is launched using a Run Configuration passing a custom Main class
It's not directly supported as the launched application use a seperated JVM process. You may use some JVM API to get the PID of IDEA then check the system properties, take https://plugins.jetbrains.com/plugin/19464-jvms-manager 's source code as an good example, check this file https://github.com/marcelkliemannel/intellij-jvms-manager-plugin/blob/main/src/main/kotlin/dev/turingcomplete/intellijjvmsmanagerplugin/process/CollectJvmProcessNodesTask.kt :