Re: [Py4j-users] Getting Started Trouble with the java jar file
Status: Beta
Brought to you by:
barthe
From: Dave M. <dav...@se...> - 2012-05-03 13:45:39
|
That's it! Thank you, I'm off to the races now (until I stumble and fall again). I have another plane ride tonight might get a chance to try some stuff. Thanks again. ________________________________________ From: Barthelemy Dagenais [ba...@cs...] Sent: Wednesday, May 02, 2012 4:51 PM To: Support and Comments about Py4J Subject: Re: [Py4j-users] Getting Started Trouble with the java jar file Hi, the classpath must specify a jar file or a directory containing .class files. You probably need something like C:\Python27\share\py4j\py4j0.7.jar Barthélémy On 2012-05-01, at 5:53 PM, Dave McComb wrote: > Thanks again, so I tried with the classpath as follows (I could easily have some syntactic problem here) > > Is there any way to tell whether the jar file called py4j0.7.jar actually has the package inside it call examples and that in turn has GatewayServer in it? > > > D:\LocalArchives\My Dropbox\python\pythonJava>javac -classpath "C:\Python27\shar > e\py4j" OperatorExample.java > OperatorExample.java:2: cannot find symbol > symbol : class GatewayServer > location: package py4j > import py4j.GatewayServer; > ^ > 1 error > > > -----Original Message----- > From: Barthelemy Dagenais [mailto:ba...@cs...] > Sent: Tuesday, May 01, 2012 7:18 AM > To: Support and Comments about Py4J > Subject: Re: [Py4j-users] Getting Started Trouble with the java jar file > > 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 > > > ------------------------------------------------------------------------------ > 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 > > ------------------------------------------------------------------------------ > 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 ------------------------------------------------------------------------------ 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 |