Just a little bit of history(well not really that but its the best word i can think of). Most common (well common a few years ago) languages like C or C++ are compiled to byte code for the particular software/hardware combination for the machine they were compiled on. With windows this was not much of a probelm because the majority of the machines that run windows are based on the i386 (ibm compatible pc) model. However a lot of other machines around (Macs, Sparcs, mips ..) couldnt recognise these files also the couldnt run windows and used some other OS like Solaris, MacOs, linux etc. When an application needed to be run on one of these machines it needed to be re compiled from the source code (which is why a lot of linux programs are distributed as source code, so that the particular flavour of linux didn't need to be know to distribute the software, although you can still get precomplied apps if you can't be bothered compiling them).
The idea with java was that the compiled class files would be executable on any machine under any OS. Java files are compiled to virtual machince byte code, no machine will directly execute these (except for the pico-java processor) instead the will get the java interpreter to perform JIT(just in time) compilation to the native machine code for execution. The clear advantage being that you don't have to publish your source code and you don't have to recompile it for a new platform. the disadvantage, as i'm sure people have noticed, is that the whole proceess is really slow when compared to the native machine code option. Sun are putting effort in making the java interpreter faster making this less of a problem.
Visual basic takes a different approach and just interprets the source code directly. I havent seen any statistics, and i'd be interested if any one has, on how this approach compares to java. Certainly we wont be seeing a VB interpreter for linux any time soon.
Also a interesting piece of info GNU(
who make gcc which really kicks butt for C, are actually working on a java to machine code compiler called gcj (or gjc i cant remember) the idea being to utilise the good libraries provided by java but have them so you can run them as fast as native code. It kind of goes against the idea of java but it will make your applications run faster if you need them to. Last i heard the haddn't implemented any gui stuff (swing and awt) for the compiler but weren't far away. [sig]<p>Chris Packham<br><a href=mailto:kriz@i4free.co.nz>kriz@i4free.co.nz</a><br><a href= > </a><br>A thousand mokeys at a thousand machines, it happened, it got called the internet.[/sig]