You Are Here:

Community: Developer Discussion Boards

#1 Old Run Java code from PyS60? - 2006-11-18, 23:42

Join Date: Nov 2006
Posts: 5
jibberia
Offline
Registered User
Hello all-

I'm trying to use semacodes (semacode.org) in a python app. The api they provide comes in the form of a java jar, which you send a filename for an image to process.

I'd love to not need to use MIDP for this app - python suits it much better, except for the semacode part.

In "normal" python, I'd use the commands library:
import commands
commands.getoutput("java -jar semacode.jar -f some_file.jpg")

Commands isn't available in PyS60. Is there an alternative?

Thanks,
Kevin
Reply With Quote

#2 Old Re: Run Java code from PyS60? - 2006-11-20, 23:09

Join Date: Nov 2006
Posts: 5
jibberia
Offline
Registered User
Begging... any ideas? Even incomplete hacks of whimsy?
Reply With Quote

#3 Old Re: Run Java code from PyS60? - 2006-11-21, 08:27

Join Date: Sep 2003
Posts: 209
Location: Finland
otsov
Offline
Regular Contributor
Quote:
Originally Posted by jibberia
Commands isn't available in PyS60. Is there an alternative?
Local sockets should work for you, see e.g. http://discussion.forum.nokia.com/fo...s+flash+python. Here is a paper ("Extending the Reach of MIDlets: how MIDlets can access native services") discussing the issue http://developer.symbian.com/main/os...midp/index.jsp.
Reply With Quote

#4 Old Re: Run Java code from PyS60? - 2006-11-22, 23:04

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Local sockets solve the problem of communicating with the Java process once it has been started, but don't help with starting the Java app.

Anyone know what you actually need to do to start a Java application? Is there some VM executable somewhere that you could run and pass the .jar to it as an argument? Python does has e32.start_exe and that has been used successfully to start a web browser from Python.
Reply With Quote

#5 Old Re: Run Java code from PyS60? - 2007-04-17, 21:42

Join Date: Mar 2007
Posts: 29
quickie
Offline
Registered User
sorry to bump this up again. has there been any progress on launching generic jar files and get their output back as a string?

cheers,
flux
Reply With Quote

#6 Old Re: Run Java code from PyS60? - 2007-04-18, 15:41

Join Date: Mar 2007
Posts: 29
quickie
Offline
Registered User
Just had a look at the pys60 sources for the start_exe method. It seems, that only the errorcode is returned back from the executed program. So without modifying semacode.jar to support e.g. sockets, i can't see a way to do it.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Help : Unable run more than one JAVA Apps on N80, 6680, 6681 ... 6630 lionel_lhf Mobile Java Tools & SDKs 0 2006-06-09 05:03
Java Source Code for Guidelines for Game Developers Using Nokia Java MIDP­ 1.0 Device edmund66 Mobile Java General 0 2004-09-15 12:46
Testing HTTP client for Nokia 3650; Looking to share code nawkboy Symbian Networking & Messaging 2 2003-09-10 16:30
Will J2ME apps run on all Java enabled phones? theAntSki Mobile Java General 1 2002-08-06 20:46

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia