ikvm

IKVM C# to Java Interop with Callback using IKVM

此生再无相见时 提交于 2019-12-03 15:15:09
问题 I've started using IKVM to translate Java libs into .NET CIL. I can successfully write a C# program that pulls in (inproc) a translated Java assembly as a reference and make calls to the translated Java code. My question is, is anyone familiar w/ how to make calls (callbacks) from Java to C# using IKVM? I've been looking for a good tutorial or explanation but haven't seen one yet. Any help is appreciated. Thanks, mj 回答1: Ladies and Gentlemen, I figured out my own question. Code first followed

IKVM C# to Java Interop with Callback using IKVM

∥☆過路亽.° 提交于 2019-12-03 03:56:16
I've started using IKVM to translate Java libs into .NET CIL. I can successfully write a C# program that pulls in (inproc) a translated Java assembly as a reference and make calls to the translated Java code. My question is, is anyone familiar w/ how to make calls (callbacks) from Java to C# using IKVM? I've been looking for a good tutorial or explanation but haven't seen one yet. Any help is appreciated. Thanks, mj Ladies and Gentlemen, I figured out my own question. Code first followed by steps. Java Class public class TestClass { private cli.CSharpLibrary.Library m_lib = null; public void

Getting java.net.MalformedURLException in MonoDeveloper

扶醉桌前 提交于 2019-12-01 21:24:53
Hey I am new to MonoDeveloper. I am trying to port libgdx code to iOS platform. My Libgdx code runs perfectly on desktop & Android phone. But when i run it on iPhone simulator with MonoDeveloper its giving me this error: Unhandled Exception: 0 iosgame [ERROR] FATAL UNHANDLED EXCEPTION: java.net.MalformedURLException: unknown protocol: file. 0x000e8932 mono_handle_exception_internal_first_pass + 3058 1 iosgame 0x000ea012 mono_handle_exception_internal + 1602 2 iosgame 0x000eab5f mono_handle_exception + 47 3 iosgame 0x0012dcb2 mono_x86_throw_exception + 306 4 ??? 0x0b73df8f 0x0 + 192143247 at

Generically read any file format and convert it to .txt format

只谈情不闲聊 提交于 2019-12-01 13:47:11
I need to make sure that the file given by the user is converted to the .txt file if contains text, before any further processing. At the moment I have a switch statement checking for the specific formats and converting from those to the .txt format. switch (extension) { case ".pdf": //Convert from .pdf to .txt file break; case ".doc": //Convert from .doc to .txt file break; default: Console.WriteLine("The file could not be converted!"); break; } The problem is, I'd need something more generic to check if the given file is .txt or if it's not but could be converted, to do so. Following L.B's

How do I make a .dll created with IKVM com visible?

爷,独闯天下 提交于 2019-11-30 08:37:09
问题 I have seen a few posts on this, but I haven't seen any solutions so far. I have a .jar file that I'm converting to a .NET DLL via IKVM. I'm trying to figure out how to make the methods in the DLL available inside the excel VBA environment. here are the details. 1.) installed IKVM & registered it's DLL's to GAC 2.) ran IKVM to create the a .net .dll (mytest.dll) ikvmc mytest.jar 3.) registered the new .dll regasm mytest.dll 4.) From here i created a VB.NET project and added mytest.dll and

Using ApacheFOP v1.0 in .NET application

自闭症网瘾萝莉.ら 提交于 2019-11-30 02:22:09
Has anyone successfully complied the Apache FOP v1.0 library to a .NET DLL? I am using the IKVM syntax found at http://onjava.com/pub/a/onjava/2004/08/18/ikvm.html ; however, the compiled DLL seems to be incomplete. For example, I cannot instantiate FopFactory object as: using org.apache.fop.apps; namespace Utils { public class PdfRender { public void Render() { FOUserAgent foUserAgent = fop.getUserAgent(); FopFactory fopFactory = FopFactory.newInstance(); } } } Clay Benoit (Courtesy of the folks on the FOP Users Group) Prerequisite: IKVM 0.44.0.5 installed. Download FOP 1.0 from http:/

Fatal Error C1083 - Cannot open include file: “windows.h”: No such file or directory

情到浓时终转凉″ 提交于 2019-11-29 07:10:27
I'm trying to get IKVM to build (see this question ) but now have encountered a problem not having to do with IKVM so I'm opening up a new question: When running nant on the IKVM directory with the Visual Studio 2008 Command Prompt (from the Start Menu), I get the following error: ikvm-native-win32: [cl] Compiling 2 files to C:\ikvm-0.36.0.11\native\Release'. [cl] jni.c [cl] os.c [cl] C:\ikvm-0.36.0.11\native\os.c(25) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory [cl] Generating Code... BUILD FAILED C:\ikvm-0.36.0.11\native\native.build(17,10): External

How do I make a .dll created with IKVM com visible?

廉价感情. 提交于 2019-11-29 06:58:35
I have seen a few posts on this, but I haven't seen any solutions so far. I have a .jar file that I'm converting to a .NET DLL via IKVM . I'm trying to figure out how to make the methods in the DLL available inside the excel VBA environment. here are the details. 1.) installed IKVM & registered it's DLL's to GAC 2.) ran IKVM to create the a .net .dll (mytest.dll) ikvmc mytest.jar 3.) registered the new .dll regasm mytest.dll 4.) From here i created a VB.NET project and added mytest.dll and IKVM.OpenJDK.Core.dll as references to the project. I am then able to access the methods within the .dll

Setting JVM parameters at runtime

让人想犯罪 __ 提交于 2019-11-28 18:42:45
Is it possible to change/modify/adding VM parameters after the JVM is already loaded (running)? If so, how can I do it? For properties you'd set via the -D flag on the command line, you want System.setProperty . For example: System.setProperty("propname", "hello world"); // ... later ... String value = System.getProperty("propname"); Update: You can't enable debugging dynamically, but you can enable debugging at startup but attach a debugger later. With the following, you can listen on port 12345 and start your program running right away (via suspend=n ). Then you can attach a debugger if/when

Setting CLASSPATH during runtime

情到浓时终转凉″ 提交于 2019-11-28 12:46:17
How do I set a CLASSPATH variable during runtime while using IKVM? I've been trying to do it by using: java.lang.System.setProperty("java.class.path", "whatever"); The class I'm calling requires a configuration file in the classpath to work - and I keep getting errors that seem to indicate that it hasn't gotten its settings. Is the way I'm trying to add variable incorrect? I was trying to do the same thing. I had some jar files compiled to a .Net dll but some of those (3rd party) jar files were trying to load their configuration files from the java classpath. I solved the problem by specifying