ikvm
ikvm copied to clipboard
Exception Thrown when calling Date.ToString()
It seems like the System class static initializer has not been called to init the internal static member "props"?
"The type initializer for 'java.lang.Props' threw an exception." inner exception: "FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager"
Here's the stack trace:
at java.lang.System.get_props()
at java.lang.System.getProperty(String str)
at sun.security.action.GetPropertyAction.run()
at sun.security.action.GetPropertyAction.<bridge>run()
at java.security.AccessController.doPrivileged(Object , AccessControlContext , CallerID )
at java.security.AccessController.doPrivileged(PrivilegedAction pa, CallerID )
at java.util.TimeZone.setDefaultZone()
at java.util.TimeZone.getDefaultRef()
at java.util.Date.normalize()
at java.util.Date.toString()
at Java.Net.Demo.JavaTimeStamp.TimeStamp()
at Program.<Main>$(String[] args) in C:\source\repos\Java.Net.Demo\ConsoleApp1\ConsoleApp1\Program.cs:line 4
Ok,
I dug a little deeper, resolved that initial error, but I am getting other file not found exceptions, all related to mission .Net dependencies or otherwise .Net side. My little test app is .Net 6 cli, so I think this is the main issue, since this tool compiles against a much older version of .Net.
For anyone else, this issue may help:
https://github.com/jessielesbian/ikvm/issues/16
There is a link to another fork there that looks to be working on upgrading the .Net version. I am going to try that one, it should get me past my immediate issues.