Re: java -jar works, but ikvm -jar fails to find dependencies

Paul Chambre <[email protected]> Thu, 10 Nov 2016 16:22:51 -0700
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <CAJwVo5GwzvD5Zaq2AafyNs-0qAOCmRJUFbL0uvU0F59G7PtRQQ@mail.gmail.com>
It's a noob issue. I didn't realize that ikvmc doesn't evaluate dependency
jars and can't use them at runtime. The problem now is that I have like 60
jars that my app seems to depend on, and, if I pass them all into ikvmc, it
exceeds the limits of the zip library.

In this case, though, it was complaining about log4j, and, after I added
the log4j jar file, I got a version that moves on to throwing an exception
at the next missing jar file...

On the other hand, if create dlls for each of my dependency jar files, and
add references to those in my C# app, will that work as well?

On Thu, Nov 10, 2016 at 4:08 PM, Volker Berlin <[email protected]
> wrote:

> Which exception occur? I can not see it in your stack.
>
> Volker
>
> Am 10.11.2016 um 23:30 schrieb Paul Chambre:
>
> I modified the call to skip out if the java.vendor property doesn't start
> with "Oracle". That allows my jar to run under ikvm.
>
> In C#, though, it still fails to load. I get what looks like a partial
> stack trace:
>
> The type initializer for 'com.walleyetrading.common.service.ServiceFactoryImpl'
> threw an exception.
> at irisnet.Solution..ctor()   at com.illumon.integrations.
> common.IrisDbGroovySession..ctor(String description, Boolean
> initializeStandaloneClientServices)   at com.illumon.integrations.
> common.IrisDbGroovySession.initializeStandaloneClientServices()   at
> com.walleyetrading.common.service.ServiceFactory.setServiceProfile(String
> profileName)   at com.walleyetrading.common.service.ServiceFactory.getFactoryInstance()
> at com.walleyetrading.common.service.ServiceFactoryImpl..
> ctor()org.apache.log4j.LoggerThe type initializer for
> 'com.walleyetrading.common.service.ServiceFactoryImpl' threw an exception.
>
> Thanks again for the help,
> Paul
>
> On Thu, Nov 10, 2016 at 1:49 PM, Paul Chambre <[email protected]>
> wrote:
>
>> Our application, so far, is specific to one Java implementation. In this
>> case, we're calling into the selectors to modify their fields collections
>> to reduce garbage generated by the selectors' iterators.
>>
>> Is there something I can look at at runtime, like java.vendor, to
>> distinguish that I'm running under ikvm and maybe skip this (and probably
>> other) optimizations?
>>
>> On Thu, Nov 10, 2016 at 1:31 PM, Volker Berlin <
>> [email protected]> wrote:
>>
>>> Hi Paul,
>>>
>>> Why you call this? This is specific to one Java implementation. This is
>>> a private class of the Oracle JDK. This will not work with IKVM. IKVM use
>>> the implementation of the .NET framework for IO operations.
>>>
>>> Volker
>>>
>>>
>>> The odd thing is that, shortly before the failing call, we call:
>>>
>>> Class<?> selectorImplClass=Class.forName("sun.nio.ch.SelectorImpl");
>>> Require.instanceOf(selector, "selector", selectorImplClass);
>>>
>>> and that suceeeds.
>>>
>>> ------------------------------------------------------------------------------
>>> Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon
>>> Phi processor-based developer platforms. With one year of Intel Parallel
>>> Studio XE. Training and support from Colfax. Order your platform today.
>>> http://sdm.link/xeonphi _______________________________________________
>>> Ikvm-developers mailing list [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>>
>> --
>> Paul Chambre
>> Senior Solutions Architect
>> (719) 465-6097
>> Illumon - Big Value From Big Data
>>
> --
> Paul Chambre
> Senior Solutions Architect
> (719) 465-6097
> Illumon - Big Value From Big Data
>
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Ikvm-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>
>


-- 
Paul Chambre

Senior Solutions Architect
(719) 465-6097

Illumon - Big Value From Big Data

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers