EntryPointNotFound Exception w/ DLL and Mono

I am using some of the IKVM/Mono ( Redirecting… ) stuff and trying to get the Java implementation to work. In doing so, I have converted a simple Java class to a .dll using the compile tool provided.

I have created a C# script that imports the .dll and am trying to access one of the methods in there.

What I keep getting is EntryPointNotFound Exception everytime I call the method and no other errors.

Does anyone have any idea on what may be causing this (below is the C#)?

using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;


public class JavaTest : MonoBehaviour {
	
	[DllImport ("MonoTest")]
	public static extern int testMethod();
	
	// Use this for initialization
	public void Update () {
		
		int status = testMethod();
		print( "printing the Java value: " + status );
	}
	
}

Thanks in advance for help and insight. :slight_smile:

Regards,

– Clint

I don’t quite understand what the DLlImport[MonoTest] is supposed to do. If you are dropping the dll into the project folder you can just access the classes exposed in it.

Does the DLL by chance use C++ to wrap the Java in C#? If it does, this is causing the problem.