Re: [Foil-users] Foil Quick Start Notes: JVM & SBCL, using USOCKET, on CentOS 6.5
Status: Beta
Brought to you by:
rhickey
From: Marco A. <ma...@cs...> - 2014-01-21 20:22:56
|
Hi nice to see movement on this. All the best MA On Jan 21, 2014, at 19:12 , Gregory Davis <def...@gd...> wrote: > Notes on using Foil with SBCL and JVM on this date: > > 1. For Java RuntimeServier: > a. Add Eclipse SWT to the project. For Eclipse Kepler: > i. Download swt.jar > ii. Foil(right-click on project)/ > "Java Build Path"/ > "Add External JAR" > b. Build project succeeds with 153 warnings. > c. java -cp <lisp-library-home>/foil \ > com.richhickey.foil.RuntimeServer 13579 > > 2. Alter "foil.lisp": > 90c90 > < #+sbcl (make-hash-table :weak-p nil) > --- >> #+sbcl (make-hash-table :weakness nil) > > 4. Use an updated version of SBCL. My first attempts failed with > SBCL 1.0.38-3.el6, the latest CentOS package. I compiled and > installed SBCL 1.1.14 from http://www.sbcl.org The example > below also uses quicklisp from http://www.quicklisp.org/beta/ > > 3. Modified version of quick-start script to use after starting > "RuntimeServer": > (load "<lisp-library-home>/quicklisp/setup.lisp") > (ql:quickload "usocket") > (use-package :usocket) > (load "<lisp-library-home>/foil/foil") > (use-package :foil) > (set 'socket0 (socket-connect "localhost" 13579)) > (set '*fvm* (make-instance 'foil:foreign-vm :stream (socket-stream > socket0))) > ;;;;;;;;; if Java ;;;;;;;;;;; > ;create a wrapper for dialog class > (def-foil-class "javax.swing.JOptionPane") > (use-package "javax.swing") > (joptionpane.showmessagedialog nil "Hello World from Lisp") > > > Hope this saves someone a few cycles. Thanks to Rich Hickey and Eric > Thorsen for Foil. > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Foil-users mailing list > Foi...@li... > https://lists.sourceforge.net/lists/listinfo/foil-users -- Marco Antoniotti |