New parameter for gs:init

Started by HPW, June 11, 2007, 10:46:26 PM

Previous topic - Next topic

HPW

For the early hidden loading of java I would suggest a third parameter in gs:init



(define (init portIn host javafirst)
(if (not portIn) (set 'portIn 47011))
(if (not host) (set 'host "localhost"))

; check for server portIn and if this was started by java
; note: when this was started from inside the new console
; starting a GUI script in the console then main-args
; will contain ("newlisp" "-c" "-p" "64003"). But the
; following lines will still work because the int conversion
; doesn't fail on "-p" but takes the portIn as default
(if (main-args 2) (set 'portIn (int (main-args 2) portIn)))
(if (and(not (= (main-args 3) "javastart"))(not javafirst))
(process (string "java -jar " server-path " " portIn))
)
...
...


So when the third parameter javafirst is true is will use the running java.
Hans-Peter