# Integrate With Non-Java Code

### LotusScript (HCL Notes/Domino)

LotusScript to Java (LS2J) allows you to call Java code directly from your HCL Notes/Domino application code.

#### Step 1: Download SOFA

* [Download *SOFA*](/quick-start/downloads.md) and rename the file *SOFA.jar* to *SOFA.zip*

#### Step 2: Import the SOFA classes into HCL Domino Designer:

* Expand *Code > Script Libraries*
* *New Script Library*: Create a new library (e.g. "OAuth-SOFA-Java") of Type *Java*
* *Import > Archive* and select the directory with the *SOFA.zip* file from the previous step
* *Save* the script library&#x20;

{% hint style="info" %}
These Java class files will be stored in the background. There will be no visible information in HCL Domino Designer.
{% endhint %}

#### Step 3: Use the code

Add the following two statements in your LotusScript code:

{% code lineNumbers="true" %}

```visual-basic
'-- LotusScript to Java Connector
UseLSX "*javacon"

'-- SOFA Java Classes
Use "OAuth-SOFA-Java"        '-- Script library from step 2
```

{% endcode %}

#### Sample Database

{% file src="/files/I1bUMe7B3ZTcnQPAX6rW" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sofa.k43.ch/hints-and-tips/integrate-with-non-java-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
