The error message says it all: you can't "run" any arbitrary Java class, only one with a main(String[]) method. In the case of GWT hosted mode, the class to run is com.google.gwt.dev.GWTShell. That's the "main class" in the launch configuration dialog in Eclipse.
On Wed, Feb 4, 2009 at 12:50 PM, [email protected] <[email protected]> wrote: > > Ok thanks, that seems to have solved part of the problem. It now > attempts to run but comes up with this error: > > java.lang.NoSuchMethodError: main > > > Anyone see what I am doing wrong? > > Regards, > Jack > > On Feb 4, 5:39 pm, "[email protected]" > <[email protected]> wrote: >> Hi, >> I am not an expert of this .launch files, but I have noticed a curious >> point in the file you copied in the email. At the beginning there is: >> >> <listEntry value="/*Final Year >> Project*/src/com/project/client/ManagementApplication.java"/> >> >> where the three words Final, Year and Project have spaces around them. >> Instead later in the file there is: >> >> <listEntry value="<?xml >> version="1.0"encoding="UTF-8"?> <runtimeClasspathEntry >> internalArchive="/*FinalYearProject*/src" >> path="3"type="2"/> "/> >> >> where the name is written without spaces. >> >> I am not sure if this could be a useful remarks, but I suppose they both >> should refer to the same source path. >> >> Federica >> >> [email protected] ha scritto: >> >> > Hi, >> >> > Main = com.project.client.ManagementApplication >> >> > Arguments = -out www com.project.ManagementApplication/ >> > ManagementApplication.html >> >> > Classpath = Bootstrap Entries: JRE System Library >> >> > User Entries: src\FinalYearProject >> > FinalYearProject (default >> > classpath) >> >> > When I try to debug the Mangagement Application I get this error >> > message: >> > The archive: /FinalYearProject/src which is referenced by the >> > classpath, does not exist. >> >> > Here is the code found in the launch file: >> >> > <?xml version="1.0" encoding="UTF-8" standalone="no"?> >> > <launchConfiguration >> > type="org.eclipse.jdt.launching.localJavaApplication"> >> > <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> >> > <listEntry value="/Final Year Project/src/com/project/client/ >> > ManagementApplication.java"/> >> > </listAttribute> >> > <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> >> > <listEntry value="1"/> >> > </listAttribute> >> > <booleanAttribute >> > key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> >> > <listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> >> > <listEntry value="<?xml version="1.0" >> > encoding="UTF-8"?> <runtimeClasspathEntry >> > containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" >> > javaProject="FinalYearProject" path="1" type=" >> > 4"/> "/> >> > <listEntry value="<?xml version="1.0" >> > encoding="UTF-8"?> <runtimeClasspathEntry >> > internalArchive="/FinalYearProject/src" path="3" >> > type="2"/> "/> >> > <listEntry value="<?xml version="1.0" >> > encoding="UTF-8"?> <runtimeClasspathEntry >> > id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento >> > project="FinalYearProject"/> </ >> > runtimeClasspathEntry> "/> >> > <listEntry value="<?xml version="1.0" >> > encoding="UTF-8"?> <runtimeClasspathEntry >> > externalArchive="C:\Users\Jack\Documents\gwt-windows-1.5.3a\gwt- >> > dev-windows.jar" path="3" type="2"/ >> > > "/> >> > </listAttribute> >> > <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" >> > value="false"/> >> > <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" >> > value="com.project.client.ManagementApplication"/> >> > <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" >> > value="-out www com.project.ManagementApplication/ >> > ManagementApplication.html"/> >> > <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" >> > value="Final Year Project"/> >> > <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="- >> > Xmx256M"/> >> > </launchConfiguration> >> >> > On Feb 4, 4:40 pm, Ashish Soni <[email protected]> wrote: >> >> >> Do you have a launch file created , Please share. >> >> >> Ashish >> >> >> On Wed, Feb 4, 2009 at 11:25 AM, beeky <[email protected]> >> >> wrote: >> >> >>> Jack, >> >>> I'm no expert, but I was able to get debugging working for Eclipse 3.4 >> >>> with only some classpath additions. Could you post the values for >> >>> main, arguments and classpath from the debug configurations window? >> >> >>> -=beeky >> >> >>> On Feb 3, 6:17 pm, "[email protected]" >> >>> <[email protected]> wrote: >> >> >>>> Ok, I have followed this before but I can't get Eclipse to work. It >> >>>> does not give me an option when I select 'Debug as'. It just says >> >>>> 'none applicable'. >> >> >>>> I am trying to run it from the entry point class. Here is the code: >> >> >>>> package com.project.client; >> >> >>>> import com.google.gwt.core.client.EntryPoint; >> >>>> import com.google.gwt.core.client.GWT; >> >> >>>> import com.google.gwt.user.client.rpc.*; >> >>>> import com.google.gwt.user.client.ui.Button; >> >>>> import com.google.gwt.user.client.ui.ClickListener; >> >>>> import com.google.gwt.user.client.ui.RootPanel; >> >>>> import com.google.gwt.user.client.ui.VerticalPanel; >> >>>> import com.google.gwt.user.client.ui.Widget; >> >>>> import com.google.gwt.user.client.ui.Label; >> >> >>>> /** >> >>>> * Entry point classes define <code>onModuleLoad()</code>. >> >>>> */ >> >>>> public class ManagementApplication implements EntryPoint { >> >> >>>> //Main Menu Widgets >> >>>> Label title = new Label("Welcome to the Mangement Main Menu!"); >> >>>> Button editItemsButton = new Button("Edit Items"); >> >>>> Button editMenusButton = new Button("Edit Menus"); >> >>>> Button editCategoryButton = new Button("Edit Categories"); >> >>>> Button reportsButton = new Button("Managerial Reports"); >> >> >>>> //Main Panel >> >>>> final VerticalPanel mainMenuPanel = new VerticalPanel(); >> >> >>>> public void mainGUI(){ >> >> >>>> mainMenuPanel.setWidth("100%"); >> >> >>> mainMenuPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER); >> >> >>>> //Set Spacing between buttons >> >>>> mainMenuPanel.setSpacing(20); >> >>>> mainMenuPanel.add(title); >> >>>> mainMenuPanel.add(editItemsButton); >> >>>> mainMenuPanel.add(editMenusButton); >> >>>> mainMenuPanel.add(editCategoryButton); >> >>>> mainMenuPanel.add(reportsButton); >> >> >>>> // Add Main Menu Panel to the RootPanel >> >>>> RootPanel.get().add(mainMenuPanel); >> >> >>>> //********LISTENERS*********** >> >>>> //Edit items listener >> >>>> editItemsButton.addClickListener(new ClickListener() { >> >>>> public void onClick(Widget sender) { >> >>>> mainMenuPanel.setVisible(false); >> >>>> EditItemsGUI ei = new EditItemsGUI(); >> >>>> ei.editItemsGUI(); >> >>>> } >> >>>> }); >> >> >>>> /** >> >>>> * This is the entry point method. >> >>>> */ >> >>>> public void onModuleLoad() { >> >> >>>> mainGUI(); >> >> >>>> ServerStatusSQLServiceAsync serviceProxy = >> >>>> (ServerStatusSQLServiceAsync) GWT.create >> >>>> (ServerStatusSQLService.class); >> >> >>>> ServiceDefTarget target =(ServiceDefTarget) >> >> >>> serviceProxy; >> >> >>> target.setServiceEntryPoint(GWT.getModuleBaseURL()+"server- >> >> >>>> status"); >> >> >>>> AsyncCallback callback = new AsyncCallback(){ >> >>>> public void onFailure (Throwable caught){ >> >>>> GWT.log("RPC error", caught); >> >> >>>> try { >> >>>> throw caught; >> >>>> } catch >> >> >>> (IncompatibleRemoteServiceException e) { >> >> >>>> // this client is not compatible >> >> >>> with the server; cleanup >> >> >>>> and refresh the >> >>>> // browser >> >>>> } catch (InvocationException e) { >> >>>> // the call didn't complete >> >> >>> cleanly >> >> >>>> } catch (Throwable e) { >> >>>> // last resort -- a very >> >> >>> unexpected exception >> >> >>>> } >> >> >>>> } >> >>>> public void onSuccess (Object result){ >> >>>> ServerSQLData data = (ServerSQLData) >> >> >>> result; >> >> >>>> GWT.log("ArrayList: " + >> >> >>> data.itemCategoryArrayList, null); >> >> >>>> GWT.log("Item Types: " + >> >> >>> data.itemTypeArrayList, null); >> >> >>>> GWT.log("Item Name: " + >> >> >>> data.itemNameArrayList, null); >> >> >>>> GWT.log("Quantity in stock: " + >> >> >>> data.itemQuantityArrayList, >> >> >>>> null); >> >> >>>> } >> >>>> }; >> >> >>>> serviceProxy.getSQLData(callback); >> >> >>>> } >> >> >>>> } >> >> >>>> Can anyone spot what I need to do to get it working? >> >> >>>> Regards, >> >>>> Jack >> >> >>>> On Feb 3, 10:15 pm, Dan Ox <[email protected]> wrote: >> >> >>>>>http://code.google.com/intl/da/docreader/#p=google-web-toolkit-doc-1-. >> >> >>> .. >> >> >>>>> On Feb 4, 8:00 am, >> >> ... >> >> read more ยป > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
