MSJVM and msjava.dll for windows XP 64bit

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hello,

It looks that windows xp 32 bit contains msjava.dll by default.
However, windows XP 64 bit has no such a file.
msjava.dll is part of MSJVM.

How can I install MSJVM for windows XP 64?

Thanks.

Peter
 
Hi Armin,

well, it would be much
better to eliminate any references and static/dynamic
imports to that library since you will not know (unless
you explicitly do not allow to run on a different OS
than XP) where someone will start your application. If
you are ok with the fact and you are ready to deal with a
runtime exception, then its ok,..but in reality who will?

I personally recommend not to use the msjava.dll. Peter
should have a look at what his application is linking to
from the msjava.dll by using dependency walker and should
try to find a replacement either in windows api or in another
library that is available on any windows platform. If he hardly
depends on java functionality, then he could scan the system
(filesystem or registry but registry is recommended and first hit)
for any installed java runtimes (mostly sun is available) and check
the java version available, prompting user on fail for missing java
runtime or version.

This whitepaper is higly recommended for java to .net "defectors",... *g*

[Moving Java Applications to .NET]
http://msdn.microsoft.com/en-us/library/ms973842.aspx

There is also the JNI (Java Native Interface)
http://en.wikipedia.org/wiki/Java_Native_Interface

He should have a look at this, too:

https://jna.dev.java.net/

msjava.dll is dead,..we have to deal with that!

regards

Kerem
 
I think there is no 64 bit version (and there will never be; see following
link) of the MSJVM. You have to create a 32 bit version of your
application.

http://www.microsoft.com/mscorp/java/default.mspx
Armin,
thanks for the help.
I installed java from sun for windows xp 64 based on the link above.
however, there is no msjava.dll. I guess sun might use a different name?

I recompiled my application and run it. It still complains missing
msjava.dll from dll walker. is there a way to get rid of this problem?

Thanks.

Peter
 
Hi Peter,

could you send me a picture/screenshot of the dependency walker
and what it displays. Most important is what does it use from msjava.dll,
the functions your application trys to use from the library. Please als send
a secreenshot of the exception your application throws to my email
address,...


regards

Kerem
 
Kerem said:
Hi Armin,

well, it would be much
better to eliminate any references and static/dynamic
imports to that library since you will not know (unless
you explicitly do not allow to run on a different OS
than XP) where someone will start your application. If
you are ok with the fact and you are ready to deal with a
runtime exception, then its ok,..but in reality who will?

I personally recommend not to use the msjava.dll. Peter
should have a look at what his application is linking to
from the msjava.dll by using dependency walker and should
try to find a replacement either in windows api or in another
library that is available on any windows platform. If he hardly
depends on java functionality, then he could scan the system
(filesystem or registry but registry is recommended and first hit)
for any installed java runtimes (mostly sun is available) and check
the java version available, prompting user on fail for missing java
runtime or version.

This whitepaper is higly recommended for java to .net "defectors",... *g*

[Moving Java Applications to .NET]
http://msdn.microsoft.com/en-us/library/ms973842.aspx

There is also the JNI (Java Native Interface)
http://en.wikipedia.org/wiki/Java_Native_Interface

He should have a look at this, too:

https://jna.dev.java.net/

msjava.dll is dead,..we have to deal with that!

Kerem,

I totally agree with you.
The application is an open source code I downloaded. I don't see
any java related code and don't understand where msjava.dll (coming from
mshtml.dll -> shdocvw.dll) comes from. they are all C/C++ code.

From dependency walker and run profiler.
It complains:
Failure starting the process. This application has failed to start
because the application configuration is incorrect. Reinstalling the
application may fix this problem (14001).

Is there a way to check which lib is related?

thanks.

Peter
 
Hi Peter,

what is the name of the open source application and
from where can it be downloaded? When it says application
configuration, this has nothing to do with msjava.dll!! This
is another Problem you have and i guess its a manifest binding
to a special CRT Library you have. Well, you did in C++, so i guess
you will either miss the CRT Library or the Manifest has binding
to a wrong version, but its more likely the first: You just do not have
the Runtime for the Library installed on your system! You have to
copy the CRT DLL in your applications folder together with the manifest
for the CRT Runtime Library.

[Microsoft Visual C++ 2005 Redistributable Package (x86)]
http://www.microsoft.com/downloads/...ee-a3f9-4c13-9c99-220b62a191ee&displaylang=en

[Microsoft Visual C++ 2008 Redistributable Package (x86)]
http://www.microsoft.com/downloads/...34-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

If you are running 64-Bit then you must install the 64-Bit versions
for sure!

First give them a try and then we will see, but i think this
will solve your problem. if not, try removing the manifest
from the project or adjust the dll binding to your CRT Runtime
Version,...

Here is a long Discussion about your Problem:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/36971526-95f3-4a9f-a601-1843c86332c1

Please let us know how you solved it!

regards

Kerem


--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Peter said:
Kerem said:
Hi Armin,

well, it would be much
better to eliminate any references and static/dynamic
imports to that library since you will not know (unless
you explicitly do not allow to run on a different OS
than XP) where someone will start your application. If
you are ok with the fact and you are ready to deal with a
runtime exception, then its ok,..but in reality who will?

