absolute newbie question
Folks,
I'm talking a java class in my "spare time" and just getting started this week.
I'm also very new to linux so it makes things tricky for me figuring out where my problems are.
I'm copying code out of Deitel just to try to get something to compile...
one class is as follows:
// Fig. 3.11: GradeBookTest.java
// GradeBook constructor use to specify the course name at the
// time each GradeBook object is created.
public class GradeBookTest
{
// main method begins program execution
public static void main( String args[] )
{
// create GradeBook object
GradeBook gradeBook1 = new GradeBook(
"CS101 Introduction to Java Programming" );
GradeBook gradeBook2 = new GradeBook(
"CS102 Data Structures in Java" );
// display initial value of courseName for each GradeBook
System.out.printf( "gradeBook1 course name is: %s\n",
gradeBook1.getCourseName() );
System.out.printf( "gradeBook2 course name is: %s\n",
gradeBook2.getCourseName() );
} // end main
} //end class GradeBookTest
This code, and the GradeBook class it is supposed to test, both compile fine, but when I go to run it I get an error:
Exception in thread "main" java.lang.NoSuchMethodError: method java.io.PrintStream.printf with signature (Ljava.lang.String;[Ljava.lang.Object;)Ljava.io.PrintStream; was not found.
at GradeBookTest.main(java.lang.String[]) (Unknown Source)
at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
This seems like a linking type of problem to me, but I'm not really comfortable enough with java or linux to figure out what my problem is.
Do I need to set up some type of config file so java knows where to find the printf method or something?
Thanks a lot in advance if you have an idea
Ben

