简体   繁体   English

Github在Intellij Idea中克隆

[英]Github Clone in Intellij Idea

I want to create a sparse matrix using Efficient Java Matrix Library (EJML) .This is the link ( http://ejml.org/wiki/index.php?title=Main_Page ). 我想使用Efficient Java Matrix Library (EJML)创建一个稀疏矩阵。这是链接( http://ejml.org/wiki/index.php?title=Main_Page )。 I am using intellj I Idea for Java coding. 我正在使用Intellij I Idea进行Java编码。 In EJML website it is suggested that 在EJML网站中,建议

The command to clone it is: git clone https://github.com/lessthanoptimal/ejml.git 克隆它的命令是:git clone https://github.com/lessthanoptimal/ejml.git

I click on check out from version control. 我单击从版本控制中签出。 Then select Github from that and get a Error message. 然后从中选择Github并收到错误消息。 Cannot run program "git.exe": CreateProcess error=2, The system cannot find the file specified I solve this problem after installing Git. Cannot run program "git.exe": CreateProcess error=2, The system cannot find the file specified 。安装Git后解决了此问题。 A new project folder created. 创建一个新的项目文件夹。 But don't find where to write down my Java code.In normal Intellij Idea project a src folder created. 但是请不要在哪里写下我的Java代码。在普通的Intellij Idea项目中,会创建一个src文件夹。 Then I right click on it and create a class file. 然后,我右键单击它并创建一个类文件。 Here there is no option to create class file. 这里没有创建类文件的选项。 I add a picture of my current state. 我添加了我当前状态的图片。

This is the homepage of Intellj Idea 这是Intellj Idea的主页 在此处输入图片说明

在此处输入图片说明

克隆完成后

Thank You In advance 先感谢您

Download and install git on the machine before cloning from Intellij. 从Intellij克隆之前,请先在计算机上下载并安装git。 Here's the link 这是链接

Do you want to use EJML, or do you want to work on EJML? 你想使用 EJML,或者你想 EJML 工作 It's unlikely you want to clone it. 您不太可能要克隆它。

Instead, create a project and add EJML as a dependency. 而是,创建一个项目并将EJML添加为依赖项。 Using Maven, add this to your pom.xml: 使用Maven,将其添加到您的pom.xml中:

<dependency>
  <groupId>org.ejml</groupId>
  <artifactId>ejml-all</artifactId>
  <version>0.33</version>
</dependency>

Using Ivy, add this to ivy.xml: 使用Ivy,将其添加到ivy.xml:

<dependency org="org.ejml" name="core" rev="0.33"/>

Using Gradle, add this to build.gradle: 使用Gradle,将其添加到build.gradle:

compile group: 'org.ejml', name: 'core', version: '0.33'

Update: I tried adding it to a project of mine, and while the EJML web site mentions version 0.34, Maven Central only seems to have 0.33 currently. 更新:我尝试将其添加到我的项目中,尽管EJML网站提到版本0.34,但Maven Central当前似乎只有0.33。

To create a project in IntelliJ IDEA from scratch: 要从头开始在IntelliJ IDEA中创建项目:

  • Click "Create New Project" 点击“创建新项目”
  • Make it a "Java Project" (default), and click Next 使其成为“ Java项目”(默认),然后单击“下一步”。
  • Click Next to bypass creating from a template 单击下一步绕过从模板创建
  • Give the project a thoughtful name, like "Sparse", and click Finish 给项目取一个周到的名称,例如“ Sparse”,然后单击“完成”。
  • Right-click on the project at the upper left and click "Add Framework Support..." 右键单击左上角的项目,然后单击“添加框架支持...”
  • Check "Maven" and click "OK" 选中“ Maven”,然后单击“确定”
  • In the pom.xml, add these lines after the : 在pom.xml中,在以下位置添加以下行:

    org.ejml ejml-all 0.33 org.ejml ejml-全部0.33

  • IntelliJ IDEA will prompt that the Maven project needs to be imported. IntelliJ IDEA将提示需要导入Maven项目。 Allow it. 允许它。

On the left side under the project you can open src/main/java in the tree and right-click on java and choose New > Java Class and you should be ready to go. 在项目下方的左侧,您可以在树中打开src / main / java并右键单击java并选择New> Java Class,您应该已经准备好了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM