beam
beam copied to clipboard
Update ExternalJavaProvider.available method to support Windows systems
The current implementation of the ExternalJavaProvider.available method only supports Unix/Linux systems. This issue aims to update the function to also support Windows systems.
Changes:
The available method will be updated to use the where command on Windows systems, instead of the which command used on Unix/Linux systems.
New implementation:
class ExternalJavaProvider(ExternalProvider):
def __init__(self, urns, jar_provider):
super().__init__(
urns, lambda: external.JavaJarExpansionService(jar_provider()))
self._jar_provider = jar_provider
def available(self):
cmd = 'where' if sys.platform == 'win32' else 'which'
return subprocess.run([cmd, 'java'], capture_output=True).returncode == 0
This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.