Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Joda Time - download, and install - step by step [closed]

Tags:

I've had trouble getting Joda Time to install and work.

Most of the instructions around assume a certain amount of knowledge.

Can someone please assume I know nothing and guide me through, step by step, where to put the Joda Time zip file, do I extract it? How to add it properly using eclipse and how to import it into a class file.

Thanks very much! :)

like image 544
Rich Avatar asked Aug 24 '12 07:08

Rich


1 Answers

  1. Create your java project in eclipse
  2. Download the latest JodaTime .tar.gz file, and extract its contents
  3. In Eclipse look for your project at package explorer and right click on it then call it New -> Folder -> libs
  4. Copy/Drag joda-time-2.1.jar into the new created libs folder
  5. Right click on your project again (in package explorer) then Properties -> Java Build Path -> Libraries -> Add Jars -> joda-time-2.1.jar
  6. Now you can test with this code :

    DateTime test = new DateTime();

if code compiled ok you are good to go

like image 101
idanakav Avatar answered Sep 22 '22 13:09

idanakav