Macro | Package: net.jlinker | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Moderate update since 9.0 release. 8.2 version

## with-java-environment

Arguments: &body body

All calls to Java must be made with a current Java environment.

A Java environment is available by default

- in the Lisp process in which jlinker-init was called
- in an immediate callback from Java `(LispCall style -1 0 1 2)`
- in the body of a function registered with jregister-handler when it is called in response to a registered event
- within the body of this macro

A LispCall made with style 3 or 4 `(STYLE_ASYNC_BR or STYLE_ASYNC_GO)` does not provide a default Java environment. Any calls to Java from such a Lisp function must be within an explicit with-java-environment form.

Since the creation of the environment may involve some overhead when running in native mode, it is best to place calls to this macro in the outermost context where calls to Java are expected.

If the socket implementation is used exclusively, then this macro may be omitted.

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

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Moderate update since 9.0 release. 8.2 version