I have the following problem in php when excecuting a jar file. I use the following command:
exec("java -jar JavaProject4.jar";
JavaProject4.jar creates the txt file in the path specified in the java code.
When I run the project in NetBeans, a txt file is created. However, when I excecute jar in php, I get no errors, but I can not get the file.
Here is the java code that I use to write the file:
public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException { Main a = new Main(); List<Double> l1 = new ArrayList<Double>(); l1 = a.compute_features();
Im using wamp server with php 5.2.4 and latest java version.
Thanks a lot!
EDIT: The problem is resolved, I moved the main java file in NetBeans to the default package, and also fixed the wrong path, and now everything works as expected.
Thank you all
source share