Re: [Py4j-users] Getting Started Trouble with the java jar file
Status: Beta
Brought to you by:
barthe
From: Barthelemy D. <ba...@cs...> - 2012-05-01 13:37:34
|
Hi Dave, I would need more information about the way you run your java program. Is it from an IDE, from the command line? What exact command are you using? Usually, when you run a java program, you can specify where to find the jar files with the -classpath option, e.g., java -classpath /path/to/py4j.jar fully.qualified.name.MainClass Barthélémy On 2012-04-30, at 7:51 PM, Dave McComb wrote: > I hate to be such a noob (but there is no avoiding it sometimes). > > I’ve been working for several hours on the first couple of examples from the py4J documentation (much of it on the airplane which makes it more difficult when you get stuck) but I’m not getting anywhere. > > I’m a very so-so python developer and have done very little java development. My intention is to use call some existing open source java libraries for some work I’m doing in python. > > I get error code 10061 when I try to run the first example, which I now realize is likely because I don’ t have the java programming running that is to catch my socket requests. > > I managed to write a very simple java program, but any time I had to include anything from package py4j.examples it claims it can’t find it. I’ve put the jar file py4j0.7.jar (which I’m hoping contains the examples package which I also hope is the essential bit of this exercise) just about every place I can think of, including: a) where easy_install put it (C:\Python27\Lib\site-packages\py4j-0.7-py2.7.egg\share\py4j) b) where the documentation said to put it (C:\Python27\share\py4j) c) in the directory where I’m writing the java classes (D:\LocalArchives\My Dropbox\python\pythonJava) and d) in the directory where the other jar files are for my jdk install (C:\Program Files\Java\jdk1.6.0_31\lib ) > > I’m guessing there is another place to put this file that hasn’t occurred to me yet (which is probably common knowledge but I don’t have it) > > Thanks in advance. > > PS the other possibility is that py4j.examples isn’t the literal package name, but meant as an example, in which case, what is the package name? > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > Py4j-users mailing list > Py4...@li... > https://lists.sourceforge.net/lists/listinfo/py4j-users |