INFO::Successfully created an instance of : com/esri/arcgis/addinframework/AddInFactory java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) Caused by: java.lang.UnsupportedClassVersionError: Button1 : Unsupported major.minor version 51.0 ...
import java.io.IOException; import com.esri.arcgis.addins.desktop.Button; import com.esri.arcgis.framework.IApplication; import com.esri.arcgis.interop.AutomationException; public class Button1 extends Button { /** * 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 { // TODO Auto-generated method stub } @Override public void init(IApplication app) throws IOException, AutomationException { // TODO Auto-generated method stub super.init(app); } }
INFO::Using the following arguments to create the JVM -Djava.class.path=C:\Program Files (x86)\ArcGIS\Desktop10.0\\java\lib\arcobjects.jar -Xms64m -Xmx128m -Xss512k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8013 INFO::Successfully created an instance of : com/esri/arcgis/addinframework/AddInFactory
<?xml version="1.0" encoding="UTF-8"?> <ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Name>TestAddIn3</Name> <AddInID>92421ca6-0137-1000-5000-93a2889e0000</AddInID> <Description></Description> <Version>1.0</Version> <Image></Image> <Author></Author> <Company></Company> <Date>Mon May 28 09:03:55 CEST 2012</Date> <Targets> <Target name="Desktop" version="10.0"/> </Targets> <AddIn language="JAVA" library="TestAddIn3.jar"> <ArcMap> <Commands> <Button caption="NewButton1" category="JavaCommands" class="Button1" id="button1"/> </Commands> </ArcMap> </AddIn> </ESRI.Configuration>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.