Results 1 to 5 of 5

Thread: Jbuilder5 & code Help!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Jbuilder5 & code Help!!

    Ok will start out with the easy one
    When i go to run my project in Jbuilder i get this error how can i fix it????

    "Warning #: 908 : check sourcepath; source c:\Documents and Settings\Admin\jbproject\Chap2\chap2\chap2.java cannot be found on sourcepath by appending \chap2.java to each sourcepath entry
    "

    Ok and then can someone Debug this i get a error saying that "main" is not valid???

    Code:
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    
    public class chap2 extends Applet
    {
      // Get the current Date and Time ect...
      Calendar calCurrent = Calendar.getInstance();
      TextArea txaDate = new TextArea(5,20);
    
      //Declair variables and addign initial value
      int intDay = calCurrent.get(Calendar.DATE);
      int intMonth = calCurrent.get(Calendar.MONTH);
      int intYear = calCurrent.get(Calendar.YEAR);
    
      public void init()
      {
        //add text area
        add(txaDate);
    
        //Display Dates
        txaDate.append(" Date: " + intMonth +"/" + intDay + "/" + intYear + "\n");
        txaDate.append(" Time: " + calCurrent.get(Calendar.HOUR) + ":" + calCurrent.get(Calendar.MINUTE) + "\n");
      }
    }

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    The syntax is correct and the class compiles fine
    under dos. It seems that JBuilder is looking for a main
    method even though one is not needed for the applet
    which you are trying to compile. I have JBuilder6 and
    i have yet to compile an applet using it. Maybe someone
    else might know how to compile an applet.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    The main error was when i was trying to compile in dos
    the "Warning #: 908 : check sourcepath; source c:\Documents and Settings\Admin\jbproject\Chap2\chap2\chap2.java cannot be found on sourcepath by appending \chap2.java to each sourcepath entry "
    was with Jbuilder5
    Realy starting to piss me off lol

  4. #4
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332
    jbuilder sucks, use something else
    www.jcreator.com
    www.netbeans.org
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    I like JBuilder it works on one project i have made alrdy but now when i make new projects it dont work right lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width