You’re right that the issue is Java / Spark. You’ll need to set PYSPARK_SUBMIT_ARGS as described here.
PYSPARK_SUBMIT_ARGS