简体   繁体   中英

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 ). I am using intellj I Idea for Java coding. In EJML website it is suggested that

The command to clone it is: 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. Cannot run program "git.exe": CreateProcess error=2, The system cannot find the file specified I solve this problem after installing 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. 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 在此处输入图片说明

在此处输入图片说明

克隆完成后

Thank You In advance

Download and install git on the machine before cloning from Intellij. Here's the link

Do you want to use EJML, or do you want to work on EJML? It's unlikely you want to clone it.

Instead, create a project and add EJML as a dependency. Using Maven, add this to your pom.xml:

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

Using Ivy, add this to ivy.xml:

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

Using Gradle, add this to 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.

To create a project in IntelliJ IDEA from scratch:

  • Click "Create New Project"
  • Make it a "Java Project" (default), and click Next
  • Click Next to bypass creating from a template
  • Give the project a thoughtful name, like "Sparse", and click Finish
  • Right-click on the project at the upper left and click "Add Framework Support..."
  • Check "Maven" and click "OK"
  • In the pom.xml, add these lines after the :

    org.ejml ejml-all 0.33

  • IntelliJ IDEA will prompt that the Maven project needs to be imported. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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