Re: OpenJDK version corresponding to IKVM's internal Java class library
Richard Callahan <[email protected]> Wed, 4 Nov 2015 05:27:04 +0000
| Newsgroups | gmane.comp.java.ikvm.devel |
|---|---|
| Message-ID | <BLUPR0501MB1730AEE8A552B5BDA9EA7CDFB62A0@BLUPR0501MB1730.namprd05.prod.outlook.com> |
Hi, Thanks very much! First, I totally agree that IKVM is a really useful tool and that it's only more powerful because of the backward compatibility of Java. That said, let me push back a little on your response to my previous part a) to make sure I understand some of IKVM's limitations. The reason that Java compilers are configured to accept compliance levels as part of their settings is that some features of Java are in fact not supported in later versions. Thus, in Eclipse, to compile an application containing functions specific to Java 6 using JRE 7, the compiler would need its compliance level set to 1.6. What I'm confused about is, suppose that today I have a JAR file containing Java 6 classes, some of which are specific to Java 1.6 and are not supported by Java 1.7. If I try to convert the file using IKVM 7 - which uses the OpenJDK 7 DLL libraries - then... d) Will I fail to convert the classes that are specific to Java 6? e) Can I get around the problem by first attempting to convert the Java 6 JDK libraries to DLL files and referencing them if IKVMC 7 throws a "class not found" warning? f) And as a last resort, could I get around the problem by using IKVM 6 (or whatever version bundles DLLs corresponding to OpenJDK 6) to perform the conversion? If the answer to the first and last question are both "yes," then I think it would be quite useful to have a table somewhere listing, for versions of IKVM previous to 7, what versions of OpenJDK are bundled with the application. (By the way, I totally understand that if I'm going to start converting JAR files with old versions of IKVM and find bugs, there's no guarantee that they'll ever be fixed and that's reasonable. That's part of the motivation for asking e).) >From your response to c) I can't tell if the workaround I suggested would work - sounds like I'd just have to try and see? By no means is any of this a criticism of your great technology, I'd just like to know how to better use it. Thanks for your time as I'm asking all these questions! I hope this is helping everyone reading the forum, it's sure helping me. Cheers, Richard From: Jeroen Frijters [mailto:[email protected]] Sent: Tuesday, November 3, 2015 10:37 PM To: Richard Callahan <[email protected]>; [email protected] Subject: RE: [Ikvm-developers] OpenJDK version corresponding to IKVM's internal Java class library Hi, a) Since IKVM 7 the major version matches the major Java version. Java is generally very good at backward compatibility, so you should be able to convert and run 1.5 jars with IKVM 8 just fine. b) Except for IKVM.OpenJDK.Tools.dll, all IKVM.OpenJDK.*.dll files are on the boot classpath. c) There are some missing parts in the class library (not the language). If you try to use them, you'll probably get some exception. There are also parts that are implemented but not "supported" (i.e. if you find a bug there is no guarantee I'll try to fix it). I hope this helps. Regards, Jeroen From: Richard Callahan [mailto:[email protected]] Sent: Tuesday, November 3, 2015 15:11 To: [email protected]<mailto:[email protected]> Subject: [Ikvm-developers] OpenJDK version corresponding to IKVM's internal Java class library Hi, Here's my second question (of three) today. First, thanks again to Mr. Frijters for a great tool!! Back in August I posted a bug report, and in responding to it<http://sourceforge.net/p/ikvm/bugs/303/#6b08> Mr. Frijters pointed out that it's unwise to attempt to compile a JAR file that's part of the JDK and reference it as a dependency, because as he puts it, "IKVM comes with its own Java class library and you can't mix in another one." I just wanted to follow up about that, because I'm very much a newbie with respect to understanding what is going on under the hood of IKVM. Searching the forums for other posts concerning this topic hasn't uncovered much for me, but I did take a look at the internals of some of the DLL files in the /bin directory of ikvm-7.2.4630.5, and it looks like indeed many classes from OpenJDK are there in the form of DLL files. This question has two small parts to make sure I understand this correctly: a) I can't tell, by opening up these DLL files, what version of OpenJDK they were compiled from. Does the major version number for IKVM match to the version of OpenJDK that it uses? (So IKVM 8 uses OpenJDK 8, IKVM 5 uses the OpenJDK associated with Java 1.5, etc.?) If so, does that mean that if I want to convert a Java application that has its compliance level set to 1.5 in Eclipse to a DLL file while referencing JDK classes, I have to use IKVM 5 for the conversion? Or can I use a later version of IKVM? (I know I have to use IKVM 8 to convert JAR libraries compiled using Java 1.8.) b) I'm assuming that the files in IKVM's /bin directory are on IKVM's class path when IKVMC is converting JAR files to DLL files. Does that mean that any class that's in a library file that is part of the Open JDK internal JAR libraries is part of this directory? If not, how do I know what's already on the IKVM classpath and what JDK JAR file I have to attempt to convert to a DLL file before referencing it? c) I saw in the limitations page<http://sourceforge.net/p/ikvm/wiki/Limits/> for this project that there are some Java language features that IKVM currently does not support. This might be naïve for me to ask, but what happens if I try to take one of those features contained in an OpenJDK JAR library, convert the JAR file to a DLL file, and reference it as a dependency in a call to IKVMC? Would something crash and burn or is that feasible? (Something tells me this is a newbie question, or that would be recommended in the FAQ.) If the answer to some of this is "look at some comments in the source code," that's fair and perhaps a pointer to the right section might help the forum readers. Thanks again for such a great piece of software! Best, Richard ------------------------------------------------------------------------------ _______________________________________________ Ikvm-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ikvm-developers