0

i have a javafx gui programe which work fine in windows, I can run this .jar using python in my local PC and get output, but when try to do same using google colab I got this error

my JavaFX GUI file named: ex4.jar

code:

from subprocess import Popen, PIPE, STDOUT
p = Popen(['java', '-jar', 'ex4.jar' , '3'], stdout=PIPE, stderr=STDOUT)

for line in p.stdout:
  print ( line)

I got error:

b'Error: Could not find or load main class frontend.App\n'
b'Caused by: java.lang.NoClassDefFoundError: javafx/application/Application\n'
D.L
  • 4,339
  • 5
  • 22
  • 45
  • 1
    In this context, I usually add the _module_ options explicitly, for [example](https://stackoverflow.com/a/71288497/230513). – trashgod Sep 24 '22 at 12:51
  • sorry, i didn't understand this steps, my code run in windows correct as a .jar file, but can not open this JavaFX .jar file at google colab – Reda Ghanem Oct 18 '22 at 06:40
  • Sorry, I don't know where to put the required `java` options in [tag:google-colaboratory]. – trashgod Oct 18 '22 at 16:53

0 Answers0