Questions tagged [jython]

Jython is an open-source implementation of the Python programming language in Java. Use this tag for questions specific to this implementation, general Python questions should just be tagged with "python".

Jython is an open-source implementation of the Python programming language written in Java. It is seamlessly integrated with Java, in that it can import and use any Java class. Jython is extensively used as a official scripting language for all WebLogic Server administration tasks.

Jython is also used for administrative scripting for IBM's WebSphere Application Server through the Wsadmin client.

Helpful References

2784 questions
5
votes
1 answer

Can threads switch CPUs?

At my workplace there is a shared powerful 24-core server on which we run our jobs. To utilize full power of the multi-core CPU I wrote a multi-threaded version of a long-running program such that 24 threads are run on each core simultaneously (via…
abhinavkulkarni
  • 2,284
  • 4
  • 36
  • 54
5
votes
4 answers

Developing Eclipse plugins without Java

Is it possible to create Eclipse plugins/program Eclipse RCP apps without Java? (preferably in Jython)
Imran
  • 87,203
  • 23
  • 98
  • 131
5
votes
1 answer

Jython does not load PYTHONPATH into sys.path

According to what I've read, sys.path should be set by PYTHONPATH. In Python, it works that way, but not in Jython. I can circumvent with -Dpython.path=... but I'd like to know why Jython isn't playing…
TravisThomas
  • 611
  • 1
  • 8
  • 21
5
votes
1 answer

ImportError of standard Python modules with Jython (in JAR file)

I have implemented a Java application that includes Jython to run Python scripts. When I run that application from the IDE (Eclipse or IDEA), then all works fine, the Python scripts are processed correctly. However, when I package everything into a…
Matthias
  • 9,817
  • 14
  • 66
  • 125
5
votes
0 answers

Is it possible to create a python vitualenv using a standalone jython jar as EXE?

I know jython can be used as the python interpreter for a virtualenv. Simple as: virtualenv -p /usr/local/bin/jython jython-env --no-site-packages Let's say I didn't want to install jython at all but instead use a standalone jar as the python…
bnjmn
  • 4,508
  • 4
  • 37
  • 52
5
votes
2 answers

How can I install jython on Windows 7?

I have downloaded "jython-installer-2.7-b1.jar". I want to install it on Windows 7. What are the steps can I follow? Please guide me.
Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
5
votes
2 answers

AttributeError when accessing member of Java class in Jython

I am trying to import my own java class into some jython code. I compiled my .java to a .class file and put the .class file into a .jar. I then include this .jar file using -Dpython.path="path/to/jar/my.jar". So far so good, no complaints when…
user2144763
  • 53
  • 1
  • 4
5
votes
0 answers

Jython Remote debugging Intellij Idea, using Pycharm plugin

Before marking this as a duplicate please read the full thread OS - Windows XP Primary Language - Java Scripting Language - Jython IDE - Intellij Idea Python Plugin - Pycharm I am trying to remote debug my…
Bhushan
  • 2,256
  • 3
  • 22
  • 28
5
votes
1 answer

Javaw still creates a console window; Why is this?

My game engine's a combination of Jython and Java so I'm executing a jar along with a python script instead of a classfile. java -jar Jython.jar init.py However, when I change "java" to "javaw" it does not hide the console like it normally would.…
Luft
  • 185
  • 4
  • 17
5
votes
2 answers

Mismatched input 'result expecting RPAREN: While running jython script

I have been trying to run a jython script which installs a package and opens a activity and then takes its screen shot and finally saves it in a File. I am using the following Code to do this: from com.android.monkeyrunner import MonkeyRunner,…
Rohit Jindal
  • 679
  • 1
  • 10
  • 21
5
votes
1 answer

Importing Python modules in Jython WITHOUT MODIFICATION

Before someone starts ranting: I have already gone through several similar questions on numerous forums, but they do NOT answer my question effectively. Now to the question: Although Java has always been my preferred language, the last few weeks…
divs1210
  • 690
  • 1
  • 8
  • 16
5
votes
1 answer

using enums in jython

Trying to use a Java Enum in Jython but I can't figure out how to use them. when importing I see the enum listed as BotInterface$MOVE so I've put down the line from amazebot2012.BotInterface import MOVE In Java I would normally just use it…
Nebri
  • 773
  • 2
  • 8
  • 21
5
votes
1 answer

Jython AttributeError: read-only attr

I am trying to write a program about a .py extend a java interface, just like an example on IBM developerworks. But I got a problem like: AttributeError: read-only attr: cardID But the strange thing is if I rename the cardID to cardNum,it works.…
5
votes
1 answer

In Jython, can I make an inline anonymous class that implements a Java interface?

In Java, I can say Thread t = new Thread(){ public void run(){ // do stuff } } (or something much like that) to declare an anonymous class inline. This is most useful for making event handlers or other callback sorts of things, that in any…
Coderer
  • 25,844
  • 28
  • 99
  • 154
5
votes
2 answers

Jython override method with same name

I saw a similar problem occurred on JRuby back in 2010 when we would try to override in Jruby a method that was overloaded orginally on the java source code. How do we deal with this in Jython? More specifically, how can i specify for one of the…