Select to view content in your preferred language

Cannot load Arcobject java plugin to eclipse (64 bit)

4557
12
Jump to solution
07-16-2013 08:33 AM
IshanKaushik
Emerging Contributor
Hi,

I installed following setup available in ArcGis Desktop installer

1) ArcGis Desktop.
2) Under ArcGis Developer Resources --> ArcObject SDK for Java Platform.

This installlation was done on window 7 64 bit computer.

My problem is i am not able to install the eclipse pluggin.

Do i am require to install java runtime SDK ?
But that installation is not available in ArcGis Destop installation manager.



Can i develope java standalone application in eclipse with arcGis Destop evironment of 64 bit system?
Or is it because java arcObject 10 is not compatible with 64 bit system.
0 Kudos
12 Replies
EricBader
Honored Contributor
Yes, the system requirements may be slightly confusing with respect to the 64-bit thing.

ArcObjects can run on a 64-bit machine, but ONLY as a 32-bit application.
ArcObjects cannot be loaded into a 64-bit Java process.
Therefore, on a 64-bit machine, you will need to use 32-bit JDK/JVM for developing and running your ArcObjects Java-based applications.

The ArcGIS Runtime SDK for Java SE, which is what this forum is about, CAN run in pure 64-bit Java, and your applications built with this SDK CAN run as native 64-bit applications (or 32-bit if you want), because the libraries are not based on ArcObjects.

The ArcGIS Runtime SDK for Java SE is a completely different SDK product and toolset, a different technology, than the ArcObjects SDK for Java.

Does this help?

I can understand the confusion, but I do hope this helps.
IshanKaushik
Emerging Contributor
Thanks to the comment now my java application is working on eclipse 64 bit system.
Just a follow up to th question , i have editor license and its working fine on eclipse , but when i export and run the jar file through command line , i am getting error ---

"Unable to initialize ArcObjects environment.
AutomationException: 0x800401f5 - The specified product or version does not exis
t on this machine. in 'ArcGISVersion.Version'"


P.S
Following is the engine code that i am using ---

 EngineInitializer.initializeEngine();
   //Initialize ArcGIS license
   AoInitialize aoInit = new AoInitialize();
   initializeArcGISLicenses(aoInit);
   SdeOrPgdb accessFileGDB = new SdeOrPgdb(); 
                                       accessFileGDB.openFromFile_pGDB_Workspace();
                System.out.println("Done.");   
   
   //Ensure any ESRI libraries are unloaded in the correct order
   aoInit.shutdown();
              }catch(Exception e){
   
   System.out.println("Error: " + e.getMessage());
   System.out.println("Sample failed.  Exiting...");
   e.printStackTrace();
   System.exit(-1);
  }

  private static void initializeArcGISLicenses(AoInitialize aoInit) {
  try {
   if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeEngine) 
     == esriLicenseStatus.esriLicenseAvailable)
    aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeEngine);
   else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcView) 
     == esriLicenseStatus.esriLicenseAvailable)
    aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcView);
   else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcEditor) 
     == esriLicenseStatus.esriLicenseAvailable)
    aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcEditor);
   else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcInfo) 
     == esriLicenseStatus.esriLicenseAvailable)
    aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);
   else{
    System.err.println("Could not initialize an Engine or ArcView or ArcInfo or ArcEditor license. Exiting application.");
    System.exit(-1);
   }
  } catch (Exception e) {e.printStackTrace();}
 

0 Kudos
SachinKanaujia
Deactivated User
Make sure that the required environment variables are set correctly before launching the jar. Also <Arcgishome>/bin is in your PATH
0 Kudos