Christian Moen
Christian Moen

Reputation: 1301

JetBrains Intellij missing javax.validation

I've just created a project from an existing netbeans project, and I've gotten an error in one import

enter image description here

Any way to fix this?

Upvotes: 0

Views: 2504

Answers (2)

Slowpoe
Slowpoe

Reputation: 41

I had same issue but with Non-maven Project,

this validation Jar need to be manually added.

and can be downloaded using some Online Maven download tool like

https://jar-download.com/online-maven-download-tool.php

and then add as project library in the project.

Other wise just use maven as mentioned above by @Arnaud Denoyelle

Upvotes: 1

Arnaud Denoyelle
Arnaud Denoyelle

Reputation: 31283

The javax.validation.* classes exist in a third party library. You have to import it.

Add the corresponding jar to the classpath or add this to your pom.xml if you are using maven :

<dependency>
  <groupId>javax.validation</groupId>
  <artifactId>validation-api</artifactId>
  <version>1.1.0.Final</version>
</dependency>

Upvotes: 1

Related Questions