My friend asked me: if the corresponding JAD file is generated based on jar, he said that some games that require installation on mobile phones must have Jad files.
To be honest, I don't know much about this. I searched it and found a friend on the Internet wrote
Jar is something of Java, so it is supported by class libraries. Of course.
And C # how to do it?
According to Google's content, the JAD file is the manifest. MF file in the jar package appended with MIDlet-jar-size: and MIDlet-jar-URL:
After learning about this, our current task is to obtain the manifest. MF file. We know that jar can be decompressed using WinRAR.
If we uncompress the JAR file, everything will be okay.
So our task becomes how to decompress the jar
Simply call WinRAR, which is convenient. At the same time, WinRAR has a high penetration rate, so you don't have to worry about not installing WinRAR.
Decompress the manifest. MF file to a temporary directory and delete it after reading the file. Do not leave garbage in your computer.
After reading the data, write a copy of the content appended with MIDlet-jar-size: and MIDlet-jar-URL :.
I have encapsulated this idea.
You can directly download and use:/files/Suyuan/jadmakerhelper.rar
The call is very simple. First, you can reference this DLL in your project and then call it like this.
Using System;
Using System. Collections. Generic;
Using System. text;
Using Jadmakerhelper;
Namespace Test
{
Class Program
{
Static Void Main ( String [] ARGs)
{
Jadmakerhelper Jad = New Jadmakerhelper ( @" D :\ " , " Cangwuji. Jar " );
Jad. createjad ();
}
}
} // Generate the JAD file and your jar file together. If there is a problem, please mail the suyuan19@qq.com
Java version see here http://www.knowsky.com/362909.html