Andi Vajda <[email protected]> wrote:
> Note that that javac in setup.py is only used to compile the couple of
> java classes used by JCC itself under the java directory tree. JCC
> does not compile your own java code.
Yes, that's why I was mystified.
> If you're on Windows, maybe your registry trick is biting ? javac is
> using one VM, your registry trick is picking up another later.
No, I'm on OS X now :-).
> If you're elsewhere, a possible error is using Java 5 over Java 6 or
> vice versa or maybe 64-bit vs 32-bit, I'm not sure. One way to know
> what version of bytecode your using is to request it via the javac
> -target flag. This is why, on darwin, I hardcoded the -target flag to
> 1.5 in JCC's setup.py.
Yes, once I set "-target 1.5 -source 1.5" in the compilation of
GoodStuff, it helped. The java compile went just as before, but now
running JCC on it produced a different error:
% python -m jcc.__main__ --build --jar GoodStuff.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
java/util/NavigableSet
Traceback (most recent call last):
File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/runpy.py",
line 95, in run_module
filename, loader, alter_sys)
File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/runpy.py",
line 52, in _run_module_code
mod_name, mod_fname, mod_loader)
File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/runpy.py",
line 32, in _run_code
exec code in run_globals
File
"/Library/Python/2.5/site-packages/JCC-2.4.1-py2.5-macosx-10.5-i386.egg/jcc/__main__.py",
line 88, in <module>
cpp.jcc(sys.argv)
File
"/Library/Python/2.5/site-packages/JCC-2.4.1-py2.5-macosx-10.5-i386.egg/jcc/cpp.py",
line 409, in jcc
cls = findClass(className.replace('.', '/'))
jcc.cpp.JavaError: java.lang.NoClassDefFoundError: java/util/NavigableSet
Java stacktrace:
java.lang.NoClassDefFoundError: java/util/NavigableSet
%
Which nailed it down pretty well.
Bill