Windows 7 Registry for Java Runtime points to absent file - jvm

My java programs stopped working today after an upgrade and started giving error: Failed to load shared library, library name: C:\Program Files\Java\jre7\bin\client\jvm.dll
I checked and there is no 'client' directory at this location. There is a 'server' directory that has a jvm.dll.
There was no mention of this path in any configuration file and finally I ended up looking into registry and there under
JavaSoft/Java Runtime Environment/1.7 are four keys. Variable 'RuntimeLib' has this value.
Obviously the dll does not exist at this location. I have reinstalled JRE and again there is no file at this location.
I tried to rename the 'server' folder to 'client' filder but the program gave a different error. 'Unable to find the start class'. So Apparently the jvm in server folder is not the one expected in client folder.
It is a complete 64 bit environment.
Am I the only one who has seen this issue?
Does JRE install create a 'client' folder for you gurs on Windows 7?
Any suggestions?
Thanks

Related

impossible to install a intellij idea

I downloaded the ultimate version of IntelliJ from the official website and when I do ./idea.sh in the .. /bin directory of the file I get this error message in the terminal:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.Error opening zip file or JAR manifest missing : /root/.jetbrains/jetbrains-agent-v3.2.0.de72.619 Error occurred during initialization of VM agent library failed to init: instrument
I don't know if I am supposed to have a .jetbrains file in my repersonel if so why I don't have it and if not how to get it?
Cordially...
What's the environment of your machine and I do not think you need to care about how to get .jetbrains manually by yourself. I've installed a IntelliJ idea on Ubuntu18.04, it works well. You can try run it as an administrative, also you can go to ./bin folder and then run ./idea.sh rather than ../bin folder
btw, as I said install, it does not indicate we need to compile it and get some executable binary file to run it. It's a green software that contains anything you need, you can run it directly
The Error opening zip file or JAR manifest missing : /root/.jetbrains/jetbrains-agent-v3.2.0.de72.619 error indicate that there is a problem with the distribution you have downloaded. It was corrupted or modified improperly.
Re-download it from https://www.jetbrains.com/idea/download and install into a new empty directory.
You can also try deleting the IDE's config and system directories.

SDL2_ttf can't find entry point unless libfreetype-6.dll is in proj folder

I am working with SDL2 and its add-on libraries SDL2_image and SDL2_ttf, using Visual Studio 2017. The libraries, and the .dll files that come with them, are in another folder (C:\SDL2.0\lib\x86), which is in the system path.
When I run, it fails, with this error message:
The procedure entry point InterlockedCompareExchange#12 could not be located in the dynamic link library C:\SDL2.0\lib\x86\SDL2.ttf.dll.
I can fix this by putting libfreetype-6.dll, which comes with SDL2_ttf, in the same folder as the .vcxproj file; or in the Debug folder. I can also fix it by putting the .dll into c:\windows\SysWOW64. But I want to distribute my code, and I don't want to put that file in each folder or require users to have admin access (to access c:\windows\SysWOW64); I want Windows to find it in the PATH, as it does with the other .dll files it's using here.
A few things I tried as I looked around the web for solution (to no effect):
Recompiling libfreetype-6.dll
Downloading the latest versions of all associated libraries
Rearranging the .lib files in Project Properties, Linker, Input, Additional Dependencies. Admittedly I may not have tried all possible arrangements as there are several dependencies
regsvr32 libfreetype-6.dll. This led to a different error message:
The module "libfreetype-6.dll" may not be compatible with the version of Windows that you're running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.
I saw here that maybe I should use the version of regsvr32 in the system32 folder; when I do that, I get
The module "libfreetype-6.dll" was loaded but the entry-point DllRegisterServer was not found. Make sure that "libfreetype-6.dll" is a valid DLL or OCX file and then try again.
So: is there a way to get the program to find libfreetype-6.dll in another folder in the PATH, and eliminate the error message about the procedure entry point?
The program I'm testing on now is from the TrueType tutorial from the LazyFoo website (source).

NuGet with MSBuild Trying to locate the package.config in VS IDE folder

I have a solution running on VS 2017 15.7.4 on Windows 7 and works on 6 machines.
On this new machine (same like the others), I am getting the following when I am trying to compile:
The command ""C:\Projects\MySolution\Source\.nuget\NuGet.exe" install "packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Projects\MySolution\Source\ "" exited with code 1
Could not find file 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\packages.config'.
We tried showing detailed build log, but that wasn't helpful
We rebuilt the machine and same error persisted.
This is a corporate machine with local admin right user account. I am suspecting that the local admin rights might not be implemented properly.
Any suggestions?
NuGet with MSBuild Trying to locate the package.config in VS IDE
folder
Please try to give the full path to the packages.config file:
"C:\Projects\MySolution\Source\.nuget\NuGet.exe" install "<YourProjectPath>\packages.config" -source "C:\Projects\MySolution\Source\"
After hours of investigation, it turned out that the project name is the problem.
The project name (and the namespace) are as follow: MyCompany.MyProject.CMD
(CMD is actually real).
This project was compiling for ages on all machines, however, it didn't do on this particular machine.
We deleted the whole folder structure and recreated it and even formatted the machine.
We tried creating a new project from scratch and calling it the same name - Didn't compile
We tried creating a new project from scratch and called it a different name - Worked!
So solution was changing the project name to MyCompany.MyProject.SomethingElse sorted out the problem. I didn't add CMD as part of the project name, but I will never do and I will pass this to my kids as well.
I didn't want to investigate why it didn't work but CMD resembles the name of the Windows console, would that be the reason? I don't care to know.

