Skip to content

PierreSachot/JanuaryIntelliJIntegration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

How to import January in IntelliJ

In this tutorial, we will see how to import January in IntelliJ.

Download IntelliJ (if you don't have it) :

There is two versions of IntelliJ, the first one is free, this is the community version, open source, and you have to pay for the second one. Here you can download the last version : IntelliJ download page

Note : During this tutorial I'm using the complete edition of IntelliJ, so if some links are differents in your IntelliJ it could be because of that.

Creating a new project :

  1. Now, you need to create a new project, to do that, open IntelliJ, a frame like that will be shown :

Home Page

  1. Click on "Create New Project". This page will appear, just click on "Next" and "Next" again on the page after this one.

Create new project 1

Create new project 1

  1. Put a name for your project, here we use "JanuaryImport", and click "Finish" :

Create new project 1

  1. Now your project is created, you will have a tree like that (if you don't see the project explorer do : ALT+1) :

Create new project 1

Importing January Library :

Now you need to import January from Maven. To do that, it's really simple, just follow those steps :

  1. Open File->Project Structure.. :

Create new project 1

  1. Now you are in the Project Structure :
    • Click on "Librairies"
    • Click on the green "+" icon on the left
    • Click on "From Maven..."

Create new project 1

  1. Now type in the search bar "january", press enter. IntelliJ will search all the results, then select "com.github.yannick-mayeur:org.eclipse.january:2.02"

Create new project 1

Click on "OK" and "OK" a second time and you should have that :

Create new project 1

Just click on "Apply" and then "OK".

  1. Congratulations, January is now imported in your project and you can use it.

Using BasicExample.java

You have now January and you want to be sure that it's working ?

This is the way to show you how to use January.

  1. Create a new Java File : - Right click on the src directory and select New->Java Class

Create new class 1

  1. Put a name to the class, here "Basic" :

Create new class 1

  1. In this file past this code :
public static void main(String[] args) {
      Dataset dataset = DatasetFactory.createFromObject(new double[] { 1,2, 3, 4, 5, 6, 7, 8, 9 });
      // Print the output:
      System.out.println("shape of dataset: " + Arrays.toString(dataset.getShape()));
      System.out.println("toString of dataset: " + dataset.toString());
      System.out.println("toString, with data, of dataset: \n" + dataset.toString(true));
  }

Like that :

Create new class 1

  1. Import the dependencies :

In IntelliJ to import a class, you just need to put your cursor on the required class and press "Alt+Enter" :

Create new class 1

  1. Run the code : - Right-click on the Basic.java - Select "Run 'Basic.main()'"

Create new class 1

  1. This code should appear :

Create new class 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published