Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert jar file into apk?

I have one jar file, when I clicked that jar file, it was opened one window based application.

Now I would like to convert this jar file into apk file. That jar file having 5 class files. How can I know the initial class file? and How could I code on this in android?

Please do the needful.

Thanks in advance.

like image 343
Lavanya Avatar asked Sep 19 '13 08:09

Lavanya


1 Answers

How can I know the initial class file?

Please read http://docs.oracle.com/javase/tutorial/deployment/jar/appman.html .You should have a look at following part:

If you have an application bundled in a JAR file, you need some way to indicate which class within the JAR file is your application's entry point. You provide this information with the Main-Class header in the manifest, which has the general form:.......

Answering to your next question:

How could I code on this in android?

Import JAR file to Android Project. You can get JAR's entry point from Manifest file ( not AndroidManiefst.xml but from JAR's Manifest). However, you mentioned:

it was opened one window based application.

It looks like those 5 classes have dependencies on some different JARs which could not be available on Android platform.

like image 197
Damian Kołakowski Avatar answered Sep 21 '22 19:09

Damian Kołakowski