1

I've written a bare-bones class to call the Web3j ethereum library. I've added the maven dependencies and I think that is ok. I've written one line of code to check that it is working but get a strange error. When I call the static factory method 'build' on the Web3j class, Eclipse displays an error that says 'This static method of interface Web3j can only be accessed as Web3j.build'. I'm not sure what this is trying to tell me.

I've included a screenshot so you can see the method prototype and the error. Thanks to anyone who can help. I'm running Eclipse Mars and Java 1.8.

Web3j error

tommccann
  • 133
  • 1
  • 10
  • 2
    Does this help: https://stackoverflow.com/questions/33487896/eclipse-does-not-allow-access-to-static-interface-method-in-external-jar-from-an – Lorenz Jan 03 '19 at 14:08
  • Try using the latest version of the web3j core – mahfuj asif Jan 03 '19 at 15:37
  • Thank you frececroka, I switched to jre 1.8 and that did the trick. Mahfuj, I will also check out the latest version of Web3, however the Web3 'Getting Started' page suggested v3.4.0 which is what I specified in the Maven dependencies. – tommccann Jan 03 '19 at 21:33

0 Answers0