The legendary ikvm. Net-makes your. net more than just. net

Source: Internet
Author: User

I encountered a technical blind spot and had to deal with some files in the Android Application Package APK, but that stuff was written in great Java after all. I can only look at Baidu to see if there are any great Java code that can run on us.. NET platform. result: ikvm is encountered. net!

After reading a lot of articles, the search engine searched a lot and called "in.. NET platform to run the Java program-ikvm. net entry "found that it is not suitable for beginners (maybe I have no time to take a closer look, haha ). if you are interested, read it.

Ikvm. Net is a powerful tool that includes the. NET implementation of a Java Virtual Machine and the. NET implementation of a Java class library. It is said that the new version now supports jdk1.6.
What do not say, first on the official website address: http://www.ikvm.net/want to download the new version to go to the inside to find, I believe that e files are better than me, haha.

I did not study this tool in depth, but I just made a simple application. I still have to understand the strength of this tool.

Ikvm.netcontains a tool named --ikvmc.exe (this tool runs in the msdos environment and cannot be clicked directly !)
This tool can convert the JAR file of the package to the EXE executable file of Windows or the DLL dynamic library file. Of course, it depends on how the jar package works and whether the main function exists.
Let's talk about the order.
1. Get the jar package first (the previous tasks are all great Java tasks, but the younger brother doesn't quite understand it ).
2. Open the console and go to the directory where you decompress ikvm. net.
3. Enter the command to convert the jar package. The command is as follows:
Ikvmc.exe c: \ test. jar-out: C: \ test.exe-target: exe
Parameter description: C: \ test. jar is the original JAR file. -Out: C: \ test.exe is the file to be converted to.-Out represents the output, and c: \ test.exe represents the file to be generated and the path. -Target: EXE is the type of conversion. If you want to convert it to DLL, you should write it as-target: Library, of course, the suffix of the file generated in the-out parameter should be DLL.

4. The key step has passed. The following is the final work. We will call it in. net.
Many articles on the Internet have introduced ikvm.. Net XXXX. DLL is referenced in the project together with the self-generated DLL. I do not agree with this statement, but may be omitted or redundant. the recommended method is to first create a console Program (this lightweight program can do anything), then reference the DLL file generated in step 3, compile, report an error, and add ikvm.. net.
After successful execution, you can see java. Lang and other namespaces in the using or import at the top of your. Net program. What should I do next? I believe you know, haha.

Note that ikvm is used.. net, Java and. net only some basic data types can be connected, such as int and string. The types of complex points cannot be universal, otherwise, the Java code cannot match. net code mixed up!

A bunch of nonsense, in fact, just step on the top of the pool, haha. I wish you more and more java and. Net Technologies x ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.