In my AngularJS application, I want to call a .jar file to handle the uploading of images/files. The idea is for Angular to send blob data (image information) to the .jar, along with the folder name where the image should be stored.
My Java method would require 2 parameters - one of blob type and one of string type. So how do I pass these parameters to the Java .jar file? I prefer not to use servlets for image upload, and instead I am thinking of creating a simple custom upload class in Java and packaging it into a .jar file.
However, a new question arises - how do I pass non-string parameters to the main method of a Java class that only accepts String args[]? My method needs parameters as well. This means that, if I understand correctly, the main method should receive parameters from JavaScript and then pass them to the appropriate method. Is this correct?
How can I accomplish this? Perhaps an example with some code would help?