Macro | Package: net.jlinker | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version