newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: First_Spectr on November 26, 2017, 05:09:27 AM

Title: Not start on Win10
Post by: First_Spectr on November 26, 2017, 05:09:27 AM
When i try to start lnk nothing happens. If I use cmd I get the following:
D:Program Files (x86)newlisp>java -jar guiserver.jar newlisp-edit.lsp /local/newLISPsplash.png
newLISP-GS v.1.66 on Windows 10
 double buffering supported.
Exception in thread "main" java.lang.NumberFormatException: For input string: "newlisp-edit.lsp"
        at java.base/java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.base/java.lang.Integer.parseInt(Unknown Source)
        at java.base/java.lang.Integer.parseInt(Unknown Source)
        at guiserver.main(guiserver.java:82)


If use guiserver.jar newlisp-edit.lsp /local/newLISPsplash.png nothing happens again.



Win 10 x64, latest version java
Title: Re: Not start on Win10
Post by: Lutz on November 27, 2017, 09:32:15 PM
A port-number must be specified:



http://www.newlisp.org/guiserver/guiserver.lsp.html



scroll down to the chapter "Application start"
Title: Re: Not start on Win10
Post by: First_Spectr on November 29, 2017, 05:22:45 AM
forgot to add, also tried so
java -jar guiserver.jar 64001 newlisp-edit.lsp /local/newLISPsplash.png
newLISP-GS v.1.66 on Windows 10
Exception in thread "main" java.lang.NullPointerException
        at java.desktop/sun.awt.SunToolkit.getImageFromHash(Unknown Source)
        at java.desktop/sun.awt.SunToolkit.getImage(Unknown Source)
        at guiserver.getImageFromPath(guiserver.java:183)
        at guiserver.main(guiserver.java:73)


and guiserver.jar 64001 newlisp-edit.lsp /local/newLISPsplash.pngstill nothing
Title: Re: Not start on Win10
Post by: rickyboy on November 29, 2017, 10:54:50 AM
Quote from: "First_Spectr"forgot to add, also tried so
java -jar guiserver.jar 64001 newlisp-edit.lsp /local/newLISPsplash.png
...
still nothing

I don't use guiserver ("but if I did..." :), so this is just a quick driveby: that path looks suspicious to me, namely:


/local/newLISPsplash.png
Check that the file exists there.  I'd bet a beer it doesn't. :)  Best to you, --Rick
Title: Re: Not start on Win10
Post by: First_Spectr on December 01, 2017, 01:49:14 AM
I removed /local/newLISPsplash.png and now I have many errors like "Could not create image-button", but lisp up and running, thanks for that. Where can I find newLISPsplash.png?
Title: Re: Not start on Win10
Post by: First_Spectr on December 01, 2017, 05:44:24 AM
Interface looks [attachment=0]Снимок2.PNG[/attachment]
Title: Re: Not start on Win10
Post by: First_Spectr on December 01, 2017, 02:02:57 PM
I found a solution, in my system used java from "jre-9.0.1" folder, I rewrote the command like C:Program FilesJavajre1.8.0_151binjava.exe" -jar .guiserver.jar 64001 newlisp-edit.lsp and now all work perfect. Unfortunately shortcut still not work: guiserver.jar 64001 newlisp-edit.lsp
Error: Could not find or load main class D:Program Files (x86)newlispguiserver.jar
If somebody know how to fix it - let me know please. The basic problem can be considered solved, thank you very much.
Title: Re: Not start on Win10
Post by: michaellennox on November 11, 2018, 02:17:13 PM
Greetings! As far as I can see,  this problem is common, and I don't know how to fix it. Have you find a solution?
Title: Re: Not start on Win10
Post by: janewhite on January 17, 2021, 11:56:21 PM
I like to work with Win10, it's really more comfortable and cool, the version also has some new great features
Title: Re: Not start on Win10
Post by: nealcaffrey on February 02, 2021, 01:23:11 AM
You need to update the version of Windows
Title: Re: Not start on Win10
Post by: pda on December 14, 2021, 12:38:02 PM
Quote from: First_Spectr post_id=24179 time=1512121754 user_id=1252
I removed /local/newLISPsplash.png and now I have many errors like "Could not create image-button", but lisp up and running, thanks for that. Where can I find newLISPsplash.png?


/local is a valid path, it refers to jar itself, that is files in /local are files stored internally in the guiserver.jar file,  for this reason you can refer to newLISPsplash.png since it's an image stored in the jar file, but you can also provide another image using a diferent path such as /tmp/myScreen.png
Title: Re: Not start on Win10
Post by: pda on December 14, 2021, 12:50:06 PM
I see this thread is a bit older but I would write something related in case being of any help for anybody



I had problems executing guiserver a few days ago, the problem is displayed a  "ERR: cannot find working directory" in the console text-area and guiserver was not able to execute newlisp interpreter so you cannot execute anything.



After investigating under the sources for a while I resolved the issue  hard coding the path in  file newlisp-edit.lsp  in order it search in several places (the hardcode one, the HOME env var , etc)



Another problem I had is newlisp is installed by default in Program Files (x86) and that is a read only folder in windows 10, so is complicated to make changes (you can if editing files as administrator or running a cmd as administrator) but for easy going I ended up copying the whole newlisp folder in a writable path,.  



After doing that sometimes I ran the jar in Program Files while using my writable folder as working dir and doing so I got a lot of alert windows saying it cannot find buttons or other objects, maybe your problem could be related to this, try to run everything in the same folder and check if its readable and maybe also writable.  Hope it helps.



It would be great to use a config file for this stuff (similar to settings but a real file) and also it would be great to reverse the control, it would be great to control java from newlisp repl rather to control newlisp repl from java
Title: Re: Not start on Win10
Post by: pda on December 14, 2021, 01:01:24 PM
Quote from: First_Spectr post_id=24180 time=1512135864 user_id=1252
Interface looks Снимок2.PNG


I think this is more related to wrong paths when executing newlisp-edit.lsp,  check the path variables.
Title: Re: Not start on Win10
Post by: pda on December 14, 2021, 01:11:44 PM
Quote from: First_Spectr post_id=24181 time=1512165777 user_id=1252
I found a solution, in my system used java from "jre-9.0.1" folder, I rewrote the command like C:Program FilesJavajre1.8.0_151binjava.exe" -jar .guiserver.jar 64001 newlisp-edit.lsp and now all work perfect. Unfortunately shortcut still not work: guiserver.jar 64001 newlisp-edit.lsp
Error: Could not find or load main class D:Program Files (x86)newlispguiserver.jar
If somebody know how to fix it - let me know please. The basic problem can be considered solved, thank you very much.


if your problem is to execute jre 1.8.0  rather jre 9.0.1 when executing directly a jar file  you should check the file & program association, in a cmd window type:



C:>assoc .jar
.jar=jarfile

C:>ftype | find "jarfile"
jarfile="C:Program Files (x86)Javajre1.8.0_261binjavaw.exe" -jar "%1" %*


you should get the program is associated to jar files in your windows, in my case it is "C:Program Files (x86)Javajre1.8.0_261binjavaw.exe"



if you want to set another one (jre 9.0.1 or in your case jre 1.8.0) simply type:



C:>ftype jarfile="C:Program Files (x86)Javajre1.8.0_261binjavaw.exe" -jar "%1" %*


supposing your jre 1.8.0 is in path C:Program Files (x86)Javajre1.8.0_261, if not replace as convenient



After doing this you can simply type the name of the jar and it will be run with the right java program like in:


guiserver.jar 64001 newlisp-edit.lsp