"I'm developing a software to interact with piano melodies in java using Netbeans IDE 8.0.2"
[1] There may be no need to do anything more than compile your code, add the jar to MATLAB's java path (using javaaddpath) and call into your code from MATLAB. In this case, MATLAB provides your work environment but you have access to the java code from it. Your code and MATLAB share a Java Virtual Machine, so all is easy.
[2] MatlabControl let's you run a java application but invoke and use the MATLAB engine from inside it. Typically, you will need pretty good knowledge of both MATLAB and Java. Java then provides your front-end with MATLAB being used typically for number crunching.
[3] Builder tools from TMW let you deploy a mixed Java/MATLAB code base as an app and, if you have the appropriate license, to deploy to end-users who do not have MATLAB.
Of these approaches, [1] is easiest/cheapest and ou can put a Java GUI on the front-end using AWT/Swing/JavaFX.
ML