Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about JAVA
Message
De
08/12/1999 13:19:28
 
 
À
08/12/1999 09:13:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00300246
Message ID:
00300498
Vues:
28
>>All this talk about MS dropping J++ has started me thinking about what JAVA is. Can anyone answer a few questions?
>>
>
>I'm not a Java programmer, most of this is just from reading, but I'll attempt a few of these...
>
>>(1) Can JAVA code be compiled to a WIN EXE to create desktop applications?
>
>I don't think so. The runtime for a Java app is its Virtual Machine. This Virtual Machine serves as the exe, and wraps the Java code, making the OS invisible to the code (supposedly- apparently, J++ violates this somewhat)

Yes you can create a Win EXE. These EXEs can run bytecode (like FoxPro - can you write an application VFP, according to your logic - no) or be natively compiled (see towerJ). You can also call Java from a C/C++ program or have Java call C/C++ functions.

>
>>(2) Why is JAVA said to be slow?
>
>FOr the reason stated above. It is compiled at runtime. This is probably set to change soon, as one or more Java compilers are developed that will allow Java to be compiled into an exe. (I could be wrong- a product like this might already exist).

Because the people who want Jave to go away like to compare the performance of first generation Java compilers and JVMs agains 4th or greater generation C++ compilers. The current crop of JVMs and compilers are vastly improved. For instance, there is a perceptable improvement between the same code, run in the same JVM, compiled by JBuilder2 and JBuilder3. That implies that the Compiler optimization has improved.


>
>>(3) Can you use ActiveX controls in JAVA? ADO?
>
>I don't think so. Java uses its own component model called whose components are called JavaBeans. ActiveX and ADO are both COM objects, which are MS component model. I would be surprised if there were not a JavaBean tool that had the ability to wrap a COM object's functionality, but this would probably not include ActiveX functionality. (There is at least one tool that allows a COM object to be called through a CORBA interface, and Vice-Versa, so I don't see why a JavaBean/COM bridge wouldn't be possible)

>
>>(4) Can a JAVA application call methods on a VFP COM server?
>>(5) Can you create COM objects with JAVA?
>
>See above

In addition to the CORBA-COM Bridge technique, you can write a C wrapper DLL that provides a JNI interface to the COM object. I've used this technique for just this purpose with good results.

>
>>(6) In a web browser, does JAVA and client side scripting do the same things (i.e, run code to respond to DHTML events)?
>
>Don't confuse Java and JavaScript. One really has very little to do with the other. JavaScript is a language designed to run inside web pages that responds to DHTML events. Java is an entire programming language, with its own set of constructs, object model, and runtime environment. Java apps are easily called from web pages, and can manipulate objects in the page (check out MSDN Library Online), but Java IS NOT Javascript.
>
>
>I hope I haven't confused you more, and please take all this with a grain of salt- I am not a Java expert.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform