I am a student and doing research on Bitcoin. I wanted to know how mining is done but I wanted it see the some basic java code. Can some one provide me with resources? I would appreciate if some one can suggest me some libraries to look into. I checked BitcoinJ but found out that it does not support mining.


  • There are several mining clients written in Java. en.bitcoin.it/wiki/Mining_software Does one of those answer your question?
    – Nick ODell
    Commented Apr 6, 2015 at 19:03
  • @coder121: does it need to be a Java library? Which platform are you running it on? Android, per chance? Commented Apr 10, 2015 at 12:38
  • @WizardOfOzzie It should be Java. I am not running on any mobile device. I wanted to run it on my pc.
    – EmbarkPro
    Commented Apr 12, 2015 at 16:07

3 Answers 3


One of the very fist GPU miners was in java using OpenCL. It was called DiabloMiner and you can find the source here;-


It hasn't been updated the the past two years but it is still fully functional.

  • Will surely look into this.
    – EmbarkPro
    Commented Apr 15, 2015 at 18:19
  • 2019- Does not support the current protocol Commented Jun 7, 2019 at 0:44

I'm not aware of any Java mining code existing, and I would not expect it to: mining needs to be as fast as possible, so you wouldn't want to write it in a language that runs on a virtual machine.

Since the reference implementation, Bitcoin Core, stands as the ultimate documentation of the protocol, and it is written in C++, I would say that anyone doing research on Bitcoin needs at least a competent reading knowledge of C++. Once you have that, you can read the mining code in Bitcoin Core.

  • Thanks Nate. But I am not competent in C++ .Hence I am looking for something in Java.
    – EmbarkPro
    Commented Apr 15, 2015 at 18:19
  • @Coder121: My point is that I think your best bet to reaching a full understanding of this process is to learn enough C++ to read the existing code. I don't think it will be a tremendous leap if you already know Java. Commented Apr 15, 2015 at 19:42

Mining BITCOIN.. It's so easy..no matter what..Are you shocked are thrilled..? 😁

Yes it's true. Mining is searching for a packet of a particular algorithm etc., Where will it search ? Internet..and it comes from a source. So who ever create these source our mining should run on those source. The more miners from these all providers the more verification process happens..the more valid means more closer to solve a block.. So we want miners from all around the world connecting to all internet providers of this world mining under one domain..we can also call it a pool..

So development should be needed in that piece of code which allows to search for that particular algorithm. Using a simple PC with High speed internet..

All the very best.. If logic clicks .. anything is possible..here especially..lol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.