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

Started by JohnE, November 02, 2007, 08:13:48 AM

Previous topic - Next topic

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

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



"f:Program Filesnewlispguiserver.jar" 47011 "f:Program Filesnewlispnewlisp-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

#2
Thanks for the reply Lutz.



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



This worked:

F:WINNTsystem32javaw.exe -jar "F:Program Filesnewlispguiserver.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:WINNTsystem32javaw.exe, and icon launches perfectly without the full java path.  I didn't even know the java filers were in WINNTsystem32!   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






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



"f:Program Filesnewlispguiserver.jar" 47011 "f:Program Filesnewlispnewlisp-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

#3
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

#4
The following assumes you have a development version 9.2.4 installed.



All demo files start with this line:


(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:


(env "NEWLISPDIR")

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


(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:


(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
(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
with
(load "F:/my-path-to/newlisp/guiserver.lsp"))

in all of your demo files.



ps2: which version of newLISP are you running?

JohnE

#5
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