Question

Apparently Scala on Eclipse tries to convince me that DateTime, Period, DateMidnight and many other classes in Joda Time don't have any constructors

Which is odd considering the fact that the documentation for them shows a constructor and a number of methods

The only things I have access to are the static methods such as DateTime.now() and DateTime.parse()

Note that I have added the joda-time-2.2.jar, joda-time-2.2-sources.jar, and joda-time-2.2-javadoc.jar files to the java build path of the project...

and yet whenever I try to make an instance of say DateTime Eclipse will tell me org.joda.time.DateTime does not have a constructor

So anyone got any idea why I get this error? And more importantly, how do I fix it?

Was it helpful?

Solution

It seems you need to add joda-convert to your classpath. Answer taken from here.

If you're not using Maven or Sbt, you can manually download the jar from its Maven Central page. All you need to do is add it to your project build path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top