From: Robert W. B. <rb...@di...> - 2001-10-17 02:17:56
|
Hello Hubert, On Tue, 16 Oct 2001, Hubert Yoshizaki wrote: > Two question. > When I compile by doing a > jythonc tryJythonSample.py > I get the following. > > processing tryJythonSample > > Required packages: > =A0 java.lang > > Creating adapters: > > Creating .java files: > =A0 tryJythonSample module > =A0=A0=A0 tryJythonSample extends java.lang.Object > > Compiling .java to .class... > Compiling with args: ['C:\\jdk1.3.1\\bin\\javac', '-classpath', 'C:\\jy= thon-2.0\ > \jython.jar;;c:\\JSDK2.0\\bin;c:\\jdk1.3\\bin;c:\\j2sdkee1.2.1\\bin;c:\= \jython-2 > .0;.\\jpywork;;C:\\jython-2.0\\Tools\\jythonc;C:\\Hubert\\Work\\Project= s\\tryJyt > hon\\.;C:\\jython-2.0\\Lib;C:\\jython-2.0', '.\\jpywork\\tryJythonSampl= e.java'] > 0=A0 Note: Some input files use or override a deprecated API. > Note: Recompile with -deprecation for details. > > Note the last line. Wondering why this came out I did the following. jythonc generates a .java file that ends up containing methods marked as deprecated in newer JVMs, The message is just a warning about that and is otherwise insignificant. > C:\Hubert\Work\Projects\tryJython>jythonc -deprecation tryJythonSample.= py > Usage: jpythonc [options] [module]* > > where options include: > > =A0 --package package > =A0 -p package > =A0=A0=A0=A0=A0 put all compiled code into the named Java package > . > . > . > <snip> > > option -e not recognized > > > Is this a warning coming from jython or java? jythonc issues this message. -deprecation is not a jythonc option, it is instead a javac option. Jythonc rightly gives up when it encounters unknown switches. > I'm presuming java. Am I wrong? see above. > And if this is java, then how can you turn on the option when using jyt= honc? jythonc allows specifying compiler options with the -J switch. In other words, you just add a -J before any java compiler options. Try: jythonc -J -deprecation tryJythonSample.py -robert |