Re: Some code to share - VisADJython strikes back!


Ah, batch files= .bat files as in "autoexec.bat."  I am understanding....
Cheers, Curtis!

My last post was a _little_ melodramatic ;o)

I went and changed my classpath back to its 'non-jython.jar' settings and
got everything within 'Start->Programs->VisAD and Python' working again.'s the 'tidied up code' contribution.  To prevent it from "bombing
JVMs", I've reduced the number of deformed grids from four to two; this
version only performs two image transformations: the original image and one
'squashed' by 40%.

Hope all this helps (or at least, amuses) someone someday...

Keep happy!
----- Original Message -----
From: Tom Whittaker <tomw@xxxxxxxxxxxxx>
To: Chi-chi Ekweozor <cce100@xxxxxxxxxx>
Sent: Thursday, May 22, 2003 2:40 PM
Subject: Re: Some code to share

> Hi Chi-chi...
> Couldn't run your app -- kept bombing the JVM ;-(
> > 1) Setting the display size in showDisplay()
> The intent is that each 'display' that you add through the panel
> keyword will have it's own size set.  There is no explicit 'overall' size.
> So, if you want both 'displays' to be equal in size, then when you do
> the showDisplay() for each of them, use exactly the same values for
> height= and width= keywords.  This will work fine (until the user
> resizes the window, of course ;-)
> If you need something to set the overall size, or to make the JFrame not
> resizable, then you can modify the 'myFrame' class inside
> > 2) Errors when switching between Sim3DAudio and web browser
> What do you mean "switch to/from" the browser?  Just bringing it to the
> focus on your desktop?  If so, this looks like a Java3D bug...
> > 3) Optional extra: converting from .py to .java
> jythonc is the only thing I know to do this.  I would recommend making a
> JAR file, and using the 'core' option -- this will then put everything
> related to Jython into the JAR file.
> If you haven't seen the page at:
> <>
> I would recommend it.
> >
> > I'd like to turn Sim3DAudio into a Java app.  Yes, I know about
> > jythonc.  I've tried invoking it on (via changing
> > directory to the jythonc folder) but that didn't work.  Here comes the
> > dreaded classpath question...mine looks like this:
> > SET
> >
> > set CLASSPATH=c:\visadjython\visad.jar;.
> > Is that wrong?
> Yes.  You need to have the jython.jar in your CLASSPATH as well.  I
> always leave my CLASSPATH unset, and use the -cp (or -classpath) option
> on the command line.  For example, my script (in Win2K) to run jythonc is:
> java -mx256m -D"python.home=c:\jython-21"
> -D"python.path=.\;c:\jython-21\Lib;c:\jython-21\Tools\jythonc"
> -classpath
> "c:\jython-21\jython.jar;c:\src\visad\python;c:\src;c:\src\visad.jar"
> org.python.util.jython "\jython-21\Tools\jythonc\" %1 %2 %3 %4
> %5 %6 %7 %8 %9
> (all one line).
> >
> > How do you go about compiling a .py file that imports from other .py
> > files (as this does with into a .java file?  Is it possible to
> > turn Jython 'scripts' into .class files?  And how/where do you include
> > visad.jar....
> The 'core' option should compile everything needed.  visad.jar should be
> in the classpath, both when you compile and when you run.  Again, best
> to put the output into a JAR file.
> --
> Tom Whittaker (tomw@xxxxxxxxxxxxx)
> University of Wisconsin-Madison
> Space Science and Engineering Center
> Cooperative Institute for Meteorological Satellite Studies
> Phone/VoiceMail: 608.262.2759

Description: Binary data