As far as I know, there isn't really a way to have Java directly communicate with Gdscript, so I don't think that's gonna work unfortunately. Best work around I can think of is to have a java application do button presses on the planet generator app.