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

Paul Chambre <[email protected]> Thu, 10 Nov 2016 15:30:00 -0700
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <CAJwVo5EUjE6xAxMtonp_veY_GRtsZtAc17wtaM26VxfExCYR0A@mail.gmail.com>
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