What puzzles me is, how does it come that the Python Shell plug-in for jEdit does not work with Python3? The issue seem to be known since year 2012 and apparently no one has yet provided an updated version ( http://www.jedit.org/oldtrackers/Plugin%20Feature%20Requests/3498547.html ) of this plug-in working for both Python2.x and Python3.x . Am I alone with the need of having this plug-in up an running in jEdit?
The problem is that this plug-in uses the execfile() function which is not available in Python3. In order to provide a fix it is necessary to replace in PythonShell.java code of this plugin:
execfile("filename")
with
exec( open("filename").read() )
For me who is not very familiar with Java it was very hard to get an updated PythonShell.jar out of the adjusted PyhonShell.java file. What I still fail to understand after success with fixing the problem is how to use jar. After many various approaches I came finally out with:
jar -u PythonShell.jar -C python/shell PythonShell.class
but also this gave me the same as I was getting all the time:
jar: `-u' mode requires a file name
The jar's -help was not able to help me understand what I did wrong in all my attempts to replace the PythonShell.class file in the PythonShell.jar with the new version got from compiled PythonShell.java file.
My workaround was to rename the .jar to .zip, put the PythonShell.class file into it using a File Manager and then rename it back to .jar, but I would be glad to get rid of the bad gut feeling of not understanding how the 'jar' command works.