Re: printf doesn't work for me.



potteryglazefire@xxxxxxxxx wrote:
The Java code below works under a Solaris machine I have access to, but
not Fedora Core 5. The
thing that's not working is "printf". I'm guessing I have a problem
with a library, but I'm not sure. I'm not well versed in Java, so, can
someone help me figure out how to get printf to work?

// Begin
public class PiTest
{
public static void main(String[] args)
{
double pi = Math.PI;
System.out.printf("pi = %5.3f%n", pi);
}
}
// End

What version of Java / JVM you use on Fedora?
Their default Java is GCJ. printf() is recent addition of Java 1.5. I will probably not work with GCJ and SUN Java versions < 1.5.
.



Relevant Pages

  • Re: Database applications in Linux
    ... Java requires a JVM -- C doesn't. ... understand what you believe are the lines between JVM, a program loader ... > away from the OS kernel. ... there are printf implementations where the interpreter is ...
    (comp.os.linux.development.apps)
  • Re: Java code works under Solaris, but not FC5
    ... thing that's not working is "printf". ... I'm not well versed in Java, so, can ... I'm guessing that your fedora installation only has version ... I have been searching for a FC5 RPM that would get me to 1.5, ...
    (comp.os.linux.development.apps)
  • Re: Java code works under Solaris, but not FC5
    ... thing that's not working is "printf". ... I'm not well versed in Java, so, can ... public class PiTest ... I'm guessing that your fedora installation only has version ...
    (comp.os.linux.development.apps)
  • Re: Java code works under Solaris, but not FC5
    ... thing that's not working is "printf". ... I'm not well versed in Java, so, can ... I'm guessing that your fedora installation only has version ... I have been searching for a FC5 RPM that would get me to 1.5, ...
    (comp.os.linux.development.apps)
  • Re: printf doesnt work for me.
    ... thing that's not working is "printf". ... public class PiTest ... Their default Java is GCJ. ...
    (comp.lang.java.help)