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."

5 of 54 comments (clear)

  1. Re:Java? by bwt · · Score: 3, Interesting

    Java is a very nice OO language. Because of this, there is an extremely large body of existing class libraries that have names that are often abbreviated to acronyms. If you think the "learning curve" is too big, then by all means, use another language and start from scatch.

    Java's slowness is often maligned, but java actually stacks up pretty well if you look at objective benchmarks. In Bagley's Language Shootout, java was 9th of 30 languages tested on linux. It does use a lot of memory, but only because of the overhead associated with the JVM runtime. Of course this is the price for writing code that work on windows, linux, mac, and random unix, so it is a tradeoff many accept. If this really bothers you, get a native java compiler and then you'll have smaller footprints but no portability.

    I use several java apps on my P2 300, so I think you are exagerating. Odds are that you don't have much memory and that is what is slowing you down.

    Java can only be considered a failure
    Really? Java was invented a few years ago. There are now more jobs programming java than any other language. I really don't see how that is a failure.

  2. Java scripting language? by jsse · · Score: 4, Interesting

    Sun's StarOffice division intends to make Java a scripting language for StarOffice,...

    A word processor running scripting language? Doesn't that sound so familiar to everyone?

    which will help customers take advantage of Java's security features. Java's security model works by limiting the areas of the computer the code can manipulate.

    Fortunately, smart people can learn from mistakes of the other and built it with security in mind from the ground up.

    but it doesn't stop the creative minds of programmers.....

  3. 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.
  4. Re:Java? by Anonymous Coward · · Score: 1, Interesting
    I'm being a bit off-topic here, but I thought it would be interesting to see how your program fared in OCaml. First in C to establish the benchmark:
    $ gcc -v
    Using builtin specs.
    gcc version 2.95.4 20020320 [FreeBSD]
    $ time ./fibc 40
    165580141

    real 0m14.607s
    user 0m14.249s
    sys 0m0.017s
    Now in OCaml:
    $ cat fib.ml
    let rec fib n =
    if n < 2 then 1
    else fib (n - 1) + fib (n - 2)
    ;;

    Printf.printf "%d\n" (fib (int_of_string Sys.argv.(1) ) );;

    $ ocamlopt -v
    The Objective Caml native-code compiler, version 3.06
    Standard library directory: /usr/local/lib/ocaml
    $ ocamlopt -o fibm fib.ml
    $ time ./fibm 40
    165580141

    real 0m8.115s
    user 0m7.909s
    sys 0m0.016s
    Not bad I think :) It's interesting to run both without parameters:
    $ ./fibc
    Segmentation fault (core dumped)
    $ ./fibm
    Fatal error: exception Invalid_argument("out-of-bound array or string access")
    High-level, safe, decent efficiency ...
  5. Re:Java? by AJWM · · Score: 3, Interesting

    It's big and slow.

    In some cases, it's faster than C++.

    Don't believe me? Download the Markov examples from Kernighan & Pike's "The Practise of Programming" and time the C++ and Java examples. On a P3-550 I get 3.63 seconds for the C++ and 2.90 seconds for the Java version.

    --
    -- Alastair