From 53c7b749b8dbaae5e712e4b89b6ccc6c6110138d Mon Sep 17 00:00:00 2001 From: Carsten Behring Date: Sun, 28 Nov 2021 19:41:30 +0100 Subject: [PATCH] instructions for using cljbridge package --- topics/embedded.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/topics/embedded.md b/topics/embedded.md index 9c13b8f..c89db20 100644 --- a/topics/embedded.md +++ b/topics/embedded.md @@ -49,10 +49,17 @@ 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: @@ -60,7 +67,7 @@ that script: 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 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