My question is similar to ImportErrorCmd but I'm using Windows and trying to run this DAMN thing in PyDev Eclipse. I know how to get it to work on cmd but not in Eclipse.
QUESTION
Anyway, so here I am trying to get this example @ ImportErrorSimpleExample to work (the solution there didn't work for me). In Eclipse, I made a Java project with this code: (link -> C:\Users\compski\workspace\test\src\test\Greeter.java)
package test;
public class Greeter {
private String msg;
public Greeter() {
msg = "Hello, ";
}
public void greet(String name) {
System.out.println(msg + name);
}
}
In Eclipse also, I made a PyDev Project with the Jython code called me.py: (link -> C:\Users\compski\workspace\Jython\Test\me.py)
from test import Greeter
g = Greeter()
g.greet("yours truly")
Attempts to fix "ImportError" but failed:
1) I tried adding my java code to PYTHONPATH (C:\Users\compski\workspace\test\src\test\Greeter.java and C:\Users\compski\workspace\test\src\test) as in here -> Proposed Solution 1 . Still didn't work
2) I set my Java project to PyDev project (rightclick Java project -> PyDev -> Set as Pydev Project but I don't have any "bin folders". I then also project referenced my Java Project containing the Greeter.java to my PyDev project as in here -> Proposed solution 2. Still didn't work
3) 1 guy from the chat at SO told me that I need to "you need to add directories, jars from which java will look for classes that is you give it c:\foo\bar\bazand import zyxxy.Frobnicator then it looks for c:\foo\bar\baz\xyzzy\Frobnicator" but I don't think I fully understand what he meant cause it sounds like what I did at 1)
4) ......Your answer?