Compile from source error

I tried compiling Ardor from the source code for the first time and am presented with several errors, the first one that repeats a lot is:

src\java\com\jelurida\ardor\integration\wallet\ledger\LedgerDevice.java:20: error: package purejavahidapi does not exist
import purejavahidapi.HidDeviceInfo;

next a lot of errors about:

error: package org.json.simple does not exist
import org.json.simple.JSONObject;

I'm guessing I have to install or import something more then just java to get it to work?

How are you trying to compile? Are you using the compile.sh script?

It looks like it's not picking up the libraries from the lib folder.

Yes, I am using the compile.sh script. Maybe it has to do something with using windows?
I will try on a linux VPS later today

Also, can we use a newer version of Java then 8? The documentation says to have jdk-8

Switching to linux from windows fixed the import errors. Thank you

1 Like

The compile.sh is a shell script. To run that on Windows you would need WSL or cygwin, you can't run that directly. But it should work on those cases.

About the version the minimum required is Java 8 but you can use a newer version. Actually we lately use Java 11. Keep in mind that you will need JavaFX support if you use something other than Oracle's Java 8 as JavaFX was removed from the SDK. There are alternatives like using a JavaFX implementation (https://openjfx.io/) or an SDK that bundles JavaFX like Bellsoft's Liberica.

1 Like