I've downloaded command line tool for generating smart contract wrapper.I put my compiled contract into out folder near web3j.bat file.However when I run this command web3j solidity generate ./out/test_sol_TestToken.bin ./out/test_sol_TestToken.abi -o D:\android_dev\projects\eth_test\app\src\main\java -p test.user
I got this error

D:\Desktop\web3\bin>web3j solidity generate ./out/test_sol_TestToken.bin ./out/t
est_sol_TestToken.abi -o D:\android_dev\projects\eth_test\app\src\main\java -p t
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/web3j/con
sole/Runner : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

It looks like I have incorrect jdk version. I tried to add system env variable JAVA_HOME=C:\Program Files (x86)\Java\jre7 with no luck.Can someone point me which jdk version web3j requires?


Looks like web3 requires jre8+.It created wrapper class after I updated jre and changed JAVA_HOME

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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