我检查了(基于无法执行二进制文件和其他一些 SO 问题)我尝试运行的 java 文件确实在 Ubuntu 12.04 上是可执行的。
$ file ORA/include/OraFiles/bin/ora
ORA/include/OraFiles/bin/ora: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
但是当我尝试运行它时
$ ORA/ora.sh -measures ORA/include/OraFiles/xml/ora_xml_measures.xml -script junkin.xml -log 1999-progress.log
Exception in thread "main" java.lang.NoClassDefFoundError: edu/cmu/casos/OraUI/controller/OraMain
Caused by: java.lang.ClassNotFoundException: edu.cmu.casos.OraUI.controller.OraMain
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: edu.cmu.casos.OraUI.controller.OraMain. Program will exit.
或者
$ ORA/include/OraFiles/bin/ora -measures ORA/include/OraFiles/xml/ora_xml_measures.xml -script junkin.xml -log 1999-progress.log
ORA/include/OraFiles/bin/ora: error while loading shared libraries: liborautils.so.0: cannot open shared object file: No such file or directory
然而liborautils.so.0
确实存在:
$ ls ORA/include/OraFiles/bin/
construct.exe libjogl_cg.so libora.so.0
dynetml2orgahead.exe libjogl.jnilib libora.so.0.0.0
gluegen-rt.dll libjogl.so liborautils.so
html_to_ppt_converter.exe libnetstatplusfog.so **liborautils.so.0**
j3dcore-ogl.dll libnetstatplusfog.so.0 liborautils.so.0.0.0
jogl_awt.dll libnetstatplusfog.so.0.0.0 libtinyxml.so
jogl_cg.dll libnetstatplus.so libtinyxml.so.0
jogl.dll libnetstatplus.so.0 libtinyxml.so.0.0.0
libcasos_utils.so libnetstatplus.so.0.0.0 ora
libcasos_utils.so.0 libnewran.so ora.exe
libcasos_utils.so.0.0.0 libnewran.so.0 ora_jni.dll
libgluegen-rt.jnilib libnewran.so.0.0.0 ora_log.txt
libgluegen-rt.so libora_jni.so orgahead.exe
libjogl_awt.jnilib libora_jni.so.0 orgahead_perf.exe
libjogl_awt.so libora_jni.so.0.0.0
libjogl_cg.jnilib libora.so
如何让 Java 看到它的存在?我正在尝试运行ng-nailgun
,但nailgun quickstart上的说明似乎与 Ubuntu 无关sudo apt-get install nailgun
。
我安装了ant
, nailgun
, 并maven2
希望他们的依赖项能够安装我需要的任何 java 东西。这是 Ubuntu 12.04.1 的 64 位 EC2 预构建版本。
更新:这是以下内容ora.sh
:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./include/OraFiles/bin/lib:./include/OraFiles/bin
java -splash:include/OraFiles/images/ORA-splash-screen.png -Xmx1024m -cp ora.jar:lib/jfreechart-1.0.13.jar:lib/jfreechart-1.0.13-swt.jar:lib/TableLayout.jar:lib/jcommon-1.0.9.jar:lib/httpcore-nio-4.0-beta3.jar:lib/j3dcore.jar:lib/httpcore-4.0-beta3.jar:lib/jung.jar:lib/twitter4j-1.1.7.jar:lib/jcalendar.jar:lib/rssutils.jar:lib/omj3d.jar:lib/json-1.0.jar:lib/commons-collections-3.1.jar:lib/jsi-generics.jar:lib/opencsv-1.7.jar:lib/trove-2.0.4.jar:lib/xml-writer.jar:lib/commons-logging-api-1.1.1.jar:lib/junit.jar:lib/jts-1.7-generics.jar:lib/casosparser.jar:lib/jgraphlayout.jar:lib/htmlparser.jar:lib/facebook-util-1.8-final.jar:lib/j3d-vrml97.jar:lib/omcorba.jar:lib/ant-launcher.jar:lib/colt.jar:lib/wwj/worldwind-ora.jar:lib/freehep/freehep-graphics2d-2.0.jar:lib/gt2-2.3.3/gt2-widgets-swing-2.3.3.jar:lib/gt2-2.3.3/batik-svggen-1.6.jar:lib/gt2-2.3.3/spatialdb-0.1.jar:lib/gt2-2.3.3/velocity-1.4.jar:lib/gt2-2.3.3/gt2-go-2.3.3.jar:lib/gt2-2.3.3/jsr108-0.01.jar:lib/gt2-2.3.3/db2jcc_dummy-8.2.1.jar:lib/gt2-2.3.3/gt2-postgis-2.3.3.jar:lib/gt2-2.3.3/gt2-xml-gml3-2.3.3.jar:lib/gt2-2.3.3/gt2-xml-2.3.3.jar:lib/gt2-2.3.3/concurrent-1.3.4.jar:lib/gt2-2.3.3/gt2-image-2.3.3.jar:lib/gt2-2.3.3/jaxb-impl-1.3.jar:lib/gt2-2.3.3/gt2-tiger-2.3.3.jar:lib/gt2-2.3.3/imageioext-asciigrid-1.0-rc1.jar:lib/gt2-2.3.3/gt2-api-2.3.3.jar:lib/gt2-2.3.3/gt2-shapefile-2.3.3.jar:lib/gt2-2.3.3/gt2-main-2.3.3.jar:lib/gt2-2.3.3/gt2-validation-2.3.3.jar:lib/gt2-2.3.3/commons-jxpath-1.2.jar:lib/freehep/freehep-graphicsio-svg-2.0.jar:lib/gt2-2.3.3/ecore-2.1.0.jar:lib/gt2-2.3.3/postgis-driver-1.0.jar:lib/gt2-2.3.3/commons-beanutils-1.4.jar:lib/gt2-2.3.3/relaxngDatatype-X.jar:lib/gt2-2.3.3/gt2-db2-2.3.3.jar:lib/gt2-2.3.3/geowidgets-1.0-M1.jar:lib/jai_codec.jar:lib/freehep/freehep-graphicsio-2.0.jar:lib/jogl/jogl.jar:lib/freehep/freehep-io-2.0.1.jar:lib/freehep/freehep-xml-2.0.1.jar:lib/gt2-2.3.3/ant-optional-1.5.1.jar:lib/gt2-2.3.3/gt2-vpf-2.3.3.jar:lib/gt2-2.3.3/gt2-demo-property-2.3.3.jar:lib/gt2-2.3.3/commons-pool-1.3.jar:lib/gt2-2.3.3/gt2-cql-2.3.3.jar:lib/gt2-2.3.3/geoapi-nogenerics-2.1-M2.jar:lib/gt2-2.3.3/gt2-sde-dummy-2.3.3.jar:lib/gt2-2.3.3/vecmath-1.3.1.jar:lib/gt2-2.3.3/velocity-dep-1.4.jar:lib/gt2-2.3.3/gt2-coverage-2.3.3.jar:lib/gt2-2.3.3/batik-util-1.6.jar:lib/gt2-2.3.3/gt2-wms-2.3.3.jar:lib/gt2-2.3.3/jaxb-api-1.3.jar:lib/omsvg.jar:lib/gt2-2.3.3/batik-xml-1.6.jar:lib/gt2-2.3.3/batik-bridge-1.6.jar:lib/gt2-2.3.3/commons-lang-2.1.jar:lib/gt2-2.3.3/gt2-render-2.3.3.jar:lib/gt2-2.3.3/batik-dom-1.6.jar:lib/gt2-2.3.3/gt2-graph-2.3.3.jar:lib/gt2-2.3.3/gt2-epsg-hsql-2.3.3.jar:lib/gt2-2.3.3/gt2-indexed-shapefile-2.3.3.jar:lib/gt2-2.3.3/jlfgr-1.0.jar:lib/gt2-2.3.3/gt2-hsql-2.3.3.jar:lib/java-getopt-1.0.13.jar:lib/gt2-2.3.3/batik-svg-dom-1.6.jar:lib/gt2-2.3.3/common-2.1.0.jar:lib/gt2-2.3.3/gt2-geotiff-2.3.3.jar:lib/toolkits_1-2-0.jar:lib/milStd2525_png.jar:lib/j3dutils.jar:lib/JAXWS2.1.3-20071218.jar:lib/Jama-1.0.1.jar:lib/commons-codec-1.3.jar:lib/gt2-2.3.3/gt2-imagemosaic-2.3.3.jar:lib/iText-2.1.0.jar:lib/commons-math-1.2.jar:lib/gt2-2.3.3/postgresql-8.1-407.jdbc3.jar:lib/freehep/freehep-util-2.0.1.jar:lib/idw-1.5.0/idw.jar:lib/gt2-2.3.3/batik-awt-util-1.6.jar:lib/gt2-2.3.3/gt2-gtopo30-2.3.3.jar:lib/gt2-2.3.3/gt2-wfs-2.3.3.jar:lib/gt2-2.3.3/picocontainer-1.2.jar:lib/gt2-2.3.3/gt2-arcgrid-2.3.3.jar:lib/gt2-2.3.3/gt2-mysql-2.3.3.jar:lib/gt2-2.3.3/gt2-openoffice-2.3.3.jar:lib/gt2-2.3.3/batik-ext-1.6.jar:lib/gt2-2.3.3/gt2-oracle-spatial-2.3.3.jar:lib/gt2-2.3.3/batik-gvt-1.6.jar:lib/gt2-2.3.3/gt2-svgsupport-2.3.3.jar:lib/svgSalamander-tiny.jar:lib/jhall.jar:lib/gt2-2.3.3/batik-css-1.6.jar:lib/gt2-2.3.3/gt2-mappane-2.3.3.jar:lib/gt2-2.3.3/gt2-demo-mappane-2.3.3.jar:lib/gt2-2.3.3/gt2-directory-2.3.3.jar:lib/gt2-2.3.3/gt2-geomedia-2.3.3.jar:lib/activation.jar:lib/commons-logging-1.1.1.jar:lib/gt2-2.3.3/gt2-mif-2.3.3.jar:lib/openmap-4.6.5.jar:lib/gt2-2.3.3/gt2-xml-filter-2.3.3.jar:lib/httpmime-4.0-beta2.jar:lib/gt2-2.3.3/junit-3.8.1.jar:lib/jai_core.jar:lib/gt2-2.3.3/xml-apis-1.0.b2.jar:lib/mail.jar:lib/gt2-2.3.3/hsqldb-1.8.0.1.jar:lib/jogl/gluegen-rt.jar:lib/gt2-2.3.3/commons-cli-2.0-gt2-pre1.jar:lib/gt2-2.3.3/commons-io-1.2.jar:lib/gt2-2.3.3/xsd-2.1.1.jar:lib/gt2-2.3.3/gt2-demo-data-2.3.3.jar:lib/gt2-2.3.3/batik-transcoder-1.6.jar:lib/javaml-0.0.12.jar:lib/gt2-2.3.3/gt2-epsg-access-2.3.3.jar:lib/gt2-2.3.3/jta-1.0.1B.jar:lib/gt2-2.3.3/gt2-epsg-postgresql-2.3.3.jar:lib/gt2-2.3.3/gt2-referencing-2.3.3.jar:lib/freehep/freehep-graphicsio-pdf-2.0.jar:lib/gt2-2.3.3/gt2-brewer-2.3.3.jar:lib/gt2-2.3.3/xercesImpl-2.7.1.jar:lib/commons-httpclient-3.1.jar:lib/gt2-2.3.3/imageioext-customstreams-1.0-rc1.jar:lib/gt2-2.3.3/jdbc-stdext-2.0.jar:lib/httpclient-4.0-beta2.jar:lib/gt2-2.3.3/jaxb-libs-1.3.jar:lib/gt2-2.3.3/gt2-imagepyramid-2.3.3.jar:lib/gt2-2.3.3/batik-script-1.6.jar:lib/gt2-2.3.3/xsdlib-20050614.jar:lib/facebook-java-api-1.8-final.jar:lib/gt2-2.3.3/gt2-arcsde-2.3.3.jar:lib/gt2-2.3.3/gt2-coveragetools-2.3.3.jar:lib/MDateSelector14-00347.jar:lib/rome-1.0.jar:lib/gt2-2.3.3/gt2-shapefile-renderer-2.3.3.jar:lib/gt2-2.3.3/gt2-epsg-wkt-2.3.3.jar:lib/gt2-2.3.3/gt2-gml-2.3.3.jar:lib/gt2-2.3.3/log4j-1.2.6.jar:lib/gt2-2.3.3/xml-apis-xerces-2.7.1.jar:lib/gt2-2.3.3/batik-parser-1.6.jar:lib/gt2-2.3.3/gt2-xml-gml2-2.3.3.jar:lib/gt2-2.3.3/gt2-referencing3D-2.3.3.jar:lib/jdom-1.1.jar:lib/jide-oss-2.8.8.jar edu.cmu.casos.OraUI.controller.OraMain