robertwb commented on a change in pull request #15857:
URL: https://github.com/apache/beam/pull/15857#discussion_r745149530



##########
File path: sdks/python/apache_beam/utils/subprocess_server.py
##########
@@ -158,9 +158,14 @@ class JavaJarServer(SubprocessServer):
       'local', (threading.local, ),
       dict(__init__=lambda self: setattr(self, 'replacements', {})))()
 
-  def __init__(self, stub_class, path_to_jar, java_arguments):
+  def __init__(self, stub_class, path_to_jar, java_arguments, classpath=None):
+    if classpath:
+      cp_args = ['-classpath', os.pathsep.join(classpath)]
+    else:
+      cp_args = []
     super().__init__(
-        stub_class, ['java', '-jar', path_to_jar] + list(java_arguments))
+        stub_class,
+        ['java'] + cp_args + ['-jar', path_to_jar] + list(java_arguments))

Review comment:
       Oh, that's really unfortunate. This really limits the ability to use 
classes in an ad-hoc way... I'll have to think about this some more. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to