加微信进交流群:xituxiaoshutong100

HDFView闪退问题

IT技巧 迷途小书童 0评论

软硬件环境

  • windows 10 64bit
  • HDFView 3.1.2

问题

HDFViewh5文件的可视化工具,可是安装后发现就是打不开,一直闪退

hdfview_windows

解决方法

从下载包中看到了一个readme.txt文件,打开后

HDFView 3.1.2
------------------------------------------------------------------------------

This directory contains the binary (release) distribution of
HDFView 3.1.2 that was compiled on:
      Windows win-amd64

with:  Java JDK 15.0.1

It was built with the following options:
   -- SHARED HDF 4.2.15
   -- SHARED HDF5 1.10.7

看到了JDK,难道需要java的运行环境?好吧,先试试看,然后就去oracle下载了jre,安装后,环境变量也设置了,发现还是打开不,闪退。

后来,来到官方论坛搜了搜,发现官方的已知问题列表里,已经有这个问题及其解决方案了。这里他们提供了对应的2个脚本,windows下的hdfview.batunix下的hdfview.sh,链接是: https://portal.hdfgroup.org/display/support/HDFView+3.1.2#HDFView3.1.2-knownprobs>

这里看看windows下的bat文件

@ECHO OFF

rem File Name: hdfview.bat
rem This batch file is used to execute the hdfview utility
rem ... hdfview.root property is for the install location
rem ...... default location is system property user.dir
rem ... hdfview.workdir property is for the working location to find files
rem ...... default location is system property user.home
rem

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

这里需要修改INSTALLDIR环境变量的值,比如HDFView的默认安装路径是C:\Users\admin\AppData\Local\HDF_Group\HDFView,保存后就可以双击运行了

set INSTALLDIR=C:\Users\admin\AppData\Local\HDF_Group\HDFView

hdfview_windows

参考资料

喜欢 (0)
发表我的评论
取消评论

表情