I have this big operating system's project where I have to basically write my own mini operating system. I have everything broken into pieces and am taking it step by step. Starting with the loader. Prior to this class, I had no idea how intricate an OS system was and everything is fairly new to me. I've decided to do this in java for various reason mainly b/c it'll be a good refresher for me. Coding isn't my strong point...actually its probably a weak point and it's been 2 yrs since I last worked with java.
Can any1 with the patience and expertise help me through this ordeal? Ok so i understand the basic concept of the loader and i've started something here....the reading the input part. I have yet to get to implementing the part where it loads it into memory [I'll be using an array].
Can someone help me double check this?
import java.io.*;
public class Loader
{
public static void main(String args[])
String line = null;
int count = 0;
try
{
FileReader input = new FileReader();//args[0]);
BufferedReader buffRead = new BufferedReader(new FileReader(input));
while((line=buffRead.readLine()) != null)
{
System.out.println(count+": "+line);
line = bufRead.readLine();
count++;
}
}
catch (IOException e)
{
// catch possible io errors from readLine()
System.out.println("Got an IOException error!");
e.printStackTrace();
}
close buffRead();
}
Thank you! Whoever decides to help me will be getting a lot of this!