Java background invoke custom Arctoolbox (the developed program is put into the Tomcat container to run)

Source: Internet
Author: User

Write in front:

A period of time testing the common Java Engineering call Arcobject 10.5 (hereinafter referred to as AO) function, mainly in the program calls the custom Arctoolbox model, complete some functions, when the function is converted to Web engineering, there are some problems, now the solution is recorded, for future inspection.

1. Development environment:

ArcGIS 10.5,myeclipse, JDK 1.8 32-bit, Tomcat 8.5 32-bit, spring, spring mvc 4.3, etc.

Environment installation and configuration, in some not to repeat.

The knowledge of AO development is not in the details.

2, problem description

Before the problem is resolved, the Web request calls the AO feature, which appears as shown in the exception.

The reason for this exception is that the code that involves AO in the program cannot find the ArcGIS environment.

3, the way to solve

There are 2 scenarios in this section, one for the Tomcat configuration in the IDE environment when code is developed, and one to deploy the developed program to the runtime configuration in Tomcat.

In this article, it is assumed that the ArcGIS Desktop installation path is: C:\Program Files (x86) \arcgis

First of all, configure the Arcobject environment in the IDE:

Select MyEclipse Menu Windows-Preferences, choose Tomcat on the left servers, configure the appropriate Tomcat paths environment, as follows:

In the second case, configure the Tomcat runtime environment:

Follow Tomcat's Java environment Configuration instructions, create a new SetEnv.bat script file, place it in the Tomcat Bin directory, and configure the path in the file as follows:

Set java_opts= "-djava.library.path=c:/program Files (x86)/arcgis/desktop10.5/java/lib; C:/Program Files (x86)/arcgis/desktop10.5/bin; "

4. End

After configuring the IDE and Tomcat ArcGIS environment as described above, in general, as long as you develop the AO program is not a problem, after changing it to Web engineering background, there will be no problem, I wish the parents test success.

Java background invoke custom Arctoolbox (the developed program is put into the Tomcat container to run)

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.