Java 将 JSON 库导入 IntelliJ IDEA
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34676940/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Importing JSON library into IntelliJ IDEA
提问by Oscar
could you give me some tips about how to import this JSON lib by Doulgas Crockfordto my IntelliJ IDEA? Thanks in advance. :)
你能给我一些关于如何将Doulgas Crockford 的这个 JSON 库导入我的 IntelliJ IDEA 的提示吗?提前致谢。:)
采纳答案by Bao Pham
I will assume that you already downloaded the json library. If not you can download it form here: Maven repo: http://repo1.maven.org/
我假设您已经下载了 json 库。如果没有,你可以在这里下载它:Maven repo: http://repo1.maven.org/
Go to File -> Project Structure...
Then click on Library tab on the left hand side. You can add or remove any libraries.
转到 File -> Project Structure... 然后单击左侧的 Library 选项卡。您可以添加或删除任何库。
回答by Mubarak Tahir
if you tried all the download links for the Json.jar and its probably not working you can check this link out
如果您尝试了 Json.jar 的所有下载链接,但它可能无法正常工作,您可以 查看此链接
after the link loads, search in the table where you can find "file" at the right of it you will see different kinds of file types. Select jar and wait for it to download.
链接加载后,在表格中搜索您可以在其右侧找到“文件”的位置,您将看到不同类型的文件类型。选择 jar 并等待它下载。
you can now add the downloaded json.jar file in your Intelij.
您现在可以在 Intelij 中添加下载的 json.jar 文件。
open your intelij IDE press CTRL+ ALT+ SHIFT+ S
打开你的 intelij IDE 按CTRL+ ALT+ SHIFT+ S
just by the left of the dialog select modules then from the tabs choose dependencies then hit the +choose JARs or Directories, a dialog is gonna pop up prompting you to select the file path or directory where you have your json.jar. in most cases the json.jar is located in the downloads folder for PC users since it was downloaded. So, select the directory that have your json.jar file, find the json.jar in the directory. Then, hit enter and apply then wait for it to sync.
就在对话框的左侧选择模块,然后从选项卡中选择依赖项,然后点击+选择JAR 或目录,会弹出一个对话框,提示您选择 json.jar 所在的文件路径或目录。在大多数情况下,json.jar 自下载后就位于 PC 用户的下载文件夹中。因此,选择包含 json.jar 文件的目录,在目录中找到 json.jar。然后,按 Enter 并应用,然后等待它同步。