And this list does not specify a reply-to header... so here is my response
to Helmut for public knowledge.
---------- Forwarded message ----------
From: Tobias Ivarsson <thobes@...>
Date: Mon, Jul 21, 2008 at 5:54 PM
Subject: Re: [Jython-users] newbee - howto specify path to java classes
To: Helmut Jarausch <jarausch@...>
In order to be able to load the jar the JVM has to be able to find it. Jars
are located using the classpath configuration variable, you can specify your
classpath when you start java like this:
I don't know how the jdbc service registration system works but it might be
possible to do it all in pure python code in jython as well:
from java.sql import DriverManager
con = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost", "sa", "")
There are a few options for embedding Java in CPython:
* JPype, uses JNI to access the Java reflection api from Python and adds
some layer of Python code on top of it to make Java objects feel more like
* JCC, generates C-code for a CPython extension that provides access to a
specified set of Java classes through JNI. Used by the PyLucene project.
I have used JPype quite sucessfully. JCC gets better performance, but is
much harder to work with.
Neither JPype nor JCC have good support for sharing one Java process in
between several CPython processes, making Jython the best option for
On Mon, Jul 21, 2008 at 5:31 PM, Helmut Jarausch <jarausch@...> wrote:
> being a complete newbee I wonder how I can
> tell jython to load e.g.
> I'm trying to run the hsqldb
> import java
> from java.sql import *
> from java.io import *
> # but the following statement fails
> con = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost", "sa", "")
> Many thanks for a hint!
> If there is a possibility to use hsqldb from CPython I would
> prefer that very much.
> Helmut Jarausch
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> Build the coolest Linux based applications with Moblin SDK & win great
> Grand prize is a trip for two to an Open Source event anywhere in the world
> Jython-users mailing list