Issue
I'm new with Java language. I have developed an example of a maven project and I have added the package LocalDateTime.
The problem is that when I run the program it appears me this error: NoClassDefFoundError: java/time/LocalDateTime
I have added this line to import the package:
import java.time.LocalDateTime;
I haven't added anything in the pom.xml file because with other packages imports I didn't add anything and it works properly.
Do I need to add some plugin or dependency in pom.xml file regarding to LocalDateTime?
Thanks for your help!
Solution
It is a new api in Java.
Please try with java 8.
Answered By - Digua
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)