elective-stereophonic
elective-stereophonic
Setting up a core dev environment with intellij singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client: Nxt 1.11.15

Author Topic: Setting up a core dev environment with intellij  (Read 2274 times)

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Setting up a core dev environment with intellij
« on: June 12, 2016, 01:42:37 pm »

Howdy,

I recently did set up a dev environment in intellij for the nxt core, in order to understand the api a bit better, so I thought I'd share my experience here.
Please note that I'm not a java dev, and it's the first time I am using intellij, so the instructions is a bit basic, but that's the level of java dev I am.
If any real java devs have tips and tricks of how to improve this process, please go ahead and post here.

So, I'm using windows 10, I have JDK 1.8, IntelliJ 2016.1.1 (community edition, the free version) installed also having git installed and know how to use it is something I will assume you already know.
So, here's how I did set it up:
  • git clone https://bitbucket.org/JeanLucPicard/nxt.git
    In my example I've placed it in C:\git\nxt
  • Open up IntelliJ, Create New Project and select Java and 1.8 as Project SDK
  • As for project location, set the root path of your git repoistory, in my case C:\git\nxt and press finish
  • Go to "file\project structure", select the Project tab, and in project compiler output change the C:\git\nxt\out to C:\git\nxt\classes
  • Select the modules tab.
    You should see that the src folder is blue, select the src folder and unselect the "Sources" toggle button.
    Instead, select the java subfolder and select the Sources toggle button, making this folder blue instead.
  • In the same view, select the conf folder and toggle the Resource button
  • Nxt, select the Libraries tab, press the + and choose 'java' in the dropdown and the choose the entire C:\git\nxt\lib folder.
And that's all it took to be able to compile and debug nxt.Nxt class.
Now, it's not complete, I don't get the wallet UI if I browse to http://localhost:7876/ but the server starts, and it is fetching blocks, and calling individual api functions work too, so it is good enough for me at the moment.
« Last Edit: June 12, 2016, 01:49:45 pm by NxtSwe »
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

Nextshares

  • Full Member
  • ***
  • Karma: +6/-1
  • Offline Offline
  • Posts: 152
    • View Profile
Re: Setting up a core dev environment with intellij
« Reply #1 on: June 12, 2016, 02:04:45 pm »

Howdy,

I recently did set up a dev environment in intellij for the nxt core, in order to understand the api a bit better, so I thought I'd share my experience here.
Please note that I'm not a java dev, and it's the first time I am using intellij, so the instructions is a bit basic, but that's the level of java dev I am.
If any real java devs have tips and tricks of how to improve this process, please go ahead and post here.

So, I'm using windows 10, I have JDK 1.8, IntelliJ 2016.1.1 (community edition, the free version) installed also having git installed and know how to use it is something I will assume you already know.
So, here's how I did set it up:
  • git clone https://bitbucket.org/JeanLucPicard/nxt.git
    In my example I've placed it in C:\git\nxt
  • Open up IntelliJ, Create New Project and select Java and 1.8 as Project SDK
  • As for project location, set the root path of your git repoistory, in my case C:\git\nxt and press finish
  • Go to "file\project structure", select the Project tab, and in project compiler output change the C:\git\nxt\out to C:\git\nxt\classes
  • Select the modules tab.
    You should see that the src folder is blue, select the src folder and unselect the "Sources" toggle button.
    Instead, select the java subfolder and select the Sources toggle button, making this folder blue instead.
  • In the same view, select the conf folder and toggle the Resource button
  • Nxt, select the Libraries tab, press the + and choose 'java' in the dropdown and the choose the entire C:\git\nxt\lib folder.
And that's all it took to be able to compile and debug nxt.Nxt class.
Now, it's not complete, I don't get the wallet UI if I browse to http://localhost:7876/ but the server starts, and it is fetching blocks, and calling individual api functions work too, so it is good enough for me at the moment.
Howdy,

I recently did set up a dev environment in intellij for the nxt core, in order to understand the api a bit better, so I thought I'd share my experience here.
Please note that I'm not a java dev, and it's the first time I am using intellij, so the instructions is a bit basic, but that's the level of java dev I am.
If any real java devs have tips and tricks of how to improve this process, please go ahead and post here.

So, I'm using windows 10, I have JDK 1.8, IntelliJ 2016.1.1 (community edition, the free version) installed also having git installed and know how to use it is something I will assume you already know.
So, here's how I did set it up:
  • git clone https://bitbucket.org/JeanLucPicard/nxt.git
    In my example I've placed it in C:\git\nxt
  • Open up IntelliJ, Create New Project and select Java and 1.8 as Project SDK
  • As for project location, set the root path of your git repoistory, in my case C:\git\nxt and press finish
  • Go to "file\project structure", select the Project tab, and in project compiler output change the C:\git\nxt\out to C:\git\nxt\classes
  • Select the modules tab.
    You should see that the src folder is blue, select the src folder and unselect the "Sources" toggle button.
    Instead, select the java subfolder and select the Sources toggle button, making this folder blue instead.
  • In the same view, select the conf folder and toggle the Resource button
  • Nxt, select the Libraries tab, press the + and choose 'java' in the dropdown and the choose the entire C:\git\nxt\lib folder.
And that's all it took to be able to compile and debug nxt.Nxt class.
Now, it's not complete, I don't get the wallet UI if I browse to http://localhost:7876/ but the server starts, and it is fetching blocks, and calling individual api functions work too, so it is good enough for me at the moment.

Good share. 8)
Logged

Gargo

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Setting up a core dev environment with intellij
« Reply #2 on: December 25, 2017, 05:33:38 pm »

tried standard method (run.bat) - nothing works. Console output:
Java version in "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" is "1.8" and in "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment" is ""
using Java home directory "C:\Program Files\Java\jre1.8.0_151"

tried this manual - I don't even know how to run/debug in intelij idea - it requires run and debug configurations

Could you help me?
Logged
 

elective-stereophonic
elective-stereophonic
assembly
assembly