Search code examples
eclipsemavenpydevjythonm2eclipse

Does Eclipse PyDev (Jython) pull classpath from M2Eclipse?


While trying to run Jython Scripts in Eclipse using PyDev, I noticed that the Jython run configuration was not pulling the java classpath value from maven/m2eclipse.

Has anybody configured eclipse so that PyDev pulls the correct classpath from maven?

Notes:

  • I can in fact run jython scripts, and import classes from the jre, but my maven dependencies do not appear on the classpath when interpreting the Jython scripts
  • I have seen the question/answer Using Jython with M2Eclipse and have used maven plugins to execute jython scripts, but that is not what I am interested in

Thank you all.

Update: Looking at extending PyDev plugin to initialize jython run configurations with the project classpath (containers). Trying to figure out which extensions I have to depend on to get access to the .classpath file.

Update: Figured what I need to change and how. Working on it now.

Someone Else Seems to have the same problem, and may have solved it: https://github.com/Kbrowder/PyJDT

Edited: Posted Prematurely, updates


Solution

  • Turns out Someone has already written an eclipse plugin to solve this exact problem.

    The plugin is called PyJDT: https://github.com/Kbrowder/PyJDT

    Tested it on Eclipse Juno with PyDev.

    Thank you K. Browder