Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / July 2004



Tip: Looking for answers? Try searching our database.

How to Call Java classes through COM in Windows Server 2003 (i.e. without msjava.dll)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dominic - 28 Jul 2004 16:43 GMT
I'm migrating an application from Windows 2000 Server to Windows
Server 2003. The application calls Java classes through COM. It used
to work well through msjava.dll in Windows 2000 Server. However, after
migration to Windows Server 2003, it failed because msjava.dll doesn't
even exist. According to a reply to my earlier posting, I need to
install the Java Software from Sun because Microsoft doesn't provide
Microsoft VM anymore. I did install JRE 1.4.2. It still didn't work.
After more research, I realized that jvm.dll is supposed to replace
msjava.dll.  Therefore, I used regedit to edit the improc server of
the class from msjava.dll to jvm.dll. It didn't work either. Then, I
found the following reply from Microsoft.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=04f601c32124%24c0eca7
a0%24a001280a%40phx.gbl&rnum=3&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3
Dmsjava.dll%2Bjvm.dll%2BCOM


According to the reply, I need to test if jvm.dll implements COM
interface at all. I tested it by regsvr32 jvm.dll. It complained "This
file can not be registered". Apparently, Sun jvm.dll doesn't implement
COM interface.

So, what can I do in order to call java class through COM in Windows
Server 2003?

(I did try to copy the old msjava.dll to Windows 2003
c:\windows\system32\, and regsvr32 it. The call threw an exception
saying "Not enough storage to complete this operation")

Thanks
Dominic
Jim Byrd - 28 Jul 2004 18:03 GMT
Hi Dominic - You can test whether Java is working on your machine at the
following sites:

http://www.pocoso.de/pocoso052.html
http://www.clan.lib.ri.us/clan/javatest.html
http://www.fitwise.com/testjava.asp (both 1.0 and 1.1 and what's installed)
http://coglab.wadsworth.com/support/browsercheck.html
http://www.ces.clemson.edu/webct/browser_detect.html

and you can test Javascript here:
http://www.dancespots.net/browsertest.htm

There is good information concerning all aspects of the Java situation here:
http://www.javatester.org/installing.html

Be aware, however, that after Dec 31, 2007, MS will apparently no longer be
distributing Java or providing any support for Java including security
fixes.  See here:  http://www.microsoft.com/mscorp/java/  so you might want
to start thinking about the future.

You can get the Sun Java J2SE RunTimes or SDK here:
http://java.sun.com/downloads/index.html (all versions - select using the
dropdown)

Sun also offers an automatic download and install of the 1.4 Java plug-in
here: http://java.sun.com/getjava/download.html

For the MS Java VM, you may need to install v.3805 or  v.3809 prior to
upgrading to v. 3810 if you didn't previous have MS Java v. 3805 or 3809
installed.

If your OS is Win2000 SP2, SP3 but NOT SP4 then you can download and install
the MS Java VM v. 3809 from here:
http://download.windowsupdate.com/msdownload/update/v3-19990518/CabPool/Q810030_
W2K_510A502BA8F9B6F19230BB2BCCE87D5474AC9DCD.exe

or here:
http://www.biologylab.awlonline.com/MSJavaVM/Software/en/com_microsoft.windows20
00/x86win2k/com_microsoft.Q810030_W2K_SP4_5849/Q810030_W2K.exe


For Win2000 SP4, you'll need to re-install v.3805, from here:
http://www.download.support.safetec.net/msjavx86/msjavx86.exe
http://www.mvps.org/inetexplorer/msjavx86.exe
http://www.sijet.com/msjavx86.exe

For all other OS's:

Download and install the MS Java VM v. 3809 from one of the links here:
http://ftp.idilis.ro/windows/sp/jvm98/msjavwu.exe,  or here:
http://secinfo.huji.ac.il/patches/Win-xp/msjavwu.exe    or v. 3805 from
here:
http://www.sijet.com/msjavx86.exe

Then upgrade to v. 3810:

For all OS's except Win2kSP4 obtain v. 3810 here:
http://fileforum.betanews.com/detail.php3?fid=1050022631 ,or here:
http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/MSJavWU_
8073687b82d41db93f4c2a04af2b34d.exe


For Win2k - SP2, SP3 - you can also obtain v. 3810 from Microsoft here:
http://download.microsoft.com/download/5/7/7/577b7277-227d-4163-9b18-42335632168
2/Q816093_W2K_SP4_X86_EN.exe


For Win2kSP4, to get 3810 from Microsoft you now have to get Q816093 from
Windows Update Catalog - use the entry for Windows 2000 SP4 (this seems to
be the only Win2k option that has it) and then find 816093 in the list.  You
can find directions for using the Windows Update Catalog functions here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;323166.  (I am
informed by Torgeir Bakken, MVP, that if you rename the downloaded file from
here:   http://fileforum.betanews.com/detail.php3?fid=1050022631  to
msjavwu.exe   it will then also work for SP4.)

The following procedure has also been reported to work for Win2kSP4 by Saybo
at news:de8002e.0407201401.682c493e@posting.google.com:

"I always try to install the 3805 package 1st.  Most of the time that
does not work, so I then have them download the 3810 package, open it
in WinZip and extract msjava.dll and vmhelper.dll to the system32
folder.  Then run the 3810 install. This has had a 100% success rate
for the last couple of months."

Both Java VM's can co-exist on your machine quite nicely. Just select which
one you want to use in Tools|Internet Options|Advanced and restart all IE
browsers. Here, courtesy of Mitch Gallant, MVP Security, is a tiny utility
which allows you to toggle and view status of your current Java VM vendor
associated with IE:
http://www.jensign.com/JavaScience/SelectIEJVM/index.html

A note from Mitch Gallant:

"One note about the JVM Selector utility:   If/when you install a new
version of Sun J2SE, you need to manually select to have Sun JVM as default
JVM for IE (in install), or after install via the JavaPlugin control panel.
This generates the necessary win32 registry entries, which must be present
for the utility to know about JavaPlugin.  After that, the utility should
work properly."

Signature

Please respond in the same thread.
Regards, Jim Byrd, MS-MVP

> I'm migrating an application from Windows 2000 Server to Windows
> Server 2003. The application calls Java classes through COM. It used
[quoted text clipped - 7 lines]
> the class from msjava.dll to jvm.dll. It didn't work either. Then, I
> found the following reply from Microsoft.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=04f601c32124%24c0eca7
a0%24a001280a%40phx.gbl&rnum=3&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3
Dmsjava.dll%2Bjvm.dll%2BCOM


> According to the reply, I need to test if jvm.dll implements COM
> interface at all. I tested it by regsvr32 jvm.dll. It complained "This
[quoted text clipped - 10 lines]
> Thanks
> Dominic
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.