Newlisp-GS on OSX10.10 with Java 1.8

Started by turner, April 27, 2015, 04:11:15 PM

Previous topic - Next topic

turner

I'm a newbie and have a few questions about the Newlisp-GS editor. I have a Mac with OSX 10.10.3 with Java 1.8 installed and I only gets a message box complaining about the java-version, it wants Java 1.6. )If I try the same thing on the laptop with 10.10.3, but Java 1.7 things works fine). I have now managed to step Java down to 1.7, but before I managed that I tried starting the 'newlisp-edit' directly and a few strange things occur: The menu is in the wrong place, on top of the window rather than on top of the screen and the application hangs when trying to load a file by pressing the 'open' button, but works if I do the same from the menu (same 'action'-function in the source). When changing 'look-and-feel' (motif or metal) everything works, but is not looking well on the mac. Any thoughts on these 'issues'?

Lutz

#1
The Java based Guiserver in newLISP runs on Java 1.6,1.7 and also the latest update 1.8 (tested on OSX and Windows). Nowhere in the newLISP or Guiserver code is a message talking about Java versions. This must be something from OSX. Ar you using the Apple certified Java? I think its linked from the Apple site here: https://support.apple.com/kb/DL1572?locale=en_US">https://support.apple.com/kb/DL1572?locale=en_US



Make also sure there is a softlink from the original java executable to /usr/bin/java. This is important! I am not sure if you have to install this link by yourself, as Apple doesn't install Java by default since OSX 10.9/Maverick. For example, I have the following softlink on my OSX machine:

~> ls -ltr /usr/bin/java
lrwxr-xr-x  1 root  wheel  74 Mar 20 07:36 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

You use ln -s from the command line like this:

sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java /usr/bin/java

On OSX, only when using the original OSX installer from the newlisp.org download page, the menu will appear the 'Apple way' on the top of the screen. When starting from the command-line the menu will appear as it would on Windows or Linux on the top of the editor application window.



There are two ways to start Guiserver programs on OSX and all other OS:

java -jar /usr/share/newlisp/guiserver.jar 64001 /usr/bin/newlisp-edit /usr/share/newlisp/newLISP128.png

The last parameter is the splash screen and not necessary. The guiserver will use two ports, in the example 64001 and 64002. You can specify other ports > 1024, which are not used by your system. When people have problems, its often the port used. Currently on 10.6.2, 2000 and 2001 are used, and that may be your problem. Try 64001, like above and will be the default in future versions.



The simple way is, entering newlisp-edit (newlisp newlisp-edit.lsp) from the commandline, and newlisp-edit must be in the executable path. newlisp-edit on OSX is simple newlisp-edit.lsp, but renamed without the extension.

turner

#2
Thanks for your answer. As I manged to step back Java 1.7 it's working now. (Oracle Java)



I've only scratched the surface of the guiserver in my own small scripts so I haven't reached the topics of menus yet. Do I understand it correctly that menues will show up à la Linux/Windows? (but obvoiusly it's possibe to get

'real' OSX menues)



Thanks for a nice language which I feel is more easily used for scripting than any of 'big' ones. I use it mainly for some 'quick and dirty' scripting.

hilti

#3
QuoteWhen people have problems, its often the port used. Currently on 10.6.2, 2000 and 2001 are used, and that may be your problem.


This was my problem when trying to load newLISP-GS in a company network environment. They blocked a lot of ports and newLISP-GS couldn't start up. Took me an hour to figure out, because I was thinking about Java updates and not blocked network ports.
--()o Dragonfly web framework for newLISP

http://dragonfly.apptruck.de\">http://dragonfly.apptruck.de