# Set the base directory where the GraalVM folders are located $baseDir = ".\resources" # Find the directory that matches "graalvm" pattern $graalvmDir = Get-ChildItem -Path $baseDir -Filter "graalvm*" -Directory | Select-Object -First 1 # Output the found directory for debugging Write-Host "Found GraalVM Directory: $($graalvmDir.FullName)" # Check if the directory was found if ($null -eq $graalvmDir) { Write-Host "No GraalVM directory found in $baseDir" exit 1 } # Construct the path to the Java executable $javaPath = Join-Path $graalvmDir.FullName "bin\java.exe" # Output the Java path for debugging Write-Host "Java executable path: $javaPath" # Check if the Java executable exists if (-Not (Test-Path $javaPath)) { Write-Host "Java executable not found at $javaPath" exit 1 } # Run the Java command with the classpath and the main class & $javaPath -cp "cultris2.jar" ColorPicker