0

when I am trying to define my applet as Main class

<JWrapper>

    <!-- The name of the app bundle -->
    <BundleName>MemoryMap</BundleName>

    <!-- The specification for one app within the bundle -->
    <App>
      <Name>MemoryMap</Name>
      <LogoPNG>sampleapp/logo.png</LogoPNG>
     <MainClass>com.example.SampleApplet</MainClass>


    </App>

getting below exception Caused by: java.lang.NoSuchMethodException: com.example.SampleApplet.main([Ljava.lang.String;)

Not sure if we cannot define applet class as main class , does that mean Jwrapper could not bundle Applet?

Please suggest..

Vijeta Rana
  • 15
  • 1
  • 4

1 Answers1

0

Its not possible to specify an Applet or JApplet as the main class in a JWrapper application however converting an Applet or JApplet to a standalone class is usually a simple process of just creating a JFrame and embedding the applet UI into it, then specifying a main method to launch the JFrame.

Here's an example:

http://www.coderanch.com/t/337839/GUI/java/Convert-Applet-Stand-app

AntonyM
  • 1,602
  • 12
  • 12
  • Thanks for the reply ... I converted my Applet to standalone class and it worked well. I read that JWrapper can be used as an Applet alternative , however when I bundled my app (Applet converted to standalone swing class) I saw an option to launch it as an offline /online exe i.e. as virtual app or as an Applet . Wondering if we launch it as an Applet then how it would overcome Applet problems -- like reliance on an client System Jre , security settings etc..? May be I am not getting how JWrapper is termed as an Applet alternative? – Vijeta Rana Jun 08 '15 at 03:25