[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Python ➜ PyhonInterpreter.initialize

PyhonInterpreter.initialize

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by KDG   (1 post)  Bio
Date Fri 06 Feb 2004 08:45 AM (UTC)
Message
Hello,

We're working on a project using Java and Python. While executing PyInterpreter.initialize() we encountered some problems.
The code we are using looks like this:

import java.util.*;
import org.python.util.*;
import org.python.core.*;

public class SimpleEmbedded {
public static void main(String []args) throws PyException {
PythonInterpreter interp;

Properties props=new Properties();
props.setProperty("python.path","/home/kdg/jython-2.1/Lib");
PythonInterpreter.initialize(System.getProperties(),props,args);
interp = new PythonInterpreter();
}
}

This code generates the following error-message:
Exception in thread "main" java.lang.NullPointerException
at org.python.core.PyJavaClass.lookup(PyJavaClass.java:43)
at org.python.core.PyObject.<init>(PyObject.java:46)
at org.python.core.PySingleton.<init>(PySingleton.java:8)
at org.python.core.PyNone.<init>(PyNone.java:10)
at org.python.core.PySystemState.initStaticFields(PySystemState.java:396)
at org.python.core.PySystemState.initialize(PySystemState.java:375)
at org.python.core.PySystemState.initialize(PySystemState.java:348)
at org.python.util.PythonInterpreter.initialize(PythonInterpreter.java:40)
at SimpleEmbedded.main(SimpleEmbedded.java:16)

Can anyone help us ?
Thanks,

Ann Carpentier
Kenny Mees
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


7,175 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]