Thanks to visit codestin.com
Credit goes to github.com

Skip to content

scyjava.config.add_option() not sufficient to set keyword arguments for jpype.startJVM #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tlambert03 opened this issue Apr 19, 2025 · 1 comment

Comments

@tlambert03
Copy link
Collaborator

I found myself in a scenario where I'd like to use scyjava.start_jvm(), but need the ability to use some of the keyword-only arguments to jpype.startJVM, like convertStrings

internally, scyjava starts it like this:

def start_jvm(options=None) -> None:
    ...
    # initialize JPype JVM
    _logger.debug("Starting JVM")
    if options is None:
        options = scyjava.config.get_options()
    jpype.startJVM(*options, interrupt=True)

which (i think?) only lets you set jvmargs, but leaves no way to set keyword arguments for jpype.startJVM:

def startJVM(
    *jvmargs: str,
    jvmpath: typing.Optional[_PathOrStr] = None,
    classpath: typing.Union[typing.Sequence[_PathOrStr],
                            _PathOrStr, None] = None,
    ignoreUnrecognized: bool = False,
    convertStrings: bool = False,
    interrupt: bool = not interactive(),
) -> None:
@Thrameos
Copy link

Thrameos commented Apr 20, 2025

Jpype will be adding many more keyword args in the future. If the users can't directly call jpype start function themselves you will need to improve the wrapper.

jpype-project/jpype#1249

ctrueden added a commit that referenced this issue Apr 29, 2025
ctrueden added a commit that referenced this issue Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants