Repository navigation
feat(plugins): run the Java profiler with rc profile java - #19
Merged
colinjlacy merged 1 commit intoNov 18, 2026
Merged
Conversation
Add the Java profiler as an optional language add-on, found the way the TypeScript one is: rc-profiler-java on PATH, or the absolute path in RC_JAVA_PROFILER. It is run only if its --version --json lists core profile schema 0.4.0, and everything after "java" is passed to it unchanged, so it keeps its own flags such as --classpath. The add-on is a launcher that starts the jar on the JDK named by RC_JAVA_HOME or JAVA_HOME, or the one bundled in its system package, or java on PATH, and says what is missing. So rc lists no runtime for it and does not look for java itself. rc plugins list shows it, and the deb suggests rc-profiler-java. Tested with a fake runner and, by hand, with the real launcher and jar: rc plugins list shows java ready, and rc profile java generate prints the profile. An existing test used profile java as an example of an unknown command; it now uses ruby.
colinjlacy
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the Java profiler as an optional language add-on, found the way the TypeScript one is: rc-profiler-java on PATH, or the absolute path in RC_JAVA_PROFILER. It is run only if its --version --json lists core profile schema 0.4.0, and everything after "java" is passed to it unchanged, so it keeps its own flags such as --classpath.
The add-on is a launcher that starts the jar on the JDK named by RC_JAVA_HOME or JAVA_HOME, or the one bundled in its system package, or java on PATH, and says what is missing. So rc lists no runtime for it and does not look for java itself. rc plugins list shows it, and the deb suggests rc-profiler-java.
Tested with a fake runner and, by hand, with the real launcher and jar: rc plugins list shows java ready, and rc profile java generate prints the profile. An existing test used profile java as an example of an unknown command; it now uses ruby.