Q:

Java lib or function that is similar to scipy.optimize.minimize()?

I m programming a neural network. I m at the step where I implemented the cost function and calculated the gradients. Now I need to optimize the paramters that minimize my cost function.
Therefore I m looking for a function such as scipy.optimize.minimize() in Java, I want to hand over my gradients of weight matrixes and the cost to minimize the costs and optimize the parameters. 
I dont know what Libaries are providing such a possibility?
scipy.optimize.minimize(Cost, Gradients, method = 'L-BFGS-B')
Thanks in advance for your help. It would be also helpful if there is an easy example to use this function...

A:

In my case I used https://github.com/aria42/nlp-utils/ its easy to implement and a good example is available!

