How to run little java programs in MobileTerminal

Here is a new little tutorial that shows you how to run littles Java programs in MobileTerminal.

Needed for this tutorial :

  • A jailbroken iDevice
  • MobileTerminal installed on it

First, go in Cydia. Be sure to have the developer “profile” turned on (Manage –>; Settings –>; Developer). Now, you have to search this :

  • iPhone/Java (it will install others needed packages).
  • Jikes.



Just install these packages. Now, you have to do a Java file. For example, you can just type this in the file (name it in this case) :

public class test{
public static void main (String args[]){
System.out.println("Hello World!");

You can do it on your iDevice if you have iFile or any other file manager or you can do it on your computer and then transfer it with iFunBox (in this tutorial, I put the file in /var/mobile).

Now that you’ve made all what is written, open MobileTerminal. Type jikes -cp /usr/lib/rt.jar (or the


Type on the “return” button. You have now to type java test (or the_name_of_your_file), just type one more time on the “return” button, wait a bit and it will show the message 🙂 .


If you have any tip or problem, you can post a comment 😉 .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s