Side note/tangent: You could, in Java, extend the ClassLoader class to find
classes from anywhere if you wanted to.  One of the nice things about Java
ClassLoaders is how flexible they can be.  There should be fancier
ClassLoader extensions shipped with the JDK runtime if you ask me.

You can also use the existing java.net.URLClassLoader to load classes from
funny places by extending and implementing URL protocol handlers to handle
custom protocols.  The following article shows how to write a custom URL
protocol handler to access entries in the Windows 32 registry:

http://developer.java.sun.com/developer/onlineTraining/protocolhandlers/

Scott Stirling
JRun QA
Macromedia

> -----Original Message-----
> From: Haseltine, Celeste [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:16 AM
> To: JRun-Talk
> Subject: RE: Newbie question/Debate
> 
> 
> James, 
> 
> Technically you can use a VC++ class in a Java program, and a 
> Java class in
> a VC++ program, but ONLY on a Windows platform.  Which in 
> essance breaks the
> Java creed of "write once, run anywhere".  You can't say that 
> about the MS
> products.  The biggest difference, in my opinion, is that MS uses the
> concept of the "windows registry" to find external classes, 
> where as Java
> does NOT recognize the concept of a "registry".  Java finds 
> it's external
> classes via the operating systems classpath and/or importing 
> of "packages".
> 
> Even though you can use VC++ classes in Java, and vice versa, 
> it is a real
> pain in the rear to do so.  To work around the "windows 
> registry concept",
> you can use a Java class in VC++ by "registering" it on a 
> windows machine
> using a utility program that is on Sun's site (I can't 
> remember the name of
> the utility off the top of my head), and then calling the 
> methods of the
> Java class.  You can also use a VC++ class in Java by 
> creating a Java class
> file that declares the "native" C++ method(s) using the 
> native keyword, then
> after compiling the class file you create a header file using 
> the javah
> command, and then you create a VC++ dll using the header file 
> created in the
> above step to implement the native method(s) declared in the 
> Java class.  As
> I said, a real pain in the rear.  I've used Java in ASP 
> pages, and I have
> used MS products in JSP pages, but because of the 
> difficulties in getting
> things to "work" together, I prefer to stay solely in Java, unless I
> absolutely HAVE to "integrate" into a MS system, or use a MS tool.
> 
> Celeste

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to