From: Freddie W. <fre...@ho...> - 2005-08-10 15:53:35
|
I installed the jdk (as an addition to the jre) and then went into jython/Tools/jythonc/javac.py and set in the function findDefaultJavac(), javc = 'C:\Program Files\Java\jdk1.5.0_04\bin\javac.exe'. I then type in jythonc test.py and get: Compiling .java to .class... Compiling with args: ['C:\\Program Files\\Java\\jdk1.5.0_04\bin\\javac.exe', '-c lasspath', 'C:\\Python24\\jython\\jython.jar;;.\\jpywork;;C:\\Python24\\jython\\ Tools\\jythonc;C:\\Python24\\jython\\.;C:\\Python24\\jython\\Lib;C:\\Python24\\j ython', '.\\jpywork\\test.java'] 1 java.io.IOException: CreateProcess: "C:\Program Files\Java\jdk1.5.0_0in\javac .exe" -classpath C:\Python24\jython\jython.jar;;.\jpywork;;C:\Python24\jython\To ols\jythonc;C:\Python24\jython\.;C:\Python24\jython\Lib;C:\Python24\jython .\jpy work\test.java error=123 Consider using the -C/--compiler command line switch, or setting the property python.jythonc.compiler in the registry. ERROR DURING JAVA COMPILATION... EXITING What am I doing wrong? Thank you very much for all of your help. >From: Jeff Emanuel <jem...@fr...> >To: Freddie Witherden <fre...@ho...> >Subject: Re: [Jython-users] Errors Compiling Jython >Date: Wed, 10 Aug 2005 09:31:03 -0600 >MIME-Version: 1.0 >Received: from mail.frii.com ([216.17.128.161]) by mc2-f42.hotmail.com with >Microsoft SMTPSVC(6.0.3790.211); Wed, 10 Aug 2005 08:31:13 -0700 >Received: from [192.168.0.103] (awebster90.dsl.frii.net [216.17.180.90])by >mail.frii.com (FRII) with ESMTP id 91FAF1DF036for ><fre...@ho...>; Wed, 10 Aug 2005 09:31:12 -0600 (MDT) >X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8= >User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) >X-Accept-Language: en-us, en >References: <BAY...@ph...l> >Return-Path: jem...@fr... >X-OriginalArrivalTime: 10 Aug 2005 15:31:13.0832 (UTC) >FILETIME=[8AD36A80:01C59DC0] > >You need to install the JDK (development kit) instead of >the JRE (runtime environment) to get the compiler. > > >Freddie Witherden wrote: >>I have just looked for javac.exe on my other windows xp machine which has >>jre1.5.0_04 on it and in its \bin folder I can not find a javac.exe. Both >>systems use J2SE, but does that actually make any difference? The plot >>thickens... >> >>>From: Jeff Emanuel <jem...@fr...> >>>To: Freddie Witherden <fre...@ho...> >>>Subject: Re: [Jython-users] Errors Compiling Jython >>>Date: Wed, 10 Aug 2005 09:25:18 -0600 >>>MIME-Version: 1.0 >>>Received: from mail.frii.com ([216.17.128.161]) by mc2-f9.hotmail.com >>>with Microsoft SMTPSVC(6.0.3790.211); Wed, 10 Aug 2005 08:25:28 -0700 >>>Received: from [192.168.0.103] (awebster90.dsl.frii.net >>>[216.17.180.90])by mail.frii.com (FRII) with ESMTP id B17691DF147for >>><fre...@ho...>; Wed, 10 Aug 2005 09:25:27 -0600 (MDT) >>>X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8= >>>User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) >>>X-Accept-Language: en-us, en >>>References: <BAY...@ph...l> >>>Return-Path: jem...@fr... >>>X-OriginalArrivalTime: 10 Aug 2005 15:25:28.0719 (UTC) >>>FILETIME=[BD1F59F0:01C59DBF] >>> >>>I think eclipse includes its own compiler. Re-install >>>the JDK from java.sun.com. >>> >>>Freddie Witherden wrote: >>> >>>>I have had a look for javac.exe and it does not exist, what other names >>>>does it go under? I had compiled java in the past using the eclipse >>>>environment, so I wounder what it is using. What should I do? >>>> >>>>>From: Jeff Emanuel <jem...@fr...> >>>>>To: Freddie Witherden <fre...@ho...> >>>>>CC: jyt...@li... >>>>>Subject: Re: [Jython-users] Errors Compiling Jython >>>>>Date: Wed, 10 Aug 2005 09:15:26 -0600 >>>>>MIME-Version: 1.0 >>>>>Received: from mail.frii.com ([216.17.128.162]) by mc3-f10.hotmail.com >>>>>with Microsoft SMTPSVC(6.0.3790.211); Wed, 10 Aug 2005 08:15:37 -0700 >>>>>Received: from [192.168.0.103] (awebster90.dsl.frii.net >>>>>[216.17.180.90])by mail.frii.com (FRII) with ESMTP id E219E1DE952;Wed, >>>>>10 Aug 2005 09:15:35 -0600 (MDT) >>>>>X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8= >>>>>User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) >>>>>X-Accept-Language: en-us, en >>>>>References: <BAY...@ph...l> >>>>>Return-Path: jem...@fr... >>>>>X-OriginalArrivalTime: 10 Aug 2005 15:15:37.0454 (UTC) >>>>>FILETIME=[5CB378E0:01C59DBE] >>>>> >>>>>The error message says it can't run the compiler and tells you what >>>>>it is trying to run. Does javac exist where it is looking for it? >>>>>Maybe since you are windows, it needs to be specified as javac.exe >>>>>instead of just javac. Look for javac.exe on your computer and >>>>>follow the suggestion in the error message and use the --C option >>>>>to tell jythonc where the java compiler is. >>>>> >>>>> >>>>> >>>>>Freddie Witherden wrote: >>>>> >>>>>>Hi, I have just tried to compile a simple Jython module (well if you >>>>>>can call it that). However, I go an java.io exception when it was >>>>>>compiling the java file. Here is my console output: >>>>>> >>>>>>C:\Python24\jython>jython test.py >>>>>>This is a Jython test! >>>>>>C:\Python24\jython>jythonc test.py >>>>>>processing test >>>>>> >>>>>>Required packages: >>>>>> >>>>>>Creating adapters: >>>>>> >>>>>>Creating .java files: >>>>>> test module >>>>>> >>>>>>Compiling .java to .class... >>>>>>Compiling with args: ['C:\\Program >>>>>>Files\\Java\\jre1.5.0_02\\bin\\javac', '-clas >>>>>>spath', >>>>>>'C:\\Python24\\jython\\jython.jar;;.\\jpywork;;C:\\Python24\\jython\\Too >>>>>> >>>>>>ls\\jythonc;C:\\Python24\\jython\\.;C:\\Python24\\jython\\Lib;C:\\Python24\\jyth >>>>>> >>>>>> >>>>>> >>>>>>on', '.\\jpywork\\test.java'] >>>>>>1 java.io.IOException: CreateProcess: "C:\Program >>>>>>Files\Java\jre1.5.0_02\bin\ja >>>>>>vac" -classpath >>>>>>C:\Python24\jython\jython.jar;;.\jpywork;;C:\Python24\jython\Too >>>>>>ls\jythonc;C:\Python24\jython\.;C:\Python24\jython\Lib;C:\Python24\jython >>>>>>.\jpyw >>>>>>ork\test.java error=2 >>>>>> >>>>>>Consider using the -C/--compiler command line switch, or setting >>>>>>the property python.jythonc.compiler in the registry. >>>>>>ERROR DURING JAVA COMPILATION... EXITING >>>>>> >>>>>>Sorry about the wrapping (it is my DOS console window). The test.py >>>>>>file is just: >>>>>>print 'This is a Jython test!' >>>>>>I am on Java 1.5 (or 5.0.x). I have no idea what is causing the error, >>>>>>I am on windows xp. Can anyone help (am I doing something wrong) or is >>>>>>it a bug? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>------------------------------------------------------- >>>>>>SF.Net email is Sponsored by the Better Software Conference & EXPO >>>>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>>>>Practices >>>>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing >>>>>>& QA >>>>>>Security * Process Improvement & Measurement * >>>>>>http://www.sqe.com/bsce5sf >>>>>>_______________________________________________ >>>>>>Jython-users mailing list >>>>>>Jyt...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/jython-users >>>> >>>> >>>> >>>> >> >> |