Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.2K SQL Developer
- 295.3K Development
- 17 Developer Projects
- 138 Programming Languages
- 292K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 27 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 390 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1K Español
- 1.9K Japanese
- 230 Portuguese
Which JVM am I using?

843807
Member Posts: 46,582
Hi all,
I'm working on testing some java code inside the browser. I've been using the MS JVM for a while, and I wanted test compatibility with the SUN JVM. I installed the 1.4.x J2RE and java plugin, and I expected the SUN magic to happen the next time I ran my app. No luck - when I bring up IE and login to my app server, it looks like it's all going through the MS VM.
Then I notice the IE option "Use Java 2 v1.4.1_01 for <applet>" as an option. It's checked on. Even when I bring up applets, there's no SUN love. My evidence is the fact that View|Java Console will show the MS console and the thread list refers to all of the stuff that I'm looking at.
The thing is, we're not using applets (as far as I know). All of the java code I'm working on are .class files I'm pulling into the browser in signed cabs, being invoked directly from client side HTML. No <applet> tags here.
So, my question - how do I ditch the MS JVM? For applets and for direct java calls?
I'm working on testing some java code inside the browser. I've been using the MS JVM for a while, and I wanted test compatibility with the SUN JVM. I installed the 1.4.x J2RE and java plugin, and I expected the SUN magic to happen the next time I ran my app. No luck - when I bring up IE and login to my app server, it looks like it's all going through the MS VM.
Then I notice the IE option "Use Java 2 v1.4.1_01 for <applet>" as an option. It's checked on. Even when I bring up applets, there's no SUN love. My evidence is the fact that View|Java Console will show the MS console and the thread list refers to all of the stuff that I'm looking at.
The thing is, we're not using applets (as far as I know). All of the java code I'm working on are .class files I'm pulling into the browser in signed cabs, being invoked directly from client side HTML. No <applet> tags here.
So, my question - how do I ditch the MS JVM? For applets and for direct java calls?
Comments
-
The thing is, we're not using applets (as far as I know). All of theDo you notice anything wrong with what you're saying? First, a signed CAB file. Java (real Java) doesn't know what a CAB is. It can handle a signed JAR file, but not a yellow taxi. And what does "being invoked from the client side HTML" mean? Java either works as an Applet using the Applet or Object tag. If neither of those are used, it doesn't run in the browser. (i.e. It's an Application) Of course, if you're performing Windows voodoo to launch it from the browser as something other than an Applet, then you're in unsupportable territory.
java code I'm working on are .class files I'm pulling into the browser
in signed cabs, being invoked directly from client side HTML. No
<applet> tags here. -
Hi bick_at_work,
in order to make your browser load the Java Plugin instead of the Microsoft JVM, you have to change the HTML page which loads your applet. Perform a serach on Sun's website regarding the topic HTMLConverter or have a look at http://java.sun.com/products/plugin/1.3/docs/htmlconv_01.html.
You feed the HTMLConverter with the original HTML file that brings up the applet. Out comes an upgraded version of your HTML page which has some JavaScript code in it, in order to load the Java VM Plugin you need!
I hope this helps!
Mikno -
Thanks for the responses...Do you notice anything wrong with what you're saying?I believe in this case, CAB is the download and archive mechanism of IE, and java shouldn't even see this level. I'll provide an example in a moment...
First, a signed CAB file. Java (real Java) doesn't
know what a CAB is.It can handle a signed JAR file,You are correct. I was looking for <applet> tags, but not <object> tags. The code I'm looking is invoking the java classes via Object tags.
but not a yellow taxi. And what does "being invoked
from the client side HTML" mean? Java either works as
an Applet using the Applet or Object tag. If neither
of those are used, it doesn't run in the browser.
So here is my example (from an offending html file):
<object
code="com.mystuff.MyFunctioningJava.class"
id="MyClassFactory"
name="MyClassFactory"
viewastext>
<param name="useslibrary" value="MyLibrary">
<param name="useslibrarycodebase" value="Download/MyLibraryInAYellowTaxi.cab">
<param name="useslibraryversion" value="1,1,0,10">
</object>
I believe this will extract the necessary class file(s) from the cab, and then load it in the JVM. In this case, the MS JVM no matter what I try. That continues to be my problem...
-
Plain and simple, if you use CAB files, it won't work in true blue (purple?) Java. CAB files are a Microsoft concept and will result in the Microsoft VM being invocated. If you want to use a more standard VM, you either have to use a ZIP or a JAR file. (The difference being that JAR files can be signed.)
Just so you are aware, the plugin is responsible for dealing with whatever file is passed. IE may be capable of understanding CABs, but it's up to the VM to actually do something with it. -
Plain and simple, if you use CAB files, it won't workThank you, this makes sense (curse you, MS!)
in true blue (purple?) Java. CAB files are a Microsoft
concept and will result in the Microsoft VM being
invocated. If you want to use a more standard VM, you
either have to use a ZIP or a JAR file. (The
difference being that JAR files can be signed.)
Just so you are aware, the plugin is responsible for
dealing with whatever file is passed. IE may be
capable of understanding CABs, but it's up to the VM
to actually do something with it.
So if I switch to a JAR or ZIP file, will I automagically use the SUN java plugin? Or are any games I have to play in the Object tag to specifically load the SUN JVM? Like with the Applet tag conversion util that SUN offers? -
I don't know if just changing the code to use a JAR will work or not. The Java Plug-in supports the Object tag, but Sun's done a 180 and dropped the Object tag in favor of the Applet tag (again!). Poke around a bit and you should be able to find the Object syntax if that's what you really want. Using the Applet tag is probably the best way to go however.
Here's Sun's latest info on this:
http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html
This discussion has been closed.