I'd like to create POJOs from a reasonably complex JSON schema that references types within itself, and the web interface has known issues doing this that are apparently fixed for offline use. I'm running on Win7, and the output from java -version
is
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
The simplest offline mechanism is CLI, so I've downloaded the current version, extracted it to a folder (no spaces in the path, though I assume that's not an issue anyway) and tried getting the help output with jsonschema2pojo --help
. I get
Exception in thread "main" java.lang.NoClassDefFoundError: org/jsonschema2pojo/GenerationConfig
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jsonschema2pojo.GenerationConfig
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)
... 6 more
I'm in the same directory as the .jar files that came out of the package. I've also tried firing the appropriate .jar directly with java -jar jsonschema2pojo-cli-0.4.13.jar --help
and get the same response. I've also tried running in an administrator shell just in case.
So at the moment it can't even start up, so there's little point trying to go further with it.
Is anyone else using this from the commandline? On Win7?