简体   繁体   中英

What's the alternative to JavaSupport when using C# to read “Java” db4o databases?

I'm working with a db4o database that was created in Java, but I'm using C#.

The code I'm using is based on an example from the Versant site

However, the Db4objects.Db4o.Config.JavaSupport class used in the example is marked as obsolete in the latest (since 8.0) versions of the db4o assemblies.

Is there a new approach when reading Java objects from a db4o database using C#? If so, can someone point me to some sample code for the new approach? I couldn't find anything when searching.

Not sure if this works, but maybe worth a try: Use IKVM.NET to run the JAVA version of db4o together with the original Java classes. That way you don't need to rely on the not supported 'JavaSupport'-stuff in db4o.

I haven't tried it, but I can imagine that it work. I already used IKVM.NET to run other non trivial Java libraries within .NET.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM