cant import

I have a simple line which is just

import java.io.* and it is saying that it doesn't recognize import. Is there a library I should install?

Import is Java, not C++

The Arduino is programmed in C++. You can't use Java.

http://arduinobasics.blogspot.com/2012/05/reading-from-text-file-and-sending-to.html

in this example, i want what he basically has but build off of it. This includes imports.

Are you talking about the Processing code? You should probably mention that as this is an Arduino forum so everyone here is going to assume you are writing code for an Arduino.

ktjgupta:
it is saying that it doesn't recognize import

I'm really sure it doesn't say that. It gave you a much more specific error message. If the message is something that you don't understand then don't you think it would make more sense to post the actual error message instead of trying to paraphrase it?

That article uses the Processing IDE. The java code runs on the PC, not on the Arduino.

Normally, the Arduino is programmed in C++. The PC (if needed) may be programmed with anything, including Java.

When you get Java working on an Arduino, please let us know. There are a lot of people who want that.

Sorry, I am a total newbie at arduino. Do you have any ideas on how to read text from a txt file on the computer and have it communicate with an arduino board?

The two things are separate. Can you read from the text file on the PC by itself? That doesn't involve Arduino and is beyond the scope of this forum. Use the Serial line to send it to the Arduino. There's a good reference on Serial on this site as well as @Robin2's famous serial INPUT basics thread. Then you also need to learn how to open a serial port and send data over it from your computer. How that works depends on what particular language you choose to work with on the PC.

Serial Input Basics - simple reliable ways to receive data.

...R

For the pc side of things, there is a dedicated section. There might be something about the Processing stuff.

I suggest that you first get a simple Arduino program working on the Arduino and use the serial monitor to send some text (e.g. a line from your text file) and process it (e.g. echo it back).
Next write the PC side of things to match the Arduino code.

ktjgupta:
Sorry, I am a total newbie at arduino. Do you have any ideas on how to read text from a txt file on the computer and have it communicate with an arduino board?

You would write a program in the language of your choice that runs on the PC, which would open a text file and send it to the arduino via a serial port, bluetooth, or using a network connection.

You would write a program in C++ to run on the arduino that would accept that data