I personally recommend not to use the msjava.dll. Peter
should have a look at what his application is linking to
from the msjava.dll by using dependency walker and should
try to find a replacement either in windows api or in another
library that is available on any windows platform. If he hardly
depends on java functionality, then he could scan the system
(filesystem or registry but registry is recommended and first hit)
for any installed java runtimes (mostly sun is available) and check
the java version available, prompting user on fail for missing java
runtime or version.

This whitepaper is higly recommended for java to .net "defectors",... *g*

[Moving Java Applications to .NET]
http://msdn.microsoft.com/en-us/library/ms973842.aspx

There is also the JNI (Java Native Interface)
http://en.wikipedia.org/wiki/Java_Native_Interface

He should have a look at this, too:

https://jna.dev.java.net/

msjava.dll is dead,..we have to deal with that!

Kerem,

I totally agree with you.
The application is an open source code I downloaded. I don't see
any java related code and don't understand where msjava.dll (coming from
mshtml.dll -> shdocvw.dll) comes from. they are all C/C++ code.

From dependency walker and run profiler.
It complains:
Failure starting the process. This application has failed to start because
the application configuration is incorrect. Reinstalling the application
may fix this problem (14001).

Is there a way to check which lib is related?

thanks.

Peter
 
Hi Peter,
The application is an open source code I downloaded. I don't see
any java related code and don't understand where msjava.dll (coming from
mshtml.dll -> shdocvw.dll) comes from. they are all C/C++ code.

From dependency walker and run profiler.
It complains:
Failure starting the process. This application has failed to start
because the application configuration is incorrect. Reinstalling the
application may fix this problem (14001).

Is there a way to check which lib is related?

It seems that the vc runtime dlls are missing.

Which version of VS do you use to build the open source project?
Do you build as 32 or 64 bit?

If it is a standalone exe you might want to switch to using the
static runtime. See your project properties for C/C++ code
generation: runtime /MT (and /MTd for debug version).

Otherwise you will need to install the vcredist package which
fits your VC++ version (2005 RTM/SP1, 2008 RTM/SP1)
 
Kerem said:
Hi Armin,

well, it would be much
better to eliminate any references and static/dynamic
imports to that library

I assumed that he wants to use it.


Armin
 
Peter said:
Armin,
thanks for the help.
I installed java from sun for windows xp 64 based on the link above.
however, there is no msjava.dll. I guess sun might use a different
name?

Yes. You'd have to make use of Sun's JRE instead.
I recompiled my application and run it. It still complains missing
msjava.dll from dll walker.

You recompiled as a 32 bit application? All components? MSJVM has been
installed?
is there a way to get rid of this problem?

Use another component that is still supported and exists in a 64 bit
version.


Armin
 
I recompiled my application and run it. It still complains missing
You recompiled as a 32 bit application? All components? MSJVM has been
installed?

I recompile as a 64 bit application.
sun java run time has been installed already.

all compiled from command line not from visual studio.

attached is related compiler and link option:

CC=cl
RC=rc
LD=link


CXXFLAGS=-TP -W4 -Zc:forScope -Zc:wchar_t -D_CRT_SECURE_NO_DEPRECATE=1
-D_CRT_NONSTDC_NO_DEPRECATE -DPLAT_WIN=1 -UPLAT_GTK
CCFLAGS=-TC -W3 -wd4244 -D_CRT_SECURE_NO_DEPRECATE=1

# For something scary:-Wp64
CXXDEBUG=-Od -MT -DDEBUG -Zi
# Don't use "-MD", even with "-D_STATIC_CPPLIB" because it links to
MSVCR71.DLL
CXXNDEBUG= -MT -DNDEBUG
NAME=-Fo
LDFLAGS=-OPT:NOWIN98
LDDEBUG=-DEBUG
LIBS=KERNEL32.lib USER32.lib GDI32.lib COMDLG32.lib COMCTL32.lib
ADVAPI32.lib IMM32.lib SHELL32.LIB OLE32.LIB
NOLOGO=-nologo


It is a C/C++ project and not sure why java is related here?

Thanks

Peter
 
Hi Peter,
I recompiled my application and run it. It still complains missing
msjava.dll from dll walker. is there a way to get rid of this problem?

Dependency Walker shows which module depends on msjava.dll, is
it really your exe or any other dll?

If msjava.dll is shown in dep walker with an hour glass on its icon then
this dll is not your problem as it is only needed when functions of it
are called.

Does the app run on the machine you compiled it on? If so, then
you only miss the vc runtime on the target machine you copied your
exe to.
 
Hi Sven,

it has already been solved. it was a wrong entry
in the manifest file. the manifest file was compiled
with a 32 bit dependency to a common control for
a 64 bit executable. Sure this will never work. I think
Peter forgot to post the solution here. I told him to
removed all the platform dependend entries from the
manifest and that solved his problem,...

regards

Kerem
 
Hi Kerem,
it has already been solved. it was a wrong entry
in the manifest file. the manifest file was compiled
with a 32 bit dependency to a common control for
a 64 bit executable. Sure this will never work. I think
Peter forgot to post the solution here. I told him to
removed all the platform dependend entries from the
manifest and that solved his problem,...

thanks for the update and good it is solved.
 
Back
Top