Problem compiling my first program; Please Help me!

Please HELP, what am I doing wrong?
For over 5hours I have been trying to figure out how to compile a simple Hello world program using sdk1.3.1_02/j2re1.3.1_02 and I am getting the following errors: helloworld.java:2 cannot resolve symbol
symbol : class string
location : class helloworld
cannot reolve the string symbol
symbol : class out
location : package system
I want to program in java so badly but I am trying to get my environment set so that I can take off. To compile my first program has been a disaster!!
This is my path:
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1_02\BIN
Thanks very much in advance
::(

Java is case sensitive,
use String instead of string. and System.out instead of system.out
Sudha

Similar Messages

  • Problem with simple drawing program - please help!

    Hi,
    I've only just started using Java and would appreciate some help with a drawing tool application I'm currently trying to write.
    The problem is that when the user clicks on a button at the bottom of the frame, they are then supposed to be able to produce a square or circle by simply clicking on the canvas.
    Unfortunately, this is not currently happening.
    Please help!
    The code for both classes is as follows:
    1. DrawToolFrame Class:
    import java.awt.*;
    import java.awt.event.*;
    public class DrawToolFrame extends Frame
    implements WindowListener
    DrawToolCanvas myCanvas;
    public DrawToolFrame()
    setTitle("Draw Tool Frame");
    addWindowListener(this);
    Button square, circle;
    Panel myPanel = new Panel();
    square = new Button("square"); square.setActionCommand("square");
    circle = new Button("circle"); circle.setActionCommand("circle");
    myPanel.add(square); myPanel.add(circle);
    add("South", myPanel);
    DrawToolCanvas myCanvas = new DrawToolCanvas();
    add("Center", myCanvas);
    square.addMouseListener(myCanvas);
    circle.addMouseListener(myCanvas);
    public void windowClosing(WindowEvent event) { System.exit(0); }
    public void windowOpened(WindowEvent event) {}
    public void windowIconified(WindowEvent event) {}
    public void windowDeiconified(WindowEvent event) {}
    public void windowClosed(WindowEvent event) {}
    public void windowActivated(WindowEvent event) {}
    public void windowDeactivated(WindowEvent event) {}
    2. DrawToolCanvas Class:
    import java.awt.*;
    import java.awt.event.*;
    public class DrawToolCanvas
    extends Canvas
    implements MouseListener, ActionListener {
    String drawType="square";
    Point lastClickPoint=null;
    public void drawComponent(Graphics g) {
    if (lastClickPoint==null) {
    g.drawString("Click canvas first",20,20);
    } else {
    if (drawType.equals("square")) {
    square(g);
    else if (drawType.equals("circle")) {
    circle(g);
    public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("square"))
    drawType="square";
    else if (event.getActionCommand().equals("circle"))
    drawType="circle";
    repaint();
    public void mouseReleased(MouseEvent e) {
    lastClickPoint=e.getPoint();
    public void square(Graphics g) {
    g.setColor(Color.red);
    g.fillRect(lastClickPoint.x, lastClickPoint.y, 40, 40);
    g.setColor(Color.black);
    public void circle(Graphics g) {
    g.setColor(Color.blue);
    g.fillOval(lastClickPoint.x, lastClickPoint.y, 40, 40);
    g.setColor(Color.black);
    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mousePressed(MouseEvent e) {}
    public void mouseClicked(MouseEvent e) {}
    Any help would be appreciated!

    Some of the problems:
    1) nothing calls drawComponent(Graphics g)
    2) Paint(Graphics g) has not been overriden
    3) myCanvas is declared twice: once as an instance variable to DrawToolFrame, and once local its constructor. Harmless but distracting.

  • I have windows 8 and I got this error "Adobe Photoshop has stopped working" whenever I start a program. please help. how can I fix this problem? many thanks

    i have windows 8 and I got this error "Adobe Photoshop has stopped working" whenever I start a program. please help. how can I fix this problem? many thanks

    Please read these and proceed accordingly:
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
    http://forums.adobe.com/docs/DOC-2325

  • Cannot Compile....please help

    I am trying to compile the program below. I have set my class path, but this is the first time I have tried to import files. The attached program is in a folder called C:\csci3753
    My import files are in subdirectories of C:\jdk1.3.1_02
    I get the following error:
    C:\csci3753>javac -sourcepath . MultipleSelection.java
    error: cannot read: MultipleSelection.java
    1 error
    I attached the code, I think it is the way I am setting up my compile line...please help.
    // Multiple-Selection Lists
    // Copying items from one list to another.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public static void main(String[] args)
              MultipleSelection ms = new MultipleSelection();
              ms.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing(WindowEvent e)
                             System.exit(0);
    public class MultipleSelection extends JFrame
         private JList colorList, copyList;
         private JButton copy;
         private String colorName[] = {"Black", "Blue", "Cyan","Dark Gray","Gray",
         "Green","Light Gray","Magenta","Orange",
                        "Pink","Red","White","Yello","White"};
    public MultipleSelection()
              super("Multiple Selection List");
              Container c = getContentPane();
              c.setLayout(new FlowLayout());
              colorList = new JList(colorName);
              colorList.setVisibleRowCount(5);
              colorList.setFixedCellHeight(15);
                        colorList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
              c.add(new JScrollPane(colorList));
              copy = new JButton("Copy >>>");
              copy.addActionListener(
                   new ActionListener() {
                        public void actionPerformed(ActionEvent e)
                             copyList.setListData(colorList.getSelectedValues());
              c.add(copy);
              copyList = new JList();
              copyList.setVisibleRowCount(5);
              copyList.setFixedCellWidth(100);
              copyList.setFixedCellHeight(15);
              copyList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
              c.add(new JScrollPane(copyList));
              setSize(300, 120);
              show();

    If you are compiling from the same directory as the source file, then you don't need a sourcepath. Just type:
    javac MultipleSelection.javaThe import files will be found as long as you have the C:\jdk1.3.1_02\bin directory in your command path.
    By the way, you will need to move the 'main' method into the MultipleSelection class to compile correctly.
    Hope this helps.
    Jeff Hurt

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • My MacBook get's hot really quick and then discharge's quickly without opening any program, please help.

    My MacBook get's hot really quick and then discharge's quickly without opening any program, please help.
    I have checked the cooling fan, and it's working, and I took it to an IT technician and he said my hardware is allright, so is it a problem from the OS it self??
    OS X(10.8.5)

    Restart with the Option key held down and the Mac OS X install disk inserted, provide the firmware password, click on the DVD, press the button with the straight arrow, access the firmware settings, disable the password, and use FireWire Target Disk mode. If you can't do that or it doesn't work, contact Apple.
    (38384)

  • TS3899 In my iPad 2 with IO6 today I can not send emails from my gmail account, they go to the outbox directly...why? How can i solve this problem? ..I restarted the IPad but the problem was not solved. Please help.

    In my iPad 2 with IO6 today I can not send emails from my gmail account, they go to the outbox directly...why? How can i solve this problem? ..I restarted the IPad but the problem was not solved. Please help.

    Greetings,
    Questions:
    1. What version of the Mac OS are you running (Apple > About this Mac)?
    2. What version of the iOS are you running (Settings > About)?
    3. Do you use MobileMe/ iCloud or another server based sync solution like Google or Yahoo?
    4. Do other changes to synced information like Address Book content sync successfully back and forth?
    Based on your description it sounds like you have a 1 way sync issue.  Events sync fine between the iOS devices and fine from the computer to the iOS devices but not from the iOS devices to the computer.
    Try:
    Backup your computer and iOS devices before doing anything else:
    http://support.apple.com/kb/HT1427
    http://support.apple.com/kb/ht1766
    Ensure all the devices in use are fully up to date: Apple > Software Update / Settings > General > Software Update
    Make separate backups of critical data:
    Backup your computer Addressbook: http://docs.info.apple.com/article.html?path=AddressBook/4.0/en/ad961.html
    Backup your computer iCal: http://support.apple.com/kb/HT2966
    Reset syncing on your Mac: http://support.apple.com/kb/TS1627
    Reply back if that does not resolve your issue.
    Hope that helps.

  • I'm having a problem saving a pages document as another format, like a Word document or PDF file.  I've never had this problem in the past.  Please help me!  I need to have this fixed a.s.a.p.

    Hello everyone,
    I'm currently having a problem saving a Pages document as another format, such as a Word document or PDF file.  I've never had this problem before with Pages.  Please help me!  I need to have this completed a.s.a.p.
    Thanks,
    Amy

    To save as a PDF, you do that from Print
    To save as Wrod format, you export
    Allan

  • HI YANN/VADIM...Still having problem in BADIs...please help me out

    Hi Yann/Vadim,
    Facing a problem in BADI can u please help me out...
    I am implementing sourcing dashboard.
    I am facing problem while implementing the badi BBP_ECS_PO_OUT_BADI in SRM. and BBP_PO_INBOUND_BADI in R3.
    i have written following code in BBP_ECS_PO_OUT_BADI in SRM
    method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.
    data : ls_item type BBP_PDS_PO_ITEM_D.
    data : w_customer_fields type BBPS_IF_CUSTOMER_FIELDS_PI.
    move 'POITEM' to w_customer_fields-refobject.
    move 'CATALOGID' to w_customer_fields-fieldname.
    move ls_item-catalogid to w_customer_fields-container.
    append w_customer_fields to ct_bapi_customer_fields.
    endmethod.
    i have created field zsrmcatalogid field in R3 in EKPO table.and i am now implementing the Badi in R3 for BBP_PO_INBOUND_BADI .....in extended classic scenario.
    i have written following code in R3 BADI
    method IF_EX_BBP_PO_INBOUND_BADI~BBP_MAP_BEFORE_BAPI.
    data : wa_customer_fields type bbps_if_customer_fields,
    wa_bapi_te_mepoitem type bapi_te_mepoitem,
    wa_bapi_te_mepoitemx type bapi_te_mepoitemx,
    wa_extensionin type bapiparex.
    data : txt_960(960) type c.
    read table bbp_customer_fields into wa_customer_fields with key
    refobject = 'POITEM' fieldname = 'CATALOGID'.
    if sy-subrc eq 0.
    move wa_customer_fields-container TO
    wa_bapi_te_mepoitem-zsrmcatalogid.
    wa_bapi_te_mepoitemx-zsrmcatalogid = 'X'.
    endif.
    clear txt_960.
    clear wa_extensionin.
    write wa_bapi_te_mepoitem to txt_960 left-justified.
    wa_extensionin-structure = 'BAPI_TE_MEPOITEM'.
    wa_extensionin-valuepart1 = txt_960(240).
    wa_extensionin-valuepart2 = txt_960+240(240).
    wa_extensionin-valuepart3 = txt_960+480(240).
    wa_extensionin-valuepart4 = txt_960+720(240).
    append wa_extensionin to bapi_extensionin.
    clear txt_960.
    clear wa_extensionin.
    write wa_bapi_te_mepoitemx to txt_960 left-justified.
    wa_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
    wa_extensionin-valuepart1 = txt_960(240).
    wa_extensionin-valuepart2 = txt_960+240(240).
    wa_extensionin-valuepart3 = txt_960+480(240).
    wa_extensionin-valuepart4 = txt_960+720(240).
    append wa_extensionin to bapi_extensionin.
    endmethod.
    But its not working...
    The PO details are not passed from SRM to R3.......
    PLEASE CAN U GIVE ME EXACT CODE FOR CHANGES TO BE MADE IN THIS BADI ..AS IT IS NOT WORKING...
    Can anybody help me regarding how to debug the BADI in R3.
    Thanks in Advance...

    Hi Ravi,
    You can transfer the standard SRM catalog ID field to R/3 tracking number field (if not already used for another purpose) in the R/3 PO.
    This will avoid to implement the R/3 inbound bapi.
    Here is an extract of the code.
    The ECS PO badi example was here used to transfer the unlimited delivery flag to R/3 PO for a Z combination of criteria as well as the transfer of <b>catalog ID</b> to <b>tracking number field</b> in R/3 PO :
    method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.
    update unlimited delivery flag in R3 PO for combination of vendor +
    Product Category maintained in the bespoke table ZUD_PC_VNDR ..
      LOOP AT ct_bapi_poitem INTO ls_bapi_poitem.
        lv_tabix = sy-tabix.
        IF ls_bapi_poitem-po_item IS NOT INITIAL.
          READ TABLE it_item INTO ls_item
               WITH KEY number_int = ls_bapi_poitem-po_item
                          del_ind    = ' '.
          IF sy-subrc = 0.
    Set Unlimited delivery Flag
            read table li_zud_pc_vndr into ls_zud_pc_vndr
                            with key partner       = ls_partner-PARTNER_ID
                                       category_id = ls_item-category_id.
            if sy-subrc eq 0.
              ls_bapi_poitem-UNLIMITED_DLV = 'X'.
            endif.
    Set the Dummy catalog.. entry..
            if ls_item-catalogid eq c_dummy.
              ls_bapi_poitem-TRACKINGNO = c_noncat.
            endif.
            ls_bapi_poitem-GR_BASEDIV = ' '.
            modify ct_bapi_poitem from ls_bapi_poitem index lv_tabix
                          transporting UNLIMITED_DLV TRACKINGNO GR_BASEDIV.
          ENDIF. "READ TABLE it_item ..
        ENDIF.   "IF ls_bapi_poitem-po_item ..
      ENDLOOP.   "LOOP AT ct_bapi_poitem ..
    endmethod.
    Kind regards,
    Yann
    PS : please do reward helpful answers ))

  • I have a really really big problem to my iphone icloud please help me i could send you my birth certificate for confirmation that im the real user please help me

         i have a really really big problem to my iphone icloud please help me i could send you my birth certificate for confirmation that im the real user please help me apple.corp and please tell me if this is not possible to be done it almost a month that i cant use my iphone.
         thank you for those who read this
    <Email Edited by Host>

    Remove your email address.  This is a public website, and you are addressing thousands of strangers.
    After doing that, tell us what your issue actually is.  This is a user-to-user technical forum.  You are not addressing Apple here.

  • Firefox is having problems with "Southwest Airlines website" Please help soon

    Whenever I go on Southwest Airline website, it does not work. I am having this problem since last month. Please help on this as soon as you can.

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Other things that need your attention:
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    * Shockwave Flash 10.0 r22
    * Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://kb.mozillazine.org/Flash
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://kb.mozillazine.org/Java
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)

  • If i want to learn unix-HP for SAP at first stage, please help me.

    Dear Friend,
    If i want to learn unix-HP for SAP at first stage, please help me.
    Thanks,
    Regards,
    sachin

    Hi Sachin,
                  please go thru the following url
    http://www.uga.edu/~ucns/wsg/unix/gstart/
    and
    http://whitepapers.techrepublic.com.com/whitepaper.aspx?&docid=10197&promo=100511
    happy learning!
    with BR,
    Raj
    <i> award points, plz </i>

  • HT4623 why my device  had "no service" even I already put my sim card..I have follow a few instruction from you tube how to solve this problem but all failed. Please help me .TQ

    why my device  had "no service" ..I have follow a few instruction from you tube how to solve this problem but all failed. Please help me .TQ

    See if anything in this support document help http://support.apple.com/kb/ts4429

  • TS3376 I was able to use the findmyiphone app last week, but now I have been getting an error message "Can't load findmyiphone.  There was a problem loading the application."  please help as we are trying to locate an ipod with pics of a no deceased loved

    I was able to use the findmyiphone app last week, but now I have been getting an error message "Can't load findmyiphone.  There was a problem loading the application."  please help as we are trying to locate an ipod with pics of a no deceased loved one.

    Had the same problem and the same message --  was suddenly unable to access icloud apps on my pc, also using Windows 7 and Internet Explorer. After several days of pulling my hair out, decided to try a different browser and was able to get in by using Firefox instead of Internet Explorer.  Hope this helps. 

  • Connecting two programs - please help

    Hi, I'm new here, so I'd like to say 'hi' to everyone :) I'm a freshman in the java comunity, so please be gentle.
    Firs of all I'd like to ask how to resolve the first problem. I've got the code which is responsible for convert a html document to the txt file. It looks like:
    import javax.swing.text.html.parser.*;
    import javax.swing.text.html.*;
    import javax.swing.text.*;
    import javax.swing.*;
    import java.io.*;
    public class TextFromHtml extends HTMLEditorKit.ParserCallback{
    static String trimmss(String o){
       return (o.trim()).replaceAll("\\s+", " ");
    public void handleText(char[] data, int pos){
    try{
          String o = new String(data);
          PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.txt", true)));
          o = trimmss(o);
          pw.println(o);
          //pw.close();
         catch (IOException exc){}      
    System.out.println(new String(data));
      public static void main(String args[]){
        try{
          String s = JOptionPane.showInputDialog("Enter the name of the file you want to convert from html to txt.");     
          Reader r = new FileReader(s);
          ParserDelegator parser = new ParserDelegator();
          HTMLEditorKit.ParserCallback callback = new TextFromHtml();
          parser.parse(r, callback, true); 
        catch (IOException e){
          e.printStackTrace();
         System.exit(0);
    }But unfortunately I don't know how to change this code to obtain such situation as making a new txt file without blank spaces > 0 and erasing the \n new lines. I'd like to get a txt file, which contains of line-by-line text. Could you please help me - tell & show me how to do that? I'd be very grateful
    Regards, skullscape.

    Hi Skullscape,
    My apologies for not getting a response on this forum, but this may have been because this is a fairly generic Java programming question, rather than an issue specific to the JSE product, the purpose of this particular forum.
    So may I suggest that you check out http://java.sun.com/ which has a full set of facilities for those such as yourself who are new to Java programming.
    Although by now you nay not be such a novice :-)

Maybe you are looking for

  • Server 2012 R2 Network Teaming Issues After Adding WOW64 Feature

    Recently I have had a specific issue adding the WOW64 feature to an active Server 2012 R2 server in core mode (no management).  The server had two active virtual machines.  A server 2008 R2 in version 1 mode and a 2012 R2 in version 2.   All were up2

  • Data Streaming in JSP custom tag

    We have a JSP custom tag which uses a StringBuffer object to store the HTML content. In the doEndTag method, we use the JSPWriter's print method to send the buffer's content to the browser. Now, there are cases when the HTML content becomes very larg

  • Debugger gets hanged on call to stored procedure

    We are using Forms 6i Patch 12. The Forms Debugger is getting hanged whenever it encounters a line making a call to stored procedure. In earlier versions, we debugger used to "Step Over" instead of allowing a "Step into" on such statements. Any Solut

  • Email photos taken

    Taken some photos using the camera. When i want to send out using email, i was ask to reduce the photo size to either small, medium or large. When i press the option, nothing happen. Can anyone help ? How to reduce the photos image size and email out

  • Time machine says you can't do that

    Hello everyone, I'm trying to use time machine for the first time but to no avail. When I try to restore my entire HD it says "Applications' can't be modified or deleted beacuse it's required by Mac OSX'' I haven't got a clue why.. do I have to boot