简体   繁体   中英

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.

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.

You can convert J2ME apps (jar/jad) to Android (apk) using UpOnTek's conversion services. Service includes automatic conversion, followed by optimization tips.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM