[英]how to install java for HDF5view app for Windows 10
I'm getting the following error when I run HDF5view, but can't find instructions on how to install Java, which the error seems to indicate is missing.运行 HDF5view 时出现以下错误,但找不到有关如何安装 Java 的说明,该错误似乎表明缺少该说明。
PS C:\Users\Doug\AppData\Local\HDF_Group\HDFView> .\HDFView.exe
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:///C:/Users/Doug/AppData/Local/HDF_Group/HDFView/app/mods/slf4j-nop-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Doug/AppData/Local/HDF_Group/HDFView/app/extra/slf4j-simple-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Doug/AppData/Local/HDF_Group/HDFView/app/slf4j-nop-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.helpers.NOPLoggerFactory]
java.lang.UnsatisfiedLinkError: C:\Users\Doug\AppData\Local\HDF_Group\HDFView\runtime\bin\hdf5_java.dll: Can't find dependent libraries
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:310)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:280)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2440)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:809)
at java.base/java.lang.System.loadLibrary(System.java:1893)
at jarhdf5@1.10.7/hdf.hdf5lib.H5.loadH5Lib(H5.java:315)
at jarhdf5@1.10.7/hdf.hdf5lib.H5.<clinit>(H5.java:255)
at jarhdf5@1.10.7/hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:29)
at hdf.object.h5.H5File.<clinit>(H5File.java:115)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:377)
at hdf.object.FileFormat.<clinit>(FileFormat.java:227)
at hdf.view.HDFView.createToolbar(HDFView.java:1036)
at hdf.view.HDFView.createMainWindow(HDFView.java:448)
at hdf.view.HDFView.openMainWindow(HDFView.java:280)
at hdf.view.HDFView$39.run(HDFView.java:2571)
at swt/org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
at swt/org.eclipse.swt.widgets.Display.syncExec(Display.java:4735)
at hdf.view.HDFView.main(HDFView.java:2563)
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'int hdf.hdf5lib.H5.H5dont_atexit()'
at jarhdf5@1.10.7/hdf.hdf5lib.H5.H5dont_atexit(Native Method)
at jarhdf5@1.10.7/hdf.hdf5lib.H5.loadH5Lib(H5.java:331)
at jarhdf5@1.10.7/hdf.hdf5lib.H5.<clinit>(H5.java:255)
at jarhdf5@1.10.7/hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:29)
at hdf.object.h5.H5File.<clinit>(H5File.java:115)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:377)
at hdf.object.FileFormat.<clinit>(FileFormat.java:227)
at hdf.view.HDFView.createToolbar(HDFView.java:1036)
at hdf.view.HDFView.createMainWindow(HDFView.java:448)
at hdf.view.HDFView.openMainWindow(HDFView.java:280)
at hdf.view.HDFView$39.run(HDFView.java:2571)
at swt/org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
at swt/org.eclipse.swt.widgets.Display.syncExec(Display.java:4735)
at hdf.view.HDFView.main(HDFView.java:2563)
Failed to launch JVM
PS C:\Users\Doug\AppData\Local\HDF_Group\HDFView>
just had the same issue.只是有同样的问题。 You need to add the runtime\bin folder to your Windows path variable.
您需要将 runtime\bin 文件夹添加到 Windows 路径变量中。
That is due to a known issue with the 3.1.2 release.这是由于 3.1.2 版本的一个已知问题。 It is documented at the HDFGroup support pages .
它记录在HDFGroup 支持页面。 They have provided a bat script that sets properly the JVM vars.
他们提供了一个 bat 脚本,可以正确设置 JVM 变量。 Bellow I paste the code.
下面我粘贴代码。
@ECHO OFF
setlocal enabledelayedexpansion
pushd %~dp0
rem Adjust the following variable to match your environment
set INSTALLDIR=%cd%
set PATH=%INSTALLDIR%\app;%PATH%
set JAVABIN=%INSTALLDIR%\runtime\bin
rem start "HDFView" "%JAVABIN%\javaw.exe" %JAVAOPTS% -Xmx1024M -Djava.library.path="%INSTALLDIR%\app" -Dhdfview.root="%INSTALLDIR%\app" -jar "%INSTALLDIR%\app\HDFView.jar" %*
rem Default invocation when using modules
start "HDFView" "%JAVABIN%\javaw.exe" %JAVAOPTS% -Xmx1024M -Djava.library.path="%INSTALLDIR%\app;%INSTALLDIR%\app\ext" -Dhdfview.root="%INSTALLDIR%\app" -cp "%INSTALLDIR%\app\*" hdf.view.HDFView %*
exit /b 0
You can download the original code or copy it in a hdfview.bat
file on the same folder where you have installed HDFView, run it from the command line and it should work.您可以下载原始代码或将其复制到安装 HDFView 的同一文件夹中的
hdfview.bat
文件中,从命令行运行它,它应该可以工作。
There is also a Linux bash script available as the same error it is produced.还有一个Linux bash 脚本可用,因为它产生了相同的错误。
I had the same issue.我遇到过同样的问题。 Make sure you have below or above java version installed
确保您安装了低于或高于 java 版本
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode)
If that doesn't work run the scripts from HDFgroup to resolve this issue.如果这不起作用,请运行 HDFgroup 中的脚本来解决此问题。 Scripts can be found at https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.2/hdfview_scripts/
可以在https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.2/hdfview_scripts/找到脚本
and the official explanation for the issue can be found at HDFgroup forum https://forum.hdfgroup.org/t/hdfview-3-1-2-issues-and-regressions/7887/3该问题的官方解释可以在 HDFgroup 论坛https://forum.hdfgroup.org/t/hdfview-3-1-2-issues-and-regressions/7887/3 找到
Hope this helps;)希望这可以帮助;)
If the above solutions do not work, please change the installation directory from C:\Users\xxxx\AppData to C:\ProgramFiles\HDFView (create if not exists) and complete the installation.如果以上解决方法都不起作用,请将安装目录从 C:\Users\xxxx\AppData 更改为 C:\ProgramFiles\HDFView (如果不存在则创建)并完成安装。 A successful installation should show the following folders in the installation directory along with the.exe:
成功安装应在安装目录中显示以下文件夹以及 .exe:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.