KilianB / JImageHash

Perceptual image hashing library used to match similar images
MIT License
397 stars 80 forks source link

Cannot find dependencies #66

Open sksamuel opened 2 years ago

sksamuel commented 2 years ago

JDK 17, cannot get this to work due to missing javafx deps java.lang.ClassNotFoundException: javafx.scene.image.Image Can't even find where these are.

Trying to import: api("org.openjfx:javafx-fxml:11.0.2") api("org.openjfx:javafx-web:11.0.2")

Just brings back empty jars.

dcrough-ownum commented 2 years ago

Perhaps this is helpful? https://stackoverflow.com/questions/69965469/why-does-javafx-not-work-under-openjdk-17-from-homebrew

auszig commented 2 years ago

I ran into this issue as well just now. I was able to solve it thanks to this example repository. Basically, you need at least the following in your build.gradle:

plugins {
    id 'java'
    id 'org.openjfx.javafxplugin' version '0.0.13'
}

repositories {
    mavenCentral()
}

javafx {
    version = '14'
    modules = ['javafx.controls']
}

dependencies {
    implementation group: 'dev.brachtendorf', name: 'JImageHash', version: '1.0.0'
}
lynnwilliam commented 1 year ago

this repo should have an option to work Without JavaFX, because some people just want to use the algorithms