Home > front end >  NoClassDefFoundError: java/time/LocalDateTime
NoClassDefFoundError: java/time/LocalDateTime

Time:02-07

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!

CodePudding user response:

it is a new api with java ,please try with java 8.

  •  Tags:  
  • Related