An error occurred while executing the javaant command in the php environment. for example, the system environment is windows + iis.
The php environment uses the wamp package
It is normal to run locally and put the cmd command directly on the server.
However, if you use a php program to call this command, the system will return a failure, which may be a permission issue. However, you do not know how to set it.
Reply to discussion (solution)
Should the server be windows? Is the java path not configured? It seems that there are no errors?
Should the server be windows? Is the java path not configured? It seems that there are no errors?
The server is windows. First of all, thank you for your attention.
I am running well on the local machine. it is also possible to compile by running the compilation command directly under cmd on the server.
However, the php web page fails to be called, and 1 is returned directly. the array is empty.
This issue is hard to solve.
Should the server be windows? Is the java path not configured? It seems that there are no errors?
The server is windows. First of all, thank you for your attention.
I am running well on the local machine. it is also possible to compile by running the compilation command directly under cmd on the server.
However, the php web page fails to be called, and 1 is returned directly. the array is empty.
This issue is hard to solve.
Debug debugging. you can try to comment out a line of code and locate the problem.
The problem has been solved. here we will share with you
1. because it is a batch processing command, there cannot be spaces in the jdk installation path of java
2. it is the java ant packaging command called by the php Apache service. Although ant java javac and other commands can be identified in cmd, php uses Apache, if an environment variable is added, the server cannot be identified without restarting ...., but it finally solved the problem.
Android-sdk-windows
Apache-ant-1.9.4
Jdk1.7
The environment used by the project should be configured with environment variables.