An error occurred while executing the javaant command in the php environment, as shown in the following figure.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.