-
Can anyone provide an example of how I would pass jvm arguments to _.run and _.test operations in mill? “--add-exports=java.base/sun.nio.ch=ALL-UNNAMED" to the jvm prior to spark initialization to give spark access to java’s sun.nio.ch.DirectBuffer What works: The following two examples perform the same execution of the mill _.run operation but I have found no way to directly run _.test operation. Java call from VS_Code submission java "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED" Spark-submit: spark-submit --driver-java-options "--add-exports java.base/sun.nio.ch=ALL-UNNAMED" What doesn’t work: In all instances below I receive the following error: “java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x59fa0ced) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module”
mill myjob.run /Users/cliftonjbest/Documents/Development/Projects/IOA /out/etl_job/assembly.dest/out.jar /Users/user1/Documents/Development/Datasrc1/12NOV24
JAVA_OPTS="--add-exports java.base/sun.nio.ch=ALL-UNNAMED" mill etl_job.run Users/cliftonjbest/Documents/Development/Projects/IOA /out/etl_job/assembly.dest/out.jar /Users/user1/Documents/Development/Datasrc1/12NOV24
I greatly appreciate any insights that the community can provide in helping me understand the mechanism for passing the "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED” parameter to the process that mill uses to execute the _.run and _.test operations. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If I'm not mistaken, it sounds like you want |
Beta Was this translation helpful? Give feedback.
-
This worked perfectly. I greatly appreciate your reply. |
Beta Was this translation helpful? Give feedback.
If I'm not mistaken, it sounds like you want
forkArgs
https://mill-build.org/mill/javalib/module-config.html#_compilation_execution_flags