Results 1 to 5 of 5
Thread: error with JCreator
- 08-11-2007, 03:20 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 23
- Rep Power
- 0
error with JCreator
man JCreator looks nice and is the best IDE i have seen yet, but when i compile applets i ALWAYS get a "Exception in thread "main" java.lang.NoSucHMethodError: main" i know it should work here is the applet template i use:
// The "Applet1" class.
import java.applet.*;
import java.awt.*;
public class Applet1 extends Applet
{
public void init ()
{
setBackground (Color.black);
} // init method
public void paint (Graphics g)
{
} // paint method
} // Applet1 class
the code is all there - dunno why it doesnt work tho
- 08-11-2007, 10:14 PM #2
Hi,
I am not using JCreator for a long time. But the error look familiar to me. I think JCreator tries to execute your class as a java application, not a java applet. For that purpose, it tries to find a main method but can not find it and gives this error.
Create a new Java Applet project and add this class to your new project or try changing runtime details (somehow select to run it as an applet instead of application if it is possible) from your project properties.
- 09-22-2007, 08:15 AM #3
I think you may have not create the html file and my kind advice is to use netbeans to run java...
- 09-20-2008, 03:40 PM #4
Member
- Join Date
- Sep 2008
- Posts
- 21
- Rep Power
- 0
I had a similar error with jcreator..
I saved the filename with a different name from the class name.. It worked when I rectified it.. Try maybe..
- 11-29-2008, 08:33 PM #5
Member
- Join Date
- Jan 2008
- Posts
- 16
- Rep Power
- 0
Similar Threads
-
Applet with JCreator
By baltimore in forum Java AppletsReplies: 2Last Post: 04-18-2009, 12:40 PM -
About using jcreator
By yuchuang in forum JCreatorReplies: 4Last Post: 11-29-2008, 08:29 PM -
how to enable jcreator to accept command line arguments?
By Amateur1980 in forum JCreatorReplies: 1Last Post: 11-07-2007, 02:17 PM -
Executable Application, use JCreator
By baltimore in forum New To JavaReplies: 1Last Post: 07-31-2007, 06:03 PM -
compilation error with Jcreator
By Heather in forum JCreatorReplies: 2Last Post: 06-30-2007, 04:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks