2

My IDE is Spring Tool Suite. I want to use the NumberUtils.isNumber function. STS does not know the class , and there is no suggestion of import in the error icon. My buildpath is using java-se 1.6 :

enter image description here

In pom.xml java-version is 1.7 :

<properties>
    <java-version>1.7</java-version>
    <org.springframework-version>4.0.3.RELEASE</org.springframework-version>
    <org.aspectj-version>1.6.10</org.aspectj-version>
    <org.slf4j-version>1.6.6</org.slf4j-version>
    <jcl.slf4j.version>1.7.12</jcl.slf4j.version>
</properties>

So how to make the import possible ?

1 Answer 1

3

Apache libraries doesn't come inbuilt with conventional java libraries. You have to add them. Add this dependency to pom.xml to access that method.

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.0</version>
</dependency>

source

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.