File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Run one separate application from another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Run one separate application from another" Watch "Run one separate application from another" New topic

Run one separate application from another

Vlad Golodov
Ranch Hand

Joined: Jul 05, 2004
Posts: 50
Is it possible to run one application, which is stored in a jar file from another application, which is stored in another jar file?

1. For example, I have written a midlet and want to run a Snake game, which is usually standard game in the phone. Is that possible?

2. Another situation is when I make 2 applications, put them into Applications folder and try to run one from another.

Interrested in making that under a Nokia Series 60.

Thanks in advance,


SCJP, SCJWSD prepairing<br /><a href="" target="_blank" rel="nofollow"></a>
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

To answer both of your questions, the answer is no. MIDlets can call other MIDlets only when they are within the exact same MIDlet suite. No other times can you call an outside program like Snake. While calling Snake might be harmless, calling some other outside programs could really damage someone's phone and make the user angry. It is all for security and protection that MIDlets run in a complete sandbox on its own.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Vlad Golodov
Ranch Hand

Joined: Jul 05, 2004
Posts: 50
Thanks for the answer.

But what do you think about Push?

It seems to work in a simulator, but when I try to download an application to my mobile phone, it writes "Invalid application". Probably my phone does not like a line like a "MIDlet-Push-1: socket://:79, com.sun.example.SampleChat, * " in my jad file.

Any ideas?


Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

I've found that some phones are very fussy things. I've written applications that work just fine in the emulator, but won't load with the JAD (or at all) on a device. It's just a matter of how tolerant the device is.

Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
I agree. Here's the link:
subject: Run one separate application from another
It's not a secret anymore!