Thanks Jameson, I have some code in my application for finding and/or creating an application data directory. I'm using it to create a directory for my own app and for finding the Bitcoin directory and bitcoin.conf. (I'm developing on Mac OS X)
I've already put some very crude bitcoin.conf parsing code in the RPC client project on bitcoinj-addons. When I improve it further I'll share a link. I'll probably also put the app data directory finding code there, but currently it has dependencies that aren't suited for the RPC client module. -- Sean On 5/24/16 8:19 AM, Jameson Lopp wrote: > I think the hard part will be finding the bitcoin.conf on the system, > assuming you aren't feeding its path into the app. You might be able > to use some logic like > so: > https://github.com/Blockchaintechs/StakerUI/blob/master/src/main/CommWithWallet.java#L158 > > > Though that code could use improving and probably OS X support. > > On Tue, May 24, 2016 at 5:21 AM, Sean Gilligan <[email protected] > <mailto:[email protected]>> wrote: > > Hi everyone, > > I'm looking for (and have written a quick hack solution) a Java class > that can read a `bitcoin.conf` file. Has anybody seen anything that's > fairly complete? > > The use case is a GUI or command-line app Java app that is using a > Bitcoin JSON-RPC client to talk to bitcoind. If it's running under the > same user account as the daemon, it can read the `bitcoin.conf` > file to > find the connection info for bitcoind. > > As I've mentioned before (to Mike Hearn and in the Issues DB) I'm > working on a JSON-RPC client that uses bitcoinj types that can talk to > bitcoind. I've also got some command-line tools written in Java that > could use this feature. All are available under the Apache license and > I'm willing to contribute them to bitcoinj (possibly in a separate > add-ons repo) > > So I see a class that can read `bitcoin.conf` as a useful part of that > overall solution. > > If there is nothing better out there I will improve my hack (that is > currently in my RPC client module) > > Thanks, > > Sean > > > > -- > You received this message because you are subscribed to the Google > Groups "bitcoinj" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to [email protected] > <mailto:bitcoinj%[email protected]>. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google > Groups "bitcoinj" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
