I'm working with https://github.com/FIRST-Tech-Challenge/FtcRobotController for FTC. I'm making a tool that uses JShell to evaluate code the user supplies over a socket. (It uses AES GCM, so I think it's safe.) The problem is Android Studio doesn't let me use jdk.shell. The original jbr installation lacked jshell, so I downloaded the latest JBRSDK, filename jbrsdk-17.0.10-windows-x64-b829.27.tar.gz from https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.10b829.27 and made gradle use it in File > Settings > Build, Execution, Deployment > Build Tools > Gradle as well as making JAVA_HOME point to it. From the gradle build files I'm able to access jshell. Proof:
> Configure project :TeamCode
Launching JShell execution engine threw: No ExecutionControlProvider with name 'failover' and parameter keys: [0, 1, 2]
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
BUILD SUCCESSFUL in 3s
The code in build.gradle that tried to launch jshell:
jdk.jshell.tool.JavaShellToolBuilder.builder().start();
Me trying to use it in the actual project:
How can I make it so that I can access JShell from :TeamCode? Do I just need to add permissions to AndroidManifest.xml? If I manage to access JShell, what steps must I take to make it actually useable?
(gradle build files are accessible from FtcRobotController)
I've tried:
sourceSets {
main {
java {
srcDirs += 'C:\\Program Files\\Java\\jbrsdk-17.0.10-windows-x64-b829.27'
}
}
}
To no avail.


I don't know if the code will have missing dependencies like how using java.util.Base64 throws runtime exceptions, but I realized that jdk.jshell was a jmod so I just extracted it and packaged it in a jar and added it to build.gradle: