jlinker-init

Function

Package: javatools.jlinker

Arguments: &key lisp-port lisp-host lisp-file java-port java-host java-file timeout java-args preload debug verbose

This function establishes communication with a Java server. The value returned is a keyword identifying the last step that was performed. The result is a list if an error is detected.

The mode argument is one of the keywords

:start-java or :start
:lisp-advertises or :lisp
:java-advertises or :java

When mode is :start-java, Lisp starts the Java VM as a dedicated server. The following keywords may be used to modify the default values:

:lisp-port      nil
:lisp-host      "localhost"
:java-port      nil
:java-host      "localhost"

NOTE: If :java-host is not the default value, the user must supply a function that starts Java at the desired host. The name of this function is stored in the variable *jlinker-run-java*.

When mode is :lisp-advertises, Lisp advertises a server and assumes Java will start independently and connect to the server. The following keywords may be used to modify the default values:

:lisp-file      "JavaToLisp.trp"
:lisp-port      nil
:lisp-host      "localhost"
:timeout        nil

If :lisp-file is specified as nil, Lisp simply listens at the specified port and does not advertise in a file. In that case it is necessary to specify :lisp-port as a non-zero value. If :timeout is a number greater than 0, it the number of seconds Lisp will wait for Java to respond.

When mode is :java-advertises, Lisp expects the Java server to start independently and advertise its server. The following keywords may be used to modify the default values:

:java-file      "LispToJava.trp"
:java-port      nil
:java-host      "localhost"
:lisp-port      nil
:lisp-host      "localhost"

When :java-file is non-nil, :java-port and :java-host are ignored. When :java-file is nil, Java is not expected to write a file; Lisp simply tries to connect to the :java-port socket at :java-host; in this case :java-port must be non-zero. If Java is not ready when Lisp tries to connect, an error message (list) is returned.

The following keywords alter the behavior of the init program:

See jlinker.htm for more information on the jLinker facility.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.