1

That looks easy enough: search the net in which package they are, copy the dependency into your pom.xml and here you go!

But I didn't didn't anything that I could use as a dependency.

Not much of a surprise, other people had the same problem, and solutions can found here https://stackoverflow.com/a/29270114/4142984 in combination with https://stackoverflow.com/a/15692230/4142984 .

In other words, those solutions suggest to get the jar manually and hard-link it in you build-path. It worked, though.

But isn't maven supposed to do that?

Question is: what did I miss, to tell maven to do this.

And I'm using maven with eclipse, just in case this would make a difference.

davidxxx
  • 125,838
  • 23
  • 214
  • 215
Gyro Gearloose
  • 1,056
  • 1
  • 9
  • 26
  • Try rather this post : https://stackoverflow.com/questions/9294646/javafx-2-as-a-maven-dependency. – davidxxx Jan 12 '18 at 21:32
  • @davidxxx yes, it is. – Gyro Gearloose Jan 12 '18 at 21:34
  • JavaFX is part of the JDK. You don't need additional libraries. With Java9 you probably need a module-info to make it available –  Jan 12 '18 at 21:40
  • @a_horse_with_no_name Yesno. It is part of the jre from oracle. Just in case you are using other jres you will need those classes in an extra package. And eclipse is IBM-driven. – Gyro Gearloose Jan 12 '18 at 21:43

1 Answers1

0

The links you provided suggest adding a JAR to your project CLASSPATH. That's not using Maven.

If you want to have Maven manage that dependency, and it's not in a Maven Central repo, you need to do an mvn install to your enterprise or local Maven repository.

I'm not if this Maven plugin is what you need. Maybe you can consider that as well.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • I have to admit that, besides of copying dependencies, I don't have much experience with maven. Could you please explain a bit? – Gyro Gearloose Jan 12 '18 at 21:46
  • I have removed the jar from the eclipse build path and run mvn install. Errors are back, eclipse doesn't find the classes. I guess you are saying that I have to run mvn install with some arguments that are obvious to you, but not to me? – Gyro Gearloose Jan 12 '18 at 22:08
  • After some search, try & error, wouldn't maven at least need a dependency entry to the pom file to have a hint _what_ to install? And I really don't know how to say *jafafx* in a way maven will understand it. That was the reason for the question. – Gyro Gearloose Jan 12 '18 at 23:28