MMC snap-in cannot locate a 3rd party DLL located in PATH directory

I am having a problem with a 32-bit MMC snap-ins (on a x64 server 2008 machine). The snap-ins have been successfully registered. When I launch the associated.msc file using the mmc (with 32 bit option), the name(s) of the snap-ins are displayed on the LHS but the RHS shows an error page that says the page could not be loaded.
Using procmon, I think that I have identified that the problem relates to the failure to locate a DLL that is also shipped with the product and used by the snap-in. This is located in a directory c:\\bin and this directory is specified in the PATH environment variable. However, the MMC seems to be looking only in the c:\windows\sysWOW6432 directory (i.e. the 32 bit version of the c:\windows\system32 on the 64 bit machine). I wouldn't mind this if it also went on to search the other directories specified on the PATH (which includes the c:\\bin directory).
I have tested this hypothesis and put the DLLs in the syswow6432 directory and things seem to work correctly from there on out.
I would obviously not want to put all the product specific DLLs in the system directory and would prefer to keep them within the product specific directory.
Can anyone explain the failure to locate the DLL on the PATH and a resolution.
Use the /codebase option of RegAsm.exe when registering your dependent assemblies. You can specify the fully-qualified path to your assembly which will be lazy-loaded when the snapin is selected from the MMC snapin tree.
On 64-bit MS operating systems, in the absence of /codebase, dependent assemblies/DLLs of 32-bit snapins are loaded from the SYSWOW64 directory while 64-bit snapins load dependent assemblies/DLLs from the system32 directory. PATH does not seem to figure into the equation, although, alternatively, you could probably use gacutil.exe to install your dependent assemblies into the GAC vice polluting SYSWOW64.

Error occurred during initialization of VM

I'm getting the following error when running an executable I created on a 64-bit machine using C++ code:
"Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries"
My PATH (shown below) obviously points to jvm.dll since I have that file in both C:\Progra~1\Java\jdk1.6.0_17\jre\bin and C:\Windows\System32
PATH=C:\Program Files (x86)\Gmake\bin;C:\Program Files (x86)\apache-ant-1.7.1\bin;C:\Progra~1\Java\jdk1.6.0_17\bin;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools;C:\Progra~1\Java\jdk1.6.0_17\jre\bin\server;C:\Progra~1\Java\jdk1.6.0_17\jre\bin;C:\Windows\System32
Does anybody have any ideas as to what would cause this error? Thanks.
Use dependency walker to figure out what dll is missing.
I have the same issue when I run the java.exe in my Windows2008 R2 version.
my path was
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files\System Center Operations Manager 2007\
;C:\Java\jdk1.6.0_33\bin
when I run the java.exe under C:\Java\jdk1.6.0_33\bin, it works fine. I found that within the c:\Windows\System32\ comes with a copy of java.exe. When I run the c:\Windows\System32\java.exe, it shows the same error:
C:\>Windows\System32\java.exe
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries
I fixed this issue by moving the C:\Java\jdk1.6.0_33\bin to the beginning of the PATH environment:
PATH=C:\Java\jdk1.6.0_33\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\
Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\System Center
Operations Manager 2007\
Hope this help.
This is how I solved a similar problem:
Used JavaRa: http://singularlabs.com/software/javara/ to remove old java versions.
Restarted the PC.
Re-installed the latest JDK version.
In my case, there was a jvm.dll file in the same folder as my exe file. I simply deleted the jvm.dll from there and it worked. Probably, it preceded the one in the PATH
I got this error as my PATH (environment variable) has not set correctly.
while setting PATH variable, set path of jvm.dll as a very first path in the list
Reboot your machine.
Note: Do not move jvm.dll to your project directory.
I had a complicated case. There was a jvm.dll file in the same folder as my exe file. I deleted it (because it shouldn't be there) but jvm.dll couldn't be find then.
I wanted to solve it by adding %JAVA_HOME%\jre\bin\server to my PATH because jvm.dll is located there. However, it didn't work. It turned out that the Windows loader won't expand the JAVA_HOME variable during searching for jvm.dll in the paths specified in PATH because I defined JAVA_HOME as user's variable. When I defined JAVA_HOME as a system variable, it started working as expected.