I get a console window with title: C:\Windows\system32\java.exe
server listening on 47011
server accepted from 0.0.0.0
server connecting to 0.0.0.0:47012
server connected
and the GUI shows up as expected.
But when I close the Java-GUI it also close the main-calling process.
Questions:
Can I launch the GUI without the visible java-console window?
Can I avoid the complete closing, so that newLISP.dll simply returns from the call to the calling app?
(Maybe (gs:listen) should get a parameter if complete closing is wanted.)
Run "java" "-jar [#34]C:\\Programme/newlisp/guiserver.jar[#34] 47011" "Hidden" "" ""
I will add a parameter to to gs:listen suppress the default closing behaviour.
Thanks, that will help to use it in this situation.
Of cource this can be used for kind of modal sub dialogs, because the newLISP call will not return until the GUI is closed.
Anyway, another powerfull option to use the new GUI stuff!
Keep it getting better!
;-)
The second method is best for packageing guiserver apps. On windows desktop an icon-link can be configured this way (similar to the existing Win32 icon for newLISP-tk)
On MacOS X the /Developer/Applications/Java Tools/Jar Bundder.app and the /Applications/Utilities/Disk Utility.app can be used to packaged and distributed a Guiserver application with Icon and located in the Applications folder.
One of the next development releases will have installers which install applictions icons on both platforms this way.
C:\Programme\newlisp>Java -jar c:\Programme\newlisp\guiserver.jar 47011 c:\Progr
amme\newlisp\widgets-demo.lsp
guiserver starting newLISP ->c:\Programme\newlisp\widgets-demo.lsp 47011 javasta
rt &<-
Exception in thread "main" java.io.IOException: Cannot run program "c:\Programme
\newlisp\widgets-demo.lsp": CreateProcess error=193, %1 ist keine zulõssige Win3
2-Anwendung
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at guiserver.execCommand(guiserver.java:108)
at guiserver.main(guiserver.java:53)
Caused by: java.io.IOException: CreateProcess error=193, %1 ist keine zulõssige
Win32-Anwendung
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 6 more
C:\Programme\newlisp>
Don't remove anything in gs:init (not sure if I understood you well).
I do it because I start the GUIserver hidden from my main neobook app, and then I load the widgets-demo by the newLISP.dll and there I will avoid a second java start with the console window.
That works for as it start the GUI-Server and newLISP.EXE
But since I was using the DLL it would not work for me.
But it would be no problem to adapt guiserver.lsp for that.
Or you add another parameter for (gs:init) to disable the java start.