parse source  . . pgm
call directory filespec('L', pgm)

.environment~setEntry("my.app", .directory~new)

parse source . . s

appDirectory = filespec("Location", s)
jfile = .bsf~new("java.io.File",appDirectory)
urlAppDir = jfile~toUri~toUrl

.my.app~appClzLdr = .bsf~new("java.net.URLClassLoader", bsf.createJavaArrayOf("java.net.URL", urlAppDir))


.my.app~fxmlLoader = bsf.loadClass("javafx.fxml.FXMLLoader")


rexxHandler = .rxDocHandler~new


rxApp = BsfCreateRexxProxy(rexxHandler,,"javafx.application.Application")


rxApp~launch(rxApp~getClass, .nil)

::requires "BSF.CLS"    -- get Java support


::class RxDocHandler
::method init

::method start
  use arg primaryStage

  .my.app~primaryStage = primaryStage
  mainSceneFXMLUrl = .my.app~appClzLdr~findResource("fxml/planer.fxml")
  mainSceneFXML    = .my.app~fxmlLoader~load( mainSceneFXMLUrl )   -- load the fxml document


  .my.app~mainScene = .bsf~new("javafx.scene.Scene", mainSceneFXML)
  primaryStage~setScene(.my.app~mainScene)

  primaryStage~setTitle("Post Corona Shaper")

  primaryStage~show

