This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Run one separate application from another" Watch "Run one separate application from another" New topic
Author

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,

Vlad


SCJP, SCJWSD prepairing<br /><a href="http://www.vladgolodov.com" target="_blank" rel="nofollow">http://www.vladgolodov.com</a>
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
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?
http://jan.netcomp.monash.edu.au/internetdevices/wireless/midp2.0.html

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?

Thanks,

Vlad
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: http://aspose.com/file-tools
 
subject: Run one separate application from another