I'm trying to make pyjnius work with a jar file I built from java application, but I keep getting the "Class not found" error:
>>> import os
>>> os.environ['CLASSPATH'] = "~/workspace/myapp-Tools/Admin/Console/couchdb/myapp-web.jar"
>>> from jnius import autoclass
>>> bla = autoclass('com/myapp/webapp/server/helpers/licensee/CalculationHelper')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sam/workspace/myapp-Tools/Admin/Console/couchdb/virtualenv/local/lib/python2.7/site-packages/jnius/reflect.py", line 150, in autoclass
c = find_javaclass(clsname)
File "jnius_export_func.pxi", line 23, in jnius.find_javaclass (jnius/jnius.c:12815)
jnius.JavaException: Class not found 'com/myapp/webapp/server/helpers/licensee/CalculationHelper'
>>>
of course I've checked:
jar tf myapp-web.jar
and com/myapp/webapp/server/helpers/licensee/CalculationHelper.class is in there
I've also tried setting the classpath this way:
import jnius_config
jnius_config.set_classpath('.', '~/workspace/myapp-Tools/Admin/Console/couchdb/')
#import jnius
from jnius import autoclass
But this gave me the same result.
I'm working on a virtualenv btw.
I've tried all approaches I could find online, but it is simply not working. I had to manually install pyjnius because using pip got me an old version of it.
Any help would be greatly appreciated.
Edit: tried this with a jar not created by me and I see a different error
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jnius_config
>>> jnius_config.add_classpath('/home/sam/workspace/someproject/*')
>>> jnius_config.expand_classpath()
'/home/sam/workspace/someproject/annotations.jar:/home/sam/workspace/someproject/junit-4.10.jar:/home/sam/workspace/someproject/ postgresql-8.1-408.jdbc3.jar'
>>> import jnius
>>> from jnius import autoclass
>>> test = autoclass('org/postgresql/geometric/PGcircle.class')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sam/workspace/myapp-Tools/Admin/Console/couchdb/virtualenv/local/lib/python2.7/site-packages/jnius/reflect.py", line 150, in autoclass
c = find_javaclass(clsname)
File "jnius_export_func.pxi", line 23, in jnius.find_javaclass (jnius/jnius.c:12815)
jnius.JavaException: Class not found 'org/postgresql/geometric/PGcircle/class'
>>> test = autoclass('org/postgresql/geometric/PGcircle')
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/geometric/PGcircle/class
Caused by: java.lang.ClassNotFoundException: org.postgresql.geometric.PGcircle.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sam/workspace/myapp-Tools/Admin/Console/couchdb/virtualenv/local/lib/python2.7/site-packages/jnius/reflect.py", line 156, in autoclass
for constructor in c.getConstructors():
File "jnius_export_class.pxi", line 562, in jnius.JavaMethod.__call__ (jnius/jnius.c:19385)
File "jnius_export_class.pxi", line 649, in jnius.JavaMethod.call_method (jnius/jnius.c:20409)
File "jnius_utils.pxi", line 43, in jnius.check_exception (jnius/jnius.c:3533)
jnius.JavaException: JVM exception occured
>>> test = autoclass('org/postgresql/geometric/PGcircl')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sam/workspace/myapp-Tools/Admin/Console/couchdb/virtualenv/local/lib/python2.7/site-packages/jnius/reflect.py", line 150, in autoclass
c = find_javaclass(clsname)
File "jnius_export_func.pxi", line 23, in jnius.find_javaclass (jnius/jnius.c:12815)
jnius.JavaException: Class not found 'org/postgresql/geometric/PGcircl'
>>>
and here are the contents of jar tf on that jar:
sam#lambda ~/workspace$ jar tf ./someproject/postgresql-8.1-408.jdbc3.jar
META-INF/
META-INF/MANIFEST.MF
...
org/postgresql/geometric/PGbox.class
org/postgresql/geometric/PGcircle.class
org/postgresql/geometric/PGline.class
org/postgresql/geometric/PGlseg.class
org/postgresql/geometric/PGpath.class
org/postgresql/geometric/PGpoint.class
org/postgresql/geometric/PGpolygon.class
...
sam#lambda ~/workspace$
Again... any help will be greatly appreciated!
tl;dr: make sure the .java files are compiled to (at most) the same Java version .class files as the Java version on the system that will import the file with pyjnius.
Longer version:
I had a very similar problem, with one big difference: some files worked without any problem and others (in the same directory) didn't.
The problem with the files that resulted in the 'Class not found' exception was that I compiled them under Windows, which has Java 8. Ubuntu however currently installs Java 7 when you run "sudo apt-get install default-jdk".
And so, pyjnius couldn't import the Java 8 files on my Java 7 Ubuntu install. It's strange that it throws a 'Class not found' exception, instead of something more descriptive. Changing the target output to 1.7 fixed my problem.
I solved this problem by exporting the JAR as a runnable JAR file in Eclipse:
create an empty main method somewhere if you don't have one (export didn't work for me otherwise)
go to File->Export...
select Java->Runnable JAR file
click Next
select the main method in the Launch configuration
select your Export destination
select "Copy required libraries into a sub-folder next to the generated JAR" as Library handling (the only option that worked for me in my special case, but you can also test the others)
click Finish
It works fine when I use my jar file.
Did you try to use the full path to define CLASSPATH?
Windows 7
Python 2.7.8
jnius 1.1-dev
This page will be useful as a reference.
http://www.hackzine.org/using-apache-tika-from-python-with-jnius.html
I just wanted to leave a comment but I don't have enough reputation for it.
So I leave an answer as a comment.
And you'd better not to use "/" instead of "." when you call autoclass.
See the link below.
http://pyjnius.readthedocs.org/en/latest/api.html#jnius.autoclass
Old Post, but posting an answer if it is useful for someone.
I see two issues there, not sure if you have tried these together:
Change
jnius_config.set_classpath('.', '~/workspace/myapp-Tools/Admin/Console/couchdb/')
To
jnius_config.set_classpath('.', '~/workspace/myapp-Tools/Admin/Console/couchdb/*')
And
test = autoclass('org/postgresql/geometric/PGcircl')
To
test = autoclass('org.postgresql.geometric.PGcircl')
Have you tried to add CLASSPATH via export then run your python script? This worked for me.
$ export CLASSPATH="~/workspace/myapp-Tools/Admin/Console/couchdb/myapp-web.jar"
i solved this isue by putting CLASSPATH in .bashrc
CLASSPATH="~/documents/download/programs/tika-app.jar"
and it works properly
The code below adds a jar to the classpath and then displays the classpath to further debug.
import os
import jnius_config
jnius_config.add_classpath("PATH_HERE/SOME.jar")
from jnius import autoclass, cast
ClassLoader = autoclass('java.lang.ClassLoader')
cl = ClassLoader.getSystemClassLoader()
ucl = cast('java.net.URLClassLoader', cl)
urls = ucl.getURLs()
tmp = [url.getFile() for url in urls]
print('\n'.join(tmp))
Related
I am trying to work through what should be a simple problem, but am missing something. I have a very simple Java class:
package blah.blah;
public class Tester {
public String testMethod1() { return "GotHere"; }
public String testMethod2() { return "GotHereToo"; }
} // Tester
I am trying to get it to load into JPype:
import jpype
import jpype.imports
from jpype.types import *
path_to_jvm = "C:\\Java\\OracleJDK-8_241_x64\\jre\\bin\\server\\jvm.dll"
jpype.startJVM(path_to_jvm, classpath=["C:\\Users\\Administrator\\eclipse-workspace\\JpypeTest\\src;"])
from java.lang import System
print(System.getProperty("java.class.path"))
from java.io import ObjectInputStream
from blah.blah import Tester
tester = Tester()
print(tester.testMethod1())
print(tester.testMethod2())
jpype.shutdownJVM()
Everything works fine when I load the class directly using the above code. It stops working when I try to get it to load the Class file via a JAR.
jpype.startJVM(path_to_jvm, classpath=["C:\\Users\\Administrator\\JpypeTest.jar;"])
The error I get is:
Traceback (most recent call last):
File ".\jpype_test.py", line 16, in <module>
from blah.blah import Tester
ModuleNotFoundError: No module named 'blah'
PS C:\Users\Administrator> python .\jpype_test.py
C:\Users\Administrator\JpypeTest.jar;
Traceback (most recent call last):
File ".\jpype_test.py", line 16, in <module>
from blah.blah import Tester
ModuleNotFoundError: No module named 'blah'
I have built the JAR file a few different ways from Eclipse 2020/09 using JAR export and from the command line using:
C:\Users\Administrator\eclipse-workspace\JpypeTest\src>"C:\Java\OracleJDK-8_241_x64\bin"\jar cf C:\Users\Administrator\JpypeTest.jar blah\blah\*.class
I have confirmed that the JVM and the python interpreter are both 64 bit. I have also done my best to ensure the JVM is exactly the same between Eclipse, the command line and Python.
From what I can see, the JAR looks fine regardless of how I build it. It contains the blah\blah directory and the Tester.class file under it. The manifest is the only other file in the JAR.
I have also tried creating the JAR file with the class file at different directory levels (ie. one level of blah directories and no levels of blah directory).
Here are the versions of the python software:
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Package Version
------------ -------------------
certifi 2020.6.20
JPype1 1.0.2
pip 20.2.3
setuptools 50.3.0.post20201006
wheel 0.35.1
wincertstore 0.2
I clearly have the base plumbing working since it can see the class file. Any thoughts on why the JAR is failing?
Thanks a bunch for your consideration.
Check that you don't have a directory called "blah" that python would look in for modules. This would hide your Java classes, as per https://jpype.readthedocs.io/en/latest/userguide.html#importing-java-classes :
One important caveat when dealing with importing Java modules. Python always imports local directories as modules before calling the Java importer. So any directory named java, com, or org will hide corresponding Java package. We recommend against naming directories as java or top level domain.
I can not make Stanford Parser Version 3.5.1 work. I know that newer versions of this tool are available but I have tons of old code using this particular version. This is for an academic course.
I am using Windows 7, JDK 1.8.0_65, python 3.3.3 and NLTK 3.0.2
My environment variables are as follows:
CLASSPATH : C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\stanford-parser-3.5.1-models.jar;C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\stanford-parser-3.5.1-sources.jar;C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\stanford-parser.jar
JAVA_HOME : C:\Program Files\Java\jdk1.8.0_65\bin
Path : C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Apple\Internet Services\;C:\Program Files\Git\cmd;C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\
I run this code:
from nltk.parse import stanford
parser = stanford.StanfordParser(model_path='C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz')
parser.raw_parse('I love apples')
And I am getting this error
Loading parser from serialized file C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz
...
java.io.IOException: Unable to resolve "C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz"
as either class path, filename or URL
at
edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:463)
at edu.stanford.nlp.io.IOUtils.readStreamFromString(IOUtils.java:396)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromSerializedFile(LexicalizedParser.java:599)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:394)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:181)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.main(LexicalizedParser.java:1395)
Loading parser from text file C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz
java.io.IOException: Unable to resolve "C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz"
as either class path, filename or URL
at
edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:463)
at edu.stanford.nlp.io.IOUtils.readerFromString(IOUtils.java:591)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromTextFile(LexicalizedParser.java:533)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:396)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:181)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.main(LexicalizedParser.java:1395)
Exception in thread "main" java.lang.NullPointerException
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:183)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.main(LexicalizedParser.java:1395)
Traceback (most recent call last): File
"C:\Users\Zimtyth\Desktop\PFE\Implémentation\Codes\Code
final\Lib_Stanford_Parser.py", line 100, in
resultat = parse_sent("My name is Melroy and i want to win.") File "C:\Users\Zimtyth\Desktop\PFE\Implémentation\Codes\Code
final\Lib_Stanford_Parser.py", line 10, in parse_sent
return parser.raw_parse(sent) File "C:\Python33\lib\site-packages\nltk\parse\stanford.py", line 152, in
raw_parse
return next(self.raw_parse_sents([sentence], verbose)) File "C:\Python33\lib\site-packages\nltk\parse\stanford.py", line 170, in
raw_parse_sents
return self._parse_trees_output(self._execute(cmd, '\n'.join(sentences), verbose)) File
"C:\Python33\lib\site-packages\nltk\parse\stanford.py", line 230, in
_execute
stdout=PIPE, stderr=PIPE) File "C:\Python33\lib\site-packages\nltk\internals.py", line 161, in java
raise OSError('Java command failed : ' + str(cmd)) OSError: Java command failed : ['C:\Program
Files\Java\jdk1.8.0_65\bin\java.exe', '-mx1000m', '-cp',
'C:\Program Files
(x86)\stanford-parser-full-2015-01-30\jars\stanford-parser.jar;C:\Program
Files
(x86)\stanford-parser-full-2015-01-30\jars\stanford-parser-3.5.1-models.jar',
'edu.stanford.nlp.parser.lexparser.LexicalizedParser', '-model',
'C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz',
'-sentences', 'newline', '-outputFormat', 'penn', '-encoding', 'utf8',
'c:\users\zimtyth\appdata\local\temp\tmpbf5zdg']
I have already checked a couple of answers in SO about this like this but still I could not make it work. It looks like a Java problem, please tell me what am I doing wrong here?
I would guess that your code isn't right and you don't have any file at the location 'C:\Program Files (x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz'.
If the models jar file is on your classpath, you should be able to get things to work by giving the model path (inside the jar file):
parser = stanford.StanfordParser(model_path='edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz')
The other choice is to expand the jar file (jar -xf) and then you would have an englishPCFG.ser.gz file, which you could as a parameter to the model_path.
p.s. For other people reading this in 2019+: You shouldn't actually be using this NLTK package at all any more, but rather: nltk.parse.corenlp.CoreNLPParser
I am trying to install Matlab on a Linux machine, but setting LD_LIBRARY_PATH (as the installation requires) breaks other library files. I am not an Linux expert, but I have tried several things and cannot get it working correctly. I have even contacted Matlab support, got the issue elevated to the dev team, and was basically told "haha sucks to suck". I have seen a few other people online have had the same issue, but either their questions were never answered or they had a slightly different problem and their solution didn't apply to me.
Installing on a VM running Ubuntu:
I set LD_LIBRARY_PATH as the instructions say, then it breaks network files. I can ping google.com, but I cannot nslookup google.com or visit it in a browser. Nslookup provides this error:
nslookup: /usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libdns.so.100)
03-Feb-2016 11:32:22.361 ENGINE_by_id failed (crypto failure)
03-Feb-2016 11:32:22.362 error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
03-Feb-2016 11:32:22.363 error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:447:
03-Feb-2016 11:32:22.363 error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=gost
(null): dst_lib_init: crypto failure
The installation worked though (I can run my Java programs that reference compiled Matlab functions). Unsetting LD_LIBRARY_PATH fixes the network files but then I can't run programs anymore.
Installing on EC2 instance:
On an EC2 instance it does not break the network files (nslookup is fine). Instead it messes up Python library files. Trying to use any aws cli command, I get the error:
File "/usr/bin/aws", line 19, in <module>
import awscli.clidriver
File "/usr/lib/python2.7/dist-packages/awscli/clidriver.py", line 16, in <module>
import botocore.session
File "/usr/lib/python2.7/dist-packages/botocore/session.py", line 25, in <module>
import botocore.config
File "/usr/lib/python2.7/dist-packages/botocore/config.py", line 18, in <module>
from botocore.compat import six
File "/usr/lib/python2.7/dist-packages/botocore/compat.py", line 139, in <module>
import xml.etree.cElementTree
File "/usr/lib64/python2.7/xml/etree/cElementTree.py", line 3, in <module>
from _elementtree import *
ImportError: PyCapsule_Import could not import module "pyexpat"
Printing sys.path in Python shows lib-dynload is already there though, so it doesn't seem to the problem.
And when trying to run the program, I get:
Exception in thread "main" java.lang.LinkageError: libXt.so.6: cannot open shared object file: No such file or directory
at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.dlopen(Native Method)
at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.loadLibraryAndBindNativeMethods(DynamicLibraryUtils.java:134)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1529)
at VectorAddExample.VectorAddExampleMCRFactory.newInstance(VectorAddExampleMCRFactory.java:48)
at VectorAddExample.VectorAddExampleMCRFactory.newInstance(VectorAddExampleMCRFactory.java:59)
at VectorAddExample.VectorAddClass.<init>(VectorAddClass.java:62)
at com.mypackage.Example.main(Example.java:13)
I'm at a brick wall and really have no clue how to proceed.
Maybe something else already needs LD_LIBRARY_PATH set to work. Make sure you prepend not overwrite:
export LD_LIBRARY_PATH=new/path:$LD_LIBRARY_PATH
Edit:
OK, if LD_LIBRARY_PATH was initially empty, this suggests that Matlab comes with shared libraries that are incompatible with your system ones:
nslookup: /usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libdns.so.100)
suggests that /usr/lib/libdns.so.100 needs libcrypto.so.1.0.0, which is now being resolved to the one that comes with MATLAB, which is incompatible.
You can check the dependencies of a dll by
ldd /usr/lib/libcrypto.so.1.0.0
and hopefully you can find a configuration that keeps both MATLAB and your system happy. Unfortunately, this may involve a lot of trial and error.
If there is no such configuration, you can try setting LD_LIBRARY_PATH only when you run MATLAB:
LD_LIBRARY_PATH=$MATLAB_LD_LIBRARY_PATH matlab
Edit 2:
Well, for the Python issue, it seems to boil down to pyexpat, which is a wrapper around the standard expat XML parser. Try doing (name guessed since I don't have a Linux right now):
ldd /usr/local/lib/python2.7/site-packages/libpyexpat.so
and see what that depends on. Probably, it will be libexpat.so, which is now being resolved to MATLAB's version.
try the following command:
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/sys/os/glnxa64:$LD_LIBRARY_PATH
Perhaps not helpful for OP but if you are generating a python package with MATLAB, you could modify the generated __init__.py file MATLAB creates for your package.
Specifically, the generated __init__.py file contains the following line (as of MATLAB 2017a):
PLATFORM_DICT = {'Windows': ['PATH','dll',''], 'Linux': ['LD_LIBRARY_PATH','so','libmw'], 'Darwin': ['DYMCR_LIBRARY_PATH','dylib','libmw']}
For Linux platform, you could simply replace LD_LIBRARY_PATH with something else such as MCR_LIBRARY_PATH to prevent mucking with your shared libs.
sed -i -e 's/LD_LIBRARY_PATH/MCR_LIBRARY_PATH/g' /MY/PACKAGE/BUILD/PATH/__init__.py
Then obviously export MCR_LIBRARY_PATH before using python.
I am trying to invoke some classes that are in jar file from python.I have set path and trying to run it like this :
import javabridge as jv
path=r'D:\myFiles\swinglibrary-1.9.5.jar'
jars = jv.JARS+[path]
jv.start_vm(run_headless=True,class_path=jars)
print(str(jv.get_static_field("org.robotframework.swing.SwingLibrary","runKeyword", a)))
I get this below error when i execute this :
Traceback (most recent call last):
File "<pyshell#52>", line 1, in <module>
print(str(javabridge.get_static_field("org.robotframework.swing.SwingLibrary", "runKeyword", a)))
File "C:\Python27\lib\site-packages\javabridge\jutil.py", line 952, in get_static_field
raise JavaException(jexception)
JavaException: org.robotframework.swing.SwingLibrary
I am not sure how to invoke a class in a jar using javabridge.Can anyone help me out with this?
Can someone help me out with the stanford parser from http://nlp.stanford.edu/software/lex-parser.shtml?
I've only downloaded and unzipped the parser.
I've also installed the jython fully but i cannot parse a sentence, it seems like i've installed some modules or something.
http://wiki.python.org/jython/InstallationInstructions
>>> import sys
>>> sys.path.append('~/standford-parser-2010-11-30/stanford-parser-2011-11-30.jar')
>>> from java.io import CharArrayReader
>>> from edu.stanford.nlp import *
Traceback (innermost last):
File "<console>", line 1, in ?
ImportError: no module named edu
Is there more installation procedures other than unzipping it and importing it in jython?
You have a typo in your sys.append statement. The filename says 2011 when it should be 2010:
import sys
sys.path.append('./stanford-parser-2010-11-30/stanford-parser-2010-11-30.jar')
from edu.stanford.nlp import *
print fsm
<java package edu.stanford.nlp.fsm 1>
You might also look here for some starting off example code.