feat: Add comprehensive Java auto-detection#9
Open
quinnjr wants to merge 37 commits intoFIUBioRG:masterfrom
Open
feat: Add comprehensive Java auto-detection#9quinnjr wants to merge 37 commits intoFIUBioRG:masterfrom
quinnjr wants to merge 37 commits intoFIUBioRG:masterfrom
Conversation
…ubprocess exec functionality to project.
…into feature/plugin-dependency
… Modifying Dockerfile for better caching. Adding initial Java plugin support wrappers.
… dependency download fucntion to R language. Adding searching for Perl requirements.
…. Renaming source files properly.
Implement robust Java installation detection that works across platforms: - Add JavaConfig class to hold detection results - Add detect_java_config() function with multi-step detection: 1. Check JAVA_HOME environment variable 2. Find javac executable and derive JAVA_HOME 3. Search common installation directories by platform - Support Linux, macOS, and Windows installation paths - Properly configure JNI include paths (jni.h, jni_md.h) - Find and link libjvm shared library - Get Java version for logging RHEL/CentOS/AlmaLinux specific improvements: - Check /etc/alternatives/java_sdk symlink first (most reliable) - Handle java-X-openjdk-VERSION directory naming with arch suffix - Search for matching JDK when javac resolves to JRE - Detect RHEL-like systems and provide helpful error messages - Warn about missing -devel package when JNI headers not found Changes to SConstruct: - Change --without-java default to False (enable auto-detection) - Use detect_java_config() for robust detection - Only enable Java features if detection succeeds - Add proper imports for os and subprocess modules This enables Java plugin support to work out-of-the-box when a JDK is installed, without requiring manual JAVA_HOME configuration.
284ccdf to
e3be66a
Compare
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.
Summary
Changes
New
detect_java_config()Function inbuild_support.pyMulti-step detection strategy:
JAVA_HOMEenvironment variablejavacexecutable and derive JAVA_HOME from it/usr/lib/jvm/*,/usr/java/*,/opt/java/*/Library/Java/JavaVirtualMachines/*, Homebrew locationsC:/Program Files/Java/*, Eclipse Adoptium, Microsoft JDKJavaConfigClassHolds detection results:
java_home: Path to JDK installationinclude_paths: JNI header directorieslib_paths: Library directorieslibjvm_path: Path to libjvm shared libraryis_valid: Whether detection succeededversion: Detected Java versionSConstruct Updates
--without-javadefault toFalse(enable auto-detection)detect_java_config()for robust detectionlibjvmTest plan