Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I teach programming at the high school level and we're using python. A
local university is hosting a programming contest where the acceptable
languages are VB, java and C++. We don't know any of those languages, but
the university is still interested in having us participate even if we
can't "compete" in the contest.
I was wondering if it is possible to use jythonc to compile our python
programs which we could then submit to the normal contest judging program
in the same manner the "normal" java contestants do. The programs are all
of the form: read a datafile, process the data, write an outputfile. So
this is the python program I am experimenting with:
file = open('temp.txt','w')
file.write('This is a test')
Here's what I've done so far (but let me preface this by saying that Jython
AND Java are brand new to me, and I'll be leaving out the obviously stupid
things I tried so as to make me look smarter).
0) this is under windows XP
1) I downloaded jython, then the sun J2 SDK
2) edited the jython registry file to include the path to javac
3) tried to figure-out from http://www.jython.org/docs/jythonc.html what I
needed for options. This wasn't very successful, as I don't know enough
about java, but it looked to me like I needed to compile to .class files
and so it looked to me like -a -d or -c should work.
4) everything seemed to compile correctly, and when I look in /jpywork I
see these three files:
when I try to run either of the .class files from the command line with:
c:/program files/jython21/jpywork>java test.class
I get: Exception in thread "main" java.lang.NoClassDefFoundError:
At this point I'm stuck. Can anyone point out what I should be doing instead?