0

i try to build java standalone appplication with Arcgis

i already instal Arcgis Desktop 10 and ArcObject SDK for java platform

i just try to getting started ..

so i use this tutorial

then i include libraries arcobjects.jar from my arcgis installation

C:\Program Files (x86)\ArcGIS\Desktop10.0\java\lib\arcobjects.jar

into my netbeans project

then i write this (similiar with tutorial)

package gis;

import com.esri.arcgis.beans.globe.GlobeBean;
import com.esri.arcgis.system.AoInitialize;
import com.esri.arcgis.system.EngineInitializer;
import com.esri.arcgis.system.esriLicenseProductCode;
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import javax.swing.JFrame;


    public class Gis {

        public static void main(String[] args) throws IOException{
             EngineInitializer.initializeVisualBeans();
             new AoInitialize().initialize(esriLicenseProductCode.esriLicenseProductCodeEngine);
             JFrame jFrame = new JFrame("Hello, Sphere!");
             jFrame.setSize(300, 300);
             jFrame.getContentPane().add(new GlobeBean(), BorderLayout.CENTER);
             jFrame.addWindowListener(new WindowAdapter() {
                 public void windowClosing(WindowEvent e) {
                     try {
                         new AoInitialize().shutdown();
                         System.exit(0);
                     }
                     catch (IOException ex) {
                         System.out.println(ex.getMessage());
                         System.exit(1);
                     }
                 }
             });
             jFrame.setVisible(true);
        }
    }

its error.. the output is

Could not load native libraries.

my question :

  1. how to make it right?

  2. how to build java standalone application with arcgis? (and what kind of arcgis technologies i need? )

    • i already goggling for 2 days but i still can't figure it out

    • i already go to their forum.. but its difficult to find the tread post page. so i end up here.

Jason Amavisca
  • 187
  • 3
  • 5
  • 13
  • Have you included the native libraries (see [here](http://stackoverflow.com/q/661320/1076463)) ? – Robin Apr 24 '13 at 20:28
  • no.. i don't know what to do.. from my arcgis instalation, its also instal another jre (its in arcgis directory) so i confuse how to set the path.. (into my default jre(from oracle) or to arcgis jre).. i already try it but its still error.. i think maybe i miss another configuration.. – Jason Amavisca Apr 24 '13 at 20:43
  • i dont know the location of the native libraries – Jason Amavisca Apr 24 '13 at 21:32

1 Answers1

1

Are you using 64 bit JRE/JDK? If so, use 32 bit JRE/JDK when building Java AO apps for ArcGIS Engine or Desktop. 64 bit JRE/JDK can be used for building extensions for ArcGIS Server.

Thanks! Ajit