Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Method call problem in BlueJ

843785Feb 18 2009 — edited Feb 15 2010
Hi All, I started studying programming this Year and I've started in Jave using BlueJ to write the programs.

I am having a problem calling a method and am wondering if anyone can take a look at my code and help???
The error I am getting is _"cannot find symbol - method WriteSerialPort(int,java,lang.String)"_ I have Bolded the area I believe is causing the issue

Here it is:

public class quoteprint
{
public static void main()
{
Boolean status;

status = serial.InitialiseSerialPort(1, 19200, 'E', 1);

if (status == false)
{
System.out.println( "Error initialising " + serial.errorString);
}

if (status == true)
{
status = serial.OpenSerialPort(1);

if (status == false)
{
System.out.println("Error Opening " + serial.errorString);
}

String data = dataToWrite();
status = serial.WriteSerialPort(1, data);

if (status == false) // 'check' code
{
System.out.println("Error Reading " + serial.errorString);
}

}

status = serial.CloseSerialPort(1);

}

// function to return the quote

private static String dataToWrite ()

*{*

return("Blah Blah");

*}*

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2010
Added on Feb 18 2009
15 comments
1,574 views