Categories:

Converting Java (J2ME) Applications to Android .apk Format

By Don Caprio on February 8, 2012

If you just got a new android phone, running java applicatons in .jar format can be a real challenge but there are lots of ways out. I previously wrote a post on how to run java applicatons on Android smartphones using an emulator but what I’m posting here is totlally different. Yes, you can convert .jar files to Android’s .apk format. Sounds impossible? Well, it can be done easily with the service of a couple of websites but I need to make a few things clear about Android applications.

how to convert .jar / .jad / java / J2ME / MIDP 2.0 applications to Android .apk format

Android .apk Files – Can they Really be Decompiled?

You’re probably not an Android developer but just an ordinary guy like me, so I’m going to keep this simple and straight.  At first, the extension Google uses for Android applications (.apk) may look complicated but it actually isn’t. Basically, an apk file is nothing but a zip archive disguised in a different extension. You think I’m joking? Just rename the .apk extension to .zip and extract the content to see exactly what I’m trying to say. Inside this zipped archive is a file named classes.dex which is the most important file in there containing all the java files. This file is encrypted but it can still be disassembled. The java classes are compiled differently so there’s need to go through some special steps to decompile them. You’re going to need these two files:

  1. Dex2Jar from http://code.google.com/p/dex2jar/
  2. A regular Java decompiler, such as JD from http://java.decompiler.free.fr

-Unzip dex2jar.

-In dex2jar directory, paste your classes.dex file.

-Open CMD, go to dex2jar durectory using cd, and type dex2jar YourApp.apk

-You will automatically get a .jar. Use jd gui to decompile it.

How to Convert .jar/.jad (J2ME/MIDP 2.0) Applications to Android .apk Format

Everything I’ve been ranting about is not the real thing you’re looking, huh? Anyways, I found two sites where you can easily convert .jar applications to .apk format and run it smoothly on your Android smartphone.

1. Netmite

This offers this service free of charge and I can tell you that their service is quite cool. You can check them out and, of course, it’s very easy to use. Just upload your java application and the jad format to get the android version! You can use JADMaker to get the .jad version of your java application.

2. Upontek

These guys too offer the same service but hey, it’s not for free. If you’re a developer, you may want to check out their service and some extras they’ve got for you.

That’s all I’ve got on converting .jar applications to Android .apk format. There may be other websites offering the same service though.



Related Posts

Posted in Android



Author: Don Caprio

Don Caprio is a full time blogger / web designer living in Nigeria and apart from blogging, my other obsession is music. I'm a self-confessed Tupac fan, an iOS lover, an Android user, a Windows 8 power user, a writer with a 5-year old unfinished novel... and the list goes on and on. You can add me on Facebook, follow my updates on Twitter or add me to your circles on ! You can as well grab my feed and get updates through email...

Post Comment

  • http://www.eblog24.tk kibria

    Hello don caprio can you tell me the process how can i run a java application on my pc on windows xp operating system. Hopefully you will.

    • Don Caprio

      I should write a blog post on it later today or tomorrow :)

  • http://www.eblog24.tk/2011/12/joikuspot-wifi-hotspot-premium-310-free.html?m=1 kibria

    Waiting for your post@ don

    • Don Caprio

      Sorry is took so long. You can check the post here.

  • http://www.eblog24.tk/2011/12/joikuspot-wifi-hotspot-premium-310-free.html?m=1 kibria

    Not so late at all. Nice job.

  • http://www.UpOnTek.com Michal Geva

    Don,

    I liked your post.

    Your understanding of UpOnTek’s service is accurate. The service is targeted at application developers that are interested in converting their apps from JavaME to Android. The service includes the ability to continue development of the app in JavaME and Android Feel free to contact me if you want additional details.

    Michal

    • Don Caprio

      Thanks for the visit, Micheal. Will definitely recommend your service and contact you if need be. Cheers.

  • http://forum4everything.blogspot.com akash

    thanks for this amazing information :)

  • http://superthingforyou.blogspot.com/ akash

    thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • Anil

    hii
    i am ur regular reader of ur blog .
    past week i encounter an problem i was playing java games but after that i install gangstar rio city of saints but it didnt get run properly. after chosing instant play on the homescreen the game stops and says that the midlet is running out of memory.
    i tried clearing data but it wont work. please help me
    my phone info is
    samsung galaxy ace gts5830i
    android version 2.3.6

    also suggest me some java game sites for my screen size
    thanks

    • http://www.doncaprio.com Don Caprio

      Hi Anil,

      Thanks for following my posts on this blog. Since the games are converted, there may be some compatibility issues once in a while. You can try sefan.ru and nokiazone.ru for more java games.

  • http://www.dapsonblog.com dapson

    I tried it and it worked. Gonna share this to my friends on FB

  • http://www.reverbnation/deeoneband dewantea

    You are briliant man…………. thank you………………………………..

  • Ankit

    What is CMD & cd, where do i find these???

    • Ankit

      okk found it

    • http://www.doncaprio.com Don Caprio

      Got to Windows Start Menu, search for CMD, it should come up. CMD is the Command Promt feature in Windows, its executable name is cmd.exe

  • http://www.suwwa.com raj kumar

    Applications to Android its good article

  • http://www.doncyber.com doncyber

    i cant wait to download this on my android mobile

  • Hossein

    Hello Don
    I found your site very helpful .
    Thank you

  • http://www.gametabletz.com Brian Johnson

    Thanks again Don for sharing this useful post for all of us here. Already saved it on my bookmark list. I think there are so many Java applications that just can’t be forgotten even though we already moved on to Android-installed phone. My favorite java game so far and i’m still playing it until now is Pro Evolution Soccer 2009. Damn, this game is brilliant, genius, awesome, amazing, incredible and insanely great. You definitely should check it out if you’re die hard soccer fan. Even though the graphics are still in cartoon, but the gameplay is TOP NOTCH!!!