Skip to content

instructions for using cljbridge package #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions topics/embedded.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,25 @@ If the installation cannot find 'jni.h' then most likely you have the Java runti
## From the Python REPL


The next step involves starting a python repl from our libpython-clj base directory.
This is only required because we have a special
[python script](https://github.com/clj-python/libpython-clj/blob/master/cljbridge.py)
that has code to start a Java VM with a correct classpath. So we start by importing
The next step involves starting a python repl.

This requires a python library `cljbridge`,
which can be installed via

```
export JAVA_HOME=<--YOUR JAVA HOME-->
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cljbridge
```

So we start by importing
that script:


```python
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cljbridge
>>> from clojurebridge import cljbridge
>>> test_var=10
>>> cljbridge.init_jvm(start_repl=True)
Mar 11, 2021 9:08:47 AM clojure.tools.logging$eval3186$fn__3189 invoke
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy