Newbie getting started

Started by yewklid, January 02, 2010, 05:09:19 AM

Previous topic - Next topic

yewklid

I'm having a problem with the newlist-gs frontend. When I click on the Newlisp desktop icon here is an error message about a java class not found. When I try to get it running from the console, I get more or less the same problem (see below). The computer is fairly new with Windows 7 and Java Standard edition runtime version 6.

Any help much appreciated.





newLISP v.10.1.7 on Win32 IPv4, execute 'newlisp -h' for more info.



> (load"guiserver.lsp")

(lambda (gs:id gs:action) (net-send gs:out (string "frame-resized " gs:id " " gs

:action

   "n")))

> (gs:init)

Exception in thread "main" java.lang.NoClassDefFoundError: C:Program Files (x86

)newlispguiserver/jar

Caused by: java.lang.ClassNotFoundException: C:Program Files (x86)newlispguis

erver.jar

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: C:Program Files (x86)newlispguiserver.jar.  Pr

ogram will exit.

cormullion

#1
Hi there. I have no idea, not being a Windows user, but I noticed the message:



Could not find the main class: C:Program Files (x86)newlispguiserver.jar.



and in the guiserver.lsp file it says:


Quote(load "c:/Program Files/newlisp/guiserver.lsp")

 'guiserver.lsp' expects the server 'guiserver.jar' to be

 in the directoey specified in the environment variable NEWLISPDIR.

 When newLISP starts up and this variable is not set yet, it sets it

 to a default value of '/usr/share/newlisp' on MacOS X and Unix OSs, and

 to 'C:Program Filesnewlisp' or whatever it finds in the 'PROGRAMFILES'

 environment variable on Win32 systems and adding '/newlisp' to it.

 This can be overwritten by specifying system wide  setting for the environment

 variable NEWLISPDIR, which normally is set to '%PROGRAMFILES%/newlisp'

 on Win32. When using the Win32 binary installer 'NEWLISPDIR' is written to

 to the registry automatically and gets into effect after rebooting.


So I'd check all that stuff first... Also, report on Java versions etc, so someone might spot something there too....

m35

#2
I'm pretty sure your problem is that .jar files are not associated with the proper command.



guiserver.lsp runs this command:cmd /c '"%NEWLISPDIR%/guiserver.jar"' 47011
If .jar files are associated with this command:javaw.exe
Then the guiserver.lsp is essentially running the command:javaw.exe "%NEWLISPDIR%/guiserver.jar"which will produce the error you posted.



.jar files need to be associated with this command for guiserver.lsp to work:javaw.exe -jarso that it will run this (correct) command:javaw.exe -jar "%NEWLISPDIR%/guiserver.jar"

yewklid

#3
Thank you both for your help. I know how to associate jar files with javaw.exe instead of java.exe but I can't see how to accomplish the '-jar "%NEWLISPDIR%/guiserver.jar"  part of it in Windows 7.

You can choose a programme to open a file type but nothing more.



This does seem to be the key to the problem because the java runtime seems to be looking for a class called "C:Program Files (x86)newlispguiserver.jar" rather than a file called "C:Program Files (x86)newlispguiserver.jar"