Java Joda Time

编程入门 行业动态 更新时间:2024-10-23 19:35:07
本文介绍了Java Joda Time - 下载并安装 - 一步一步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我无法让Joda Time安装和工作。

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

大多数指令都假设有一定的知识。

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

有人可以假设我一无所知并指导我,一步一步地,把Joda Time压缩文件放在哪里,我提取它吗?如何使用eclipse正确添加它以及如何将其导入类文件。

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.

非常感谢! :)

推荐答案

  • 在eclipse中创建java项目
  • 下载最新的 JodaTime .tar.gz 文件,并提取其内容
  • 在Eclipse中查找包浏览器中的项目,然后右键单击它然后调用它新建 - >文件夹 - > libs
  • 将joda-time-2.1.jar复制/拖放到新创建的libs文件夹中
  • 右键单击你的再次项目(在包资源管理器中)然后属性 - > Java构建路径 - >图书馆 - >添加罐子 - > joda-time-2.1.jar
  • 现在您可以使用以下代码进行测试:

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

    DateTime test = new DateTime();

    if代码编译确定你很高兴

    if code compiled ok you are good to go

  • 更多推荐

    Java Joda Time

    本文发布于:2023-11-26 21:19:17,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1635230.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Java   Joda   Time

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!