jython and swing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nandan

    #1

    jython and swing

    hello, can I ask a jython question here?

    when I use the jython interpreter I have no problem with the statement:

    from java import lang
    from javax import swing

    but when I put this in a script, I get a package not found error.
    what am I doing wrong?

    the script header is #!/bin/env jython

    --
    Nandan Bagchee
    Ohio State University
    lastname@cse.oh iodashstate.edu

  • Rick Holbert

    #2
    Re: jython and swing

    Could it have something to do with your PATH or CLASSPATH settings?

    Here's a test script that works for me:

    #!/usr/bin/env jython

    from java import lang
    from javax import swing

    print "lang attributes: "

    for attr in dir(lang):
    print "\t%s" % attr

    print
    print "swing attributes: "

    for attr in dir(swing):
    print "\t%s" % attr

    print
    print "Good Bye!"

    Note: both #!/usr/bin/env jython and #!/bin/env jython seem to work on the
    OSU stdsun system...

    Nandan wrote:
    [color=blue]
    > hello, can I ask a jython question here?
    >
    > when I use the jython interpreter I have no problem with the statement:
    >
    > from java import lang
    > from javax import swing
    >
    > but when I put this in a script, I get a package not found error.
    > what am I doing wrong?
    >
    > the script header is #!/bin/env jython
    >
    > --
    > Nandan Bagchee
    > Ohio State University
    > lastname@cse.oh iodashstate.edu[/color]

    Comment

    Working...