How to fix  Failed to load the JNI shared library  error | Java | Eclipse |

How to fix Failed to load the JNI shared library error | Java | Eclipse |


How to fix Failed to load the JNI shared library error | Java | Eclipse |

In this video, I have explained about “How to fix “Failed to load the JNI shared library” error “.

Download eclipse from the below link: 👇
https://www.eclipse.org/downloads/pac

Download the Java software from the below link: 👇
https://www.oracle.com/in/java/techno

To know about java installation and path setting, watch the below video:👇
   • P3 - How to Download \u0026 Install Java 1…  

To know about eclipse installation, watch the below video:👇
   • P4 - How to Download and Install Ecli…  

✴ Checkout my other playlists: https://bit.ly/3gLIAVL

☕ Buy me a coffee: https://bit.ly/33ljBWc

👑 Join my YouTube channel to get access to perks:👇
   / @hyrtutorials  

==============================================
==============================================
Connect us @
🔗 Website - https://www.hyrtutorials.com
🔗 Telegram - https://t.me/hyrtutorials
🔗 Facebook - https://www.facebook.com/HYRTutorials
🔗 LinkedIn - https://linkedin.com/company/hyrtutor
🔗 Twitter - https://www.twitter.com/hyrtutorials
🔗 Instagram - https://www.instagram.com/hyrtutorials
==============================================
==============================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.

#hyrtutorials #eclipse #jre #jdk #eclipse ide


Content

0.48 -> Hello Guys, I'm Yadagiri Reddy and welcome to my channel H Y R Tutorials
5.04 -> In this video we will see how we can fix one of the most
8.559 -> occurring errors while opening the Eclipse IDE. that is
12.08 -> failed to load jni shared library so in this video we will see how we can fix that
16.8 -> so first let me open the eclipse
21.039 -> so here I have the Eclipse IDE. so let me just open this
25.48 -> so now you can see it is giving me one error right?
28.32 -> failed to load the jni library. so we will see what is the root cause of
34 -> this issue and we will also see how to fix this issue okay...
38 -> so basically this issue occurs because of
40.879 -> mismatch between the java, operating system and eclipse versions.
45.6 -> so for example you have installed
48.16 -> 32-bit operating system and on that 32-bit operating system,
52.48 -> you have installed 32-bit java but you are trying to use a 64-bit eclipse
56.78 -> then there is a mismatch right?
59.52 -> you have the 32-bit operating system and 32-bit java but you are using the
63.359 -> 64-bit eclipse so because of this mismatch, it will
66.72 -> throw you the exception okay... so to avoid that we need to use these combinations
72.5 -> if your operating system is 32-bit version, you need to use the 32-bit java version
77.6 -> then you need to use the 32-bit eclipse version
80.64 -> In case your windows operating system is a 64-bit one
83.68 -> and if your java installed version is 32-bit, then you need to use 32-bit
88 -> eclipse version so if your java version is 64-bit in
91.759 -> windows 64-bit, then you need to use the eclipse 64-bit version okay...
96.6 -> so here in my scenario, what is the cause of this error?
99.119 -> so here it says programFiles(x86)
103.52 -> that means, it is trying to load the 32-bit java
106.079 -> version but i have a windows 64-bit operating system and i am trying
110.56 -> to use a 64-bit eclipse so my eclipse is 64-bit and my windows
115.36 -> operating system is 64-bit but my environment variables are
118.479 -> referring to 32-bit java so there is a mismatch between the
121.92 -> versions right so that is the reason it is giving this error
125.36 -> so this error can be fixed in three methods
128.479 -> the first one is you can update the environment variable
131.52 -> with the proper jdk or jre bin folder path for example if your windows is 64
136.56 -> and eclipse is 64 then you can update the 64 bit jdk bin folder path in your
141.28 -> environment variables and the second option is you can add the
144.84 -> javaw.exe file location in eclipse.ini file. this is a
148.8 -> configuration file so in this file you can add the
151.8 -> javaw.exe location and the third option is you can add the
155.959 -> jvm.dll file location in the eclipse configuration file.
160 -> that is eclipse.ini so we will see all these three methods here now.
164.5 -> so first, I will show you this one
166.4 -> update the environment variables with the proper jdk or jre bin folder path
170 -> so here I will just type environment so i want to modify the environment
175.76 -> variables right? so i open this one so i'll just click on
179.92 -> environment variables and here i need to modify the path
184.239 -> so let me just click on edit so here i have the path variable already
188.239 -> updated but it is referring to 32-bit jdk
191.92 -> so let me just check whether i have the 64-bit java installed or not
196.8 -> so let me go to C -> ProgramFiles -> Java. so this ProgramFiles is a 64-bit one
202.959 -> so if you go to the second one
206.799 -> this one this is a 32-bit okay... so I'm going to 64-bit one
213.519 -> so inside this, I have the java right so I'm going to update this folder
220.879 -> so I'll just modify this I will update the java version to 64 bit
228.799 -> I click on ok ok so now let me just click on ok and I will
234.08 -> try to launch the eclipse again so this time it should not throw me any
239.04 -> error it should open the eclipse. now you see it is asking the workspace
245.12 -> that means it is trying to open without any error okay...
247.76 -> so this is one way of fixing and method two is
251.92 -> add the javaw.exe file location. so to work with this one first let me recreate the error
260.239 -> so here I'm going to update this one to 32-bit java version only
269.12 -> okay so let me open the eclipse. so this time I'm getting the error right
273.759 -> so I'm able to recreate so let me just click on ok
277.199 -> so now we will see this one this method two
280.4 -> so for that I need to go to the eclipse directory
283.52 -> inside the eclipse directory you will have one configuration file
286.88 -> eclipse so you can see configuration settings it will be just below the
290.56 -> eclipse application so just edit that file
295.04 -> so in this file just before the vm args you need to add this command hyphen vm
301.28 -> and you need to provide the javaw.exe file location
304.639 -> so in my case, the javaw.exe file is available here. this one
308.9 -> so I'm using the 64-bit java and I'm updating the path
312.72 -> so let me just copy this
316.56 -> inside the bin folder javaw.exe so now let me just save it.
322.5 -> so I'll just close it and I'll try to open the eclipse again so
326.88 -> this time i should not get the error so now you see it is asking the
332.08 -> workspace that means the issue is resolved
334.56 -> so now we will see the third method
338.24 -> adding the jvm.dll file. so again to look into this one
342.479 -> first let me recreate the issue so I will remove the vm args
347.759 -> so this is the one i have added right so i'll remove this one
351.12 -> i'll save it
354.4 -> so now we are able to recreate the issue right?
357.007 -> so now we will see the third method
359 -> adding the jvm.dll file. so let me modify
362.88 -> this file eclipse configuration file and this time
367.28 -> so basically when you are trying to load the eclipse even though you have set the
371.52 -> jdk bin folder path in your environment variables internally the
375.84 -> eclipse will come to this location it will load the javaw.exe file then it
380.72 -> will go backside and you have a jre installed in your system right
384.56 -> inside the same jdk folder so inside this jre
388 -> it will go to bin folder then server and here you have the jvm
392.319 -> okay so i'm just going to provide this jvm file location
400 -> so the similar way you need to add vm inside the server we have the jvm dot
406.56 -> dll file okay... so let me save it so I'll just try to launch the eclipse again
414 -> so this time I should not get the error
417.44 -> so now you see without any error i'm able to open the
420.8 -> eclipse right so using any of these methods you can
424.639 -> resolve that failed to load JNI shared library error
427.759 -> so the first thing is we need to make sure we have the proper
431.28 -> configurations that means we have the proper java versions and eclipse
435.599 -> versions installed. so make sure you are following
438.319 -> any of this one either this one or this one or this one
443.12 -> so this is the main thing guys so once these are available
446.96 -> then only you can apply any one method from here okay...
450.88 -> so that is for this video guys. I hope you enjoy this video
454.4 -> if you have any doubts or if you are not able to resolve this issue
457.759 -> please let me know in the comment section below
459.871 -> thank you for watching bye bye

Source: https://www.youtube.com/watch?v=4Y9mjyxO8EY