Pages:
Author

Topic: Using BitcoinJ in .NET (C#) - page 2. (Read 7022 times)

legendary
Activity: 1526
Merit: 1129
November 05, 2013, 06:28:07 AM
#2
I've never used IKVM, but it's the approach I've been suggesting .NET developers try for a while.

From a language/operating system perspective bitcoinj is very simple. It doesn't do anything fancy like reflection or code synthesis. I've actually successfully transpiled it to C++ (although the result didn't run due to missing runtime stubs). It should be possible to either use IKVM and convert the Java at the bytecode level, or using the tool the Mono guys developed to do a source-to-source translation of the Android sources to C#.

It looks like IKVM is as simple as running a command line tool to convert the JAR to a DLL. What I suggest you try is creating a bundled JAR that contains everything together, and then converting it to a DLL and seeing if you can re-write the ForwardingService example in C#.

To get a bundled JAR, you can just use Maven to compile bitcoinj and then grab the tools/target/bitcoinj-tools-0.11-SNAPSHOT.jar file. That JAR contains the WalletTool app which is kind of useless, but more importantly it's been processed with the "maven shade" plugin that bundles bitcoinj with all its dependencies. That's the JAR you should convert to a DLL.
hero member
Activity: 658
Merit: 500
November 04, 2013, 11:26:57 PM
#1
Hello! I'm trying to develop a Bitcoin app for the Windows Store. I'm doing this like a hobby, so in many things I'm still new to this.
I've seen that many programs use BitcoinJ, but as the name implies, it's for Java. I've found some .NET ports, but they are from 2011, so I don't think they are that reliable.
But then I found about a program called IKVM, which can convert a Java library to a .NET one.

As this is a very delicate subject (an app that handles money), I would like to ask you: Is it OK if I follow this approach? Or maybe I should manually port it to .NET? (which will take me a long time since I'm still in university)

What are your opinions?
Pages:
Jump to: