Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions dask_sql/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,25 @@ def _set_or_check_java_home():
jvmpath = jvmpath.replace("\\bin\\bin\\server\\jvm.dll", "\\bin\\server\\jvm.dll")

logger.debug(f"Starting JVM from path {jvmpath}...")
jpype.startJVM(
jvmArgs = [
"-ea",
"--illegal-access=deny",
ignoreUnrecognized=True,
convertStrings=False,
jvmpath=jvmpath,
]

if "DASK_SQL_JVM_DEBUG_ENABLED" in os.environ: # pragma: no cover
logger.debug(
"Remote JVM debugging enabled. Application will wait for remote debugger to attach"
)
# Must be the first argument in the JVM args
jvmArgs.insert(
0, "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"
)

logger.debug(f"Starting JVM from path {jvmpath}...")
jpype.startJVM(
*jvmArgs, ignoreUnrecognized=True, convertStrings=False, jvmpath=jvmpath,
)

logger.debug("...having started JVM")


Expand Down