Slashdot Mirror


Sun To Give StarOffice Java Flavor

ilovestuff writes "Sun Microsystems is building a Java-based development kit for its StarOffice software to help corporate programmers customise desktop applications, a move that better pits it against Microsoft's dominant Office. The software development kit will be available in the middle of next year as part of a minor upgrade to the business version of Sun's StarOffice 6.0, said Joerg Heilig, director of engineering for StarOffice at Sun."

1 of 54 comments (clear)

  1. Re:Java? by Daleks · · Score: 5, Interesting
    It's big and slow. Very big. Very slow. Java apps/applets aren't usable on my P2 266

    Java is good at some things, worse at others. Look at the following for instance:
    [MyMachine:~] mylogin% uname -a
    Darwin Roadrunner.local. 6.2 Darwin Kernel Version 6.2: Tue Nov 5 22:00:03 PST 2002; root:xnu/xnu-344.12.2.obj~1/RELEASE_PPC Power Macintosh powerpc
    [MyMachine:~] mylogin% gcc -v
    Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
    Thread model: posix
    Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420 (prerelease)
    [MyMachine:~] mylogin% cat fib.c
    #include <stdio.h>

    int fib(int n)
    {
    if (n < 2) return 1;
    else return fib(n-1)+fib(n-2);
    }

    int main(int argc, char *argv[])
    {
    printf("%d\n", fib(atoi(argv[1])));

    return 0;
    }
    [MyMachine:~] mylogin% gcc fib.c -O3 -o fib
    [MyMachine:~] mylogin% time ./fib 40
    165580141

    real 0m9.828s
    user 0m9.660s
    sys 0m0.020s
    And now for Java:
    [MyMachine:~] mylogin% java -version
    java version "1.4.1-alpha"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-alpha-root_22_nov_2002_19_03)
    Java HotSpot(TM) Client VM (build 1.4.1_alpha-7-release, mixed mode)*
    [MyMachine:~] mylogin% cat fib.java

    public class fib
    {
    public static int fib(int n)
    {
    if (n < 2) return 1;
    else return fib(n-1)+fib(n-2);
    }

    public static void main(String[] args)
    {
    System.out.println(fib(Integer.parseInt(args[0]))) ;
    }
    }
    [MyMachine:~] mylogin% javac fib.java
    [MyMachine:~] mylogin% time java -server fib 40
    165580141

    real 0m7.867s
    user 0m7.640s
    sys 0m0.150s
    The results get even more interesting as you compute higher and higher numbers of the Fibonacci sequence. When computing the 43rd Fibonacci number the java bytecode beats the statically compiled C machinecode by a full 10 seconds. For the 44th number it beats it be 19 seconds.

    Does this mean that java bytecode is faster than machinecode in all cases? No. Does the fact that a few java applets on your P2 run poorly mean java itself is slow? No. It is true that Java has poor performance in the GUI realm, but it is great for backend server applications. So making the blanket statement that java is slow or fast in general based on a single or handful of benchmarks is just plain wrong.

    * I'm not running some special optimized pre-release version of Apple's JVM. It's the pre-release 1.4.1 implementation. Nothing that isn't available on Windows, Linux, Solaris, etc.