Re: Package.getImplementationVersion

Eric Pederson <[email protected]>
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <CALEPPW8Ov9gNT_SLWS8NkYA=7=1zRd=N4yJ5dt5h9gTVZZ0W-w@mail.gmail.com>
Whoops - my bad, sorry about not posting the repro.  I am assuming you mean
attach to the email?  If not please let me know.

The repro is attached as file ptest.zip.  Inside, the file "b" is the build
script:

#!/bin/sh
export
PATH="C:\work\KozoExcel\Dependencies\net.ikvm\ikvmbin\ikvm-7.2.4630.5\bin:"$PATH

echo Compiling
javac p/*.java
javac p2/*.java

echo Creating JARs
jar cfvm p.jar MANIFEST.MF p/CCTest.class
jar cfv p2.jar p2

echo Creating DLL
ikvmc -target:library -out:ptest.dll p2.jar p.jar      # This fails
#ikvmc -target:library -out:ptest.dll p.jar p2.jar     # This works as
expected

echo Creating test.exe
ikvmc -out:test.exe p/CCMain.class -r:ptest.dll

echo Running test.exe
./test.exe


When run as is, the output is (incorrect):

class: class p.CCTest

package: package p

getImplementationVersion: null

getImplementationTitle: null

getImplementationVendor: null

getSpecificationVersion: null

getSpecificationTitle: null

getSpecificationVendor: null



When you switch the commented lines the output is (correct, from the p.jar
manifest):

class: class p.CCTest

package: package p, Kozo Function Client Library, version 1.3.15-SNAPSHOT

getImplementationVersion: function-clientlibrary-1.3.15-SNAPSHOT

getImplementationTitle: Kozo Function Client Library

getImplementationVendor: null

getSpecificationVersion: 1.3.15-SNAPSHOT

getSpecificationTitle: Kozo Function Client Library

getSpecificationVendor: null


Thanks,


-- Eric


On Tue, Feb 18, 2014 at 12:17 PM, Eric Pederson <[email protected]> wrote:

> Hi Jeroen - I just wanted to follow up on this.  It looks like a bug?
>
> Thanks,
>
>
> -- Eric
>
>
> On Tue, Feb 11, 2014 at 1:17 PM, Eric Pederson <[email protected]> wrote:
>
>> Hi Jeroen:
>>
>> Per your instructions I created a small test case.   If I create a DLL
>> with just the jar that has the class that I am calling
>> getClass().getPackage().getImplementationVersion() on, then it works fine.
>>  However, if the DLL is created with a number of jars, then it uses the
>> information from the manifest of the first jar.  For example the DLL is
>> created with:
>>
>> ikvmc -target:library -out:MyLib.dll -version:3.2.1 -sharedclassloader
>> jar1.jar jar2.jar jar3.jar
>>
>> it will always use the information from the manifest of jar1.jar, even if
>> the class in question is from jar2.jar.
>>
>> Thanks,
>>
>>
>> -- Eric
>>
>>
>> On Tue, Feb 11, 2014 at 2:52 AM, Jeroen Frijters <[email protected]>wrote:
>>
>>> Hi Eric,
>>>
>>> After you create the dll you can create an exe from a small Java class
>>> that prints the package info. Compile the test class like this:
>>>
>>> ikvmc -out:test.exe Test.class -r:MyLibrary.dll
>>>
>>> Regards,
>>> Jeroen
>>>
>>> > -----Original Message-----
>>> > From: Eric Pederson [mailto:[email protected]]
>>> > Sent: Monday, February 10, 2014 19:10
>>> > To: Jeroen Frijters
>>> > Subject: Re: [Ikvm-developers] Package.getImplementationVersion
>>> >
>>> > Hi Jeroen:
>>> >
>>> > What's the best way to create a small repro?  I'm a Java guy and I
>>> don't
>>> > know the best way to do this.  The project that I'm working on is a
>>> > Excel .XLL addin.  I can create a small DLL based on a small jar using
>>> > ikvmc - how would I test that DLL?
>>> >
>>> > In the meantime, here's some more clues - the other package.getXXX
>>> > methods also return values that aren't the same as the manifest for the
>>> > jar that contains the class:
>>> >
>>> >
>>> > getImplementationVersion: 1.1
>>> >
>>> > getImplementationTitle: Sun Java System Application Server
>>> >
>>> > getImplementationVendor: Sun Microsystems, Inc.
>>> >
>>> > getSpecificationVersion: 1.1
>>> >
>>> > getSpecificationTitle: JavaBeans(TM) Activation Framework Specification
>>> >
>>> > getSpecificationVendor: Sun Microsystems, Inc.
>>> >
>>> >
>>> >
>>> >
>>> > Thanks!
>>> >
>>> >
>>> >
>>> > -- Eric
>>> >
>>> >
>>> >
>>> > On Sun, Feb 9, 2014 at 5:56 AM, Jeroen Frijters <[email protected]
>>> > <mailto:[email protected]> > wrote:
>>> >
>>> >
>>> >       Please post a (small) repro.
>>> >
>>> >
>>> >       > -----Original Message-----
>>> >       > From: Eric Pederson [mailto:[email protected]
>>> > <mailto:[email protected]> ]
>>> >       > Sent: Saturday, February 8, 2014 1:36
>>> >       > To: [email protected] <mailto:ikvm-
>>> > [email protected]>
>>> >       > Subject: [Ikvm-developers] Package.getImplementationVersion
>>> >       >
>>> >       > Hi all:
>>> >       >
>>> >       > this.getClass.getPackage.getImplementationVersion returns "1.1"
>>> > instead
>>> >       > of the string in the MANIFEST.MF using a DLL built with ikvmc
>>> >       > 7.2.4630.5.  I saw in mailing list post that 7.1 should support
>>> > it.
>>> >       >
>>> >       > Please advise, thanks!
>>> >       >
>>> >       >
>>> >       > -- Eric
>>> >
>>> >
>>> >
>>>
>>>
>>
>

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
ptest.zip (application/zip, 1.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.