Can we bundle applet class as virtual app using Jwrapper

227 Views Asked by At

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..

1

There are 1 best solutions below

1
On BEST ANSWER

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