Cannot run newLISP-GS, Win2000Pro, Java cannot find main

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
JohnE
Posts: 14
Joined: Thu Nov 01, 2007 5:08 pm

Cannot run newLISP-GS, Win2000Pro, Java cannot find main

Post by JohnE »

I'm a newcomer to newLISP, but you seem a friendly bunch so I feel brave enough to ask this:

I installed newLISP without fiddling with any of the standard instalation. newLISP.exe itself runs just fine, but newLISP-GS, launched from the icon or a command line just gets a complaint from Java that it cannot find the main function. I've checked in the guiserver.jar manifest, it correctly identifies the guiserver class.

I had J1.5, updated to 6 (not fun on a dialup with 8km of line), still no joy. newLISP-GS will not run on my number 2 PC either (w2000, J1.5) or my laptop (W98SE, J1.4).

ImageJ runs just fine (but that is an exe, not a jar).

%PROGRAMFILE% shows "F:\Program Files", which is correct, so guiserver.lsp is being fed the right thing.

Any idea's?

Regards, John

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

Post by Lutz »

The problems may come from the fact that you installed on F:. Try to start newLISP GS this way:

"f:\Program Files\newlisp\guiserver.jar" 47011 "f:\Program Files\newlisp\newlisp-edit.lsp"

You could also try to fix the link on the desktop, it also specifies an additional argument, which is a splash screen for the startup, but you can also start without it. This additional argument is: /local/newLISP128.png . The path refers to the inside of guiserver.jar, don't change it.

I also recommend to install the latest development version 9.2.4, which has a much improved newLISP GS part compared to the release 9.2.0.

Welcome yo newLISP, let us know if this helps to run newLISP GS

Lutz


ps: if you feel that Java 1.6 is too big for your machine, newLISP GS runs also fine on Java 1.5

JohnE
Posts: 14
Joined: Thu Nov 01, 2007 5:08 pm

Post by JohnE »

Thanks for the reply Lutz.

The links were already in fact correct, and the laptop used C: anyhow.

This worked:
F:\WINNT\system32\javaw.exe -jar "F:\Program Files\newlisp\guiserver.jar" 47011 newlisp-edit.lsp /local/newLISP128.png

from the icon but not the Run box or dosbox.

Turned out that the Windows association was with javaw.exe in the Prog..\Java directory. Changed it to F:\WINNT\system32\javaw.exe, and icon launches perfectly without the full java path. I didn't even know the java filers were in WINNT\system32! Howzat? We live and learn.

The command line failed because it was not in the newLISP directory...

So it's OK now! Now bracket-matching practice begins. It's an impressive work you have produced.

John


Lutz wrote:The problems may come from the fact that you installed on F:. Try to start newLISP GS this way:

"f:\Program Files\newlisp\guiserver.jar" 47011 "f:\Program Files\newlisp\newlisp-edit.lsp"

You could also try to fix the link on the desktop, it also specifies an additional argument, which is a splash screen for the startup, but you can also start without it. This additional argument is: /local/newLISP128.png . The path refers to the inside of guiserver.jar, don't change it.

I also recommend to install the latest development version 9.2.4, which has a much improved newLISP GS part compared to the release 9.2.0.

Welcome yo newLISP, let us know if this helps to run newLISP GS

Lutz


ps: if you feel that Java 1.6 is too big for your machine, newLISP GS runs also fine on Java 1.5

JohnE
Posts: 14
Joined: Thu Nov 01, 2007 5:08 pm

Post by JohnE »

Well, I spoke too soon :(

Got the right javaw.exe, and the GUI runs fine, but trying any demo file fails with Java not finding 'main'.

newlisp outputs this:
> (lambda (gs:id gs:action) (net-send gs:out (string "frame-closed "
gs:id " " gs:action "\n")))

I'll keep poking about, but if it is something obvious, please let me know.
I will tell you if I find out first.

Regards, John

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

Post by Lutz »

The following assumes you have a development version 9.2.4 installed.

All demo files start with this line:

Code: Select all

(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
may be the environment variable NEWLISPDIR is not set correctly. newLISP when starting up sets NEWLISPDIR to: %PROGRAMFILES%/newlisp on Windows or /usr/share/newlisp on Mac OS X and other UNIX.

You can check this by entering in newLISP:

Code: Select all

(env "NEWLISPDIR")
you could put a file: init.lsp into newLISP's startup directory (Windows) and put in there the following statement:

Code: Select all

(env "NEWLISPDIR" "F:/my-path-to/newlisp")
Note, that forward slashes in newLISP are Ok on Windows. Then check again if it set it correctly, if not then init.lsp might be in the wrong location. To find out newISP's startup directory, evaluate in the GUI the statement:

Code: Select all

(real-path)
This should given you on Windows the directory where newLISP tries to load init.lsp.

Lutz

ps: if all this doesn't help just replace

Code: Select all

(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
with

Code: Select all

(load "F:/my-path-to/newlisp/guiserver.lsp"))
in all of your demo files.

ps2: which version of newLISP are you running?

JohnE
Posts: 14
Joined: Thu Nov 01, 2007 5:08 pm

Post by JohnE »

Thanks for the attention, Lutz. Everything in the newLISP files was already as you expected. Changing the guiserver.lsp jar invocation line from this:

(set 'server-path (string "\"" (env "PROGRAMFILES") "/newlisp/guiserver.jar\""))

to this:
(set 'server-path (string "javaw.exe -jar " "\"" (env "PROGRAMFILES") "/newlisp/guiserver.jar\""))

did the trick.

The .jar association in Windows had got nobbled, probably by some archiver installer with an agressive approach! (Which explains why all three machines refused to behave.)

Updating Java obviously left it broken. Using the Win 'Folder Options' to reconnect with javaw.exe merely set '.jar' to run 'javaw.exe %1'. There is no way to add the -jar switch using 'Folder Options'.

So finally I twigged, and found an orphan 'jarfile' redirection in the registry. Made a new .jar entry referring to this, made jarfile/shell/open/command into javaw.exe -jar etc, and away I went!

Thanks for your responses, apologies for using your time.

Regards, John

P.S. I'm using newLISP v.9.2.4/newLISP-GS v1.05

Locked