Change in blogging pattern

After a long break, I’m back. In the meantime, I immigrated to a new country, changed a couple of jobs, working on a new business plan and refreshed myself for new challenges in life.

With this post, I’m changing the pattern of my blogs; from long well written and 3/4 blogs a year to short quick blogs with enough meat to justify a post 🙂

So here I am.

I’m a big IntelliJ Idea fan but as a startup, I need to be able to do quick edits, configurations here and there and quick feedback loops for the changes. Therefore, I’m going with an old favorite editor, Notepad++, and added a little macro that can compile/run java programs.

1) Press F6

2) type

npp_switch Main.java
cd ..\..\..\
javac -sourcepath src -classpath classes;lib\*.jar src\com\myfirm\*.java -d classes
java -classpath classes;lib\*.jar com.myfirm.”$(NAME_PART)”

[N.B. dont forget to press <enter> after every command]

3) Press Save… and name the script java_runner

4) Invoke by Ctrl-F6 on any class of the same project

Job’s done!

Assumptions:

1) It requires that all java source files are placed with src/com/myfirm directory

2) The directory classes is already created at the level of src directory

3) There is a class that ends with a name Main

4) The required libraries are placed in the lib directory

5) All java etc environment variables are set properly

6) Notepad++ menu Plugins–>NppExec [Save all files on execute, Follow $(CURRENT_DIRECTORY)] are checked

Cheers!