Not start on Win10

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
First_Spectr
Posts: 5
Joined: Wed Nov 22, 2017 9:27 am

Not start on Win10

Post by First_Spectr »

When i try to start lnk nothing happens. If I use cmd I get the following:

Code: Select all

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

Code: Select all

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

Win 10 x64, latest version java

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Not start on Win10

Post by Lutz »

A port-number must be specified:

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

scroll down to the chapter "Application start"

First_Spectr
Posts: 5
Joined: Wed Nov 22, 2017 9:27 am

Re: Not start on Win10

Post by First_Spectr »

forgot to add, also tried so

Code: Select all

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

Code: Select all

guiserver.jar 64001 newlisp-edit.lsp /local/newLISPsplash.png
still nothing

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Not start on Win10

Post by rickyboy »

First_Spectr wrote:forgot to add, also tried so

Code: Select all

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:

Code: Select all

/local/newLISPsplash.png
Check that the file exists there. I'd bet a beer it doesn't. :) Best to you, --Rick
(λx. x x) (λx. x x)

First_Spectr
Posts: 5
Joined: Wed Nov 22, 2017 9:27 am

Re: Not start on Win10

Post by First_Spectr »

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?

First_Spectr
Posts: 5
Joined: Wed Nov 22, 2017 9:27 am

Re: Not start on Win10

Post by First_Spectr »

Interface looks
interface
interface
Снимок2.PNG (21.59 KiB) Viewed 18384 times

First_Spectr
Posts: 5
Joined: Wed Nov 22, 2017 9:27 am

Re: Not start on Win10

Post by First_Spectr »

I found a solution, in my system used java from "jre-9.0.1" folder, I rewrote the command like

Code: Select all

C:\Program Files\Java\jre1.8.0_151\bin\java.exe" -jar .\guiserver.jar 64001 newlisp-edit.lsp
and now all work perfect. Unfortunately shortcut still not work:

Code: Select all

guiserver.jar 64001 newlisp-edit.lsp
Error: Could not find or load main class D:\Program Files (x86)\newlisp\guiserver.jar
If somebody know how to fix it - let me know please. The basic problem can be considered solved, thank you very much.

michaellennox
Posts: 1
Joined: Sun Nov 11, 2018 10:15 pm

Re: Not start on Win10

Post by michaellennox »

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?

janewhite
Posts: 1
Joined: Mon Jan 18, 2021 7:50 am

Re: Not start on Win10

Post by janewhite »

I like to work with Win10, it's really more comfortable and cool, the version also has some new great features

nealcaffrey
Posts: 1
Joined: Tue Feb 02, 2021 9:16 am

Re: Not start on Win10

Post by nealcaffrey »

You need to update the version of Windows

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: Not start on Win10

Post by pda »

First_Spectr wrote:
Fri Dec 01, 2017 9:49 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?
/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

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: Not start on Win10

Post by pda »

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

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: Not start on Win10

Post by pda »

First_Spectr wrote:
Fri Dec 01, 2017 1:44 pm
Interface looks Снимок2.PNG
I think this is more related to wrong paths when executing newlisp-edit.lsp, check the path variables.

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: Not start on Win10

Post by pda »

First_Spectr wrote:
Fri Dec 01, 2017 10:02 pm
I found a solution, in my system used java from "jre-9.0.1" folder, I rewrote the command like

Code: Select all

C:\Program Files\Java\jre1.8.0_151\bin\java.exe" -jar .\guiserver.jar 64001 newlisp-edit.lsp
and now all work perfect. Unfortunately shortcut still not work:

Code: Select all

guiserver.jar 64001 newlisp-edit.lsp
Error: Could not find or load main class D:\Program Files (x86)\newlisp\guiserver.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:

Code: Select all

C:\>assoc .jar
.jar=jarfile

C:\>ftype | find "jarfile"
jarfile="C:\Program Files (x86)\Java\jre1.8.0_261\bin\javaw.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)\Java\jre1.8.0_261\bin\javaw.exe"

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

Code: Select all

C:\>ftype jarfile="C:\Program Files (x86)\Java\jre1.8.0_261\bin\javaw.exe" -jar "%1" %*
supposing your jre 1.8.0 is in path C:\Program Files (x86)\Java\jre1.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:

Code: Select all

guiserver.jar 64001 newlisp-edit.lsp

Locked