Simbad requires Java 3D

柔情痞子 提交于 2019-12-25 07:27:38

问题


Context:

  • MS Windows 8,
  • jre7 preinstalled by MS Windows setup,
  • MS Windows PATH environment variable has set to JRE7 bin folder - C:\Program Files (x86)\Java\jre7\bin,
  • simbad-1.4.jar is downloaded into a local folder.

Use cases:

  • simbad-1.4.jar is run by command line

    java -jar simbad-1.4.jar

  • or by just double-clicking on simbad-1.4.jar

In both cases

Simbad requires Java 3D

error message box appears.

Yes, I know, setting-up Java 3D should probably fix the issue but I'd like to just deliver/setup Java 3D together with/in a subfolder to simbad-1.4.jar IOW to not install Java 3D into a standard C:\Program Files (x86)\Java\Java3D location.

Please advise how can I setup Java 3D packaged together with simbad-1.4.jar, or answer a more general question:

  • How to deploy a Java client application, which uses Java 3D, packaged together with Java 3D library?

P.S. I know about and I have used -classpath option to successfully run other sample java client apps' .jar(s) I have made exported by using Eclipse but they haven't used nor Java 3D nor simbad-1.4.


回答1:


I'm using a slightly different environment (Win7-64bit, JDK 1.7), but this should work for your environment also.

  1. download java3d .zip package from https://java3d.java.net/binary-builds.html
  2. unzip the downloaded file, and there's is another zip file named "j3d-jre.zip"
  3. unzip 'j3d-jre.zip' in a directory you want to package together.
  4. place simbad jar file in that directory.
  5. create a DOS batch file with these lines in it:
    @echo off
    set CLASSPATH=.;.\lib\ext\j3dcore.jar;.\lib\ext\j3dutils.jar;.\lib\ext\vecmath.jar;.\simbad-1.4.jar
    set PATH=%PATH%;.\bin
    java -classpath %CLASSPATH% simbad.gui.Simbad

Hope this helps.



来源:https://stackoverflow.com/questions/15848736/simbad-requires-java-3d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!