I'm creating an Add-in for ArcMap 10.1.
When I export file testproject.esriaddin and install (whether double-click or from Customize Mode > Add From File dialog), message of success appears. But then, I can't find any of my elements in Customize Mode dialog (no Java Tools or Java Commands category, no toolbar in toolbars…).
I found this topic, which seemed to be about the same problem. There, the solution was to select JRE: Java SE 1.6 instead of 1.7. I set this in my project, but the Add-in is still not working.
What could be wrong?
Here is my java class for the button:
package cz.upol.geoinformatics.veselka;
import java.io.IOException;
import javax.swing.JOptionPane;
import com.esri.arcgis.addins.desktop.Button;
//import com.esri.arcgis.arcmapui.IMxDocument;
import com.esri.arcgis.framework.IApplication;
import com.esri.arcgis.interop.AutomationException;
public class Button1 extends Button {
private IApplication app;
//private IMxDocument projectDocument;
/**
* Called when the button is clicked.
*
* @exception java.io.IOException if there are interop problems.
* @exception com.esri.arcgis.interop.AutomationException if the component throws an ArcObjects exception.
*/
@Override
public void onClick() throws IOException, AutomationException {
JOptionPane.showMessageDialog(null, "Hello, World!");
}
@Override
public void init(IApplication app){
this.app = app;
//this.projectDocument = (IMxDocument)app.getDocument();
}
}
Here is how it looks after deploy to ArcMap:
I use ArcGIS + SDK 10.1 on Windows 7 32bit and Eclipse 4.3
Did I forgot to mention some details?
Edit: Here is my another screenshot: (You can see, that category Java Commnads is not listed in Categories)
Best Answer
I solved the problem by reinstalling ArcGIS, Java and also .NET Framework. So, I didn't figure out which part was causing it.
My steps:
Installed Java 1.6
At this time, everything was finaly working correctly!
Installed .NET 4.5.1 through the Windows Update
Everything is still working.