I have tried to build openCV for Java to run it on a BeagleBoneBlack. My problem is, that when i cross compile it for arm, it still gives me an error message saying that it load IA 32-bit .so on a ARM-bit platform. I've tried to use following guide for this:
http://www.ridgesolutions.ie/index.php/2013/05/24/building-cross-compiling-opencv-for-linux-arm/
And i followed this guide:
http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html
i do include the generated jar into the Java project, and also add openCV as a native library. Additionaly i put the .so into the jre/arm folder for the baglebone black...
Here is the complete error message:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-8-oracle/jre/lib/arm/libopencv_java300.so: /usr/lib/jvm/java-8-oracle/jre/lib/arm/libopencv_java300.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at open.main(open.java:9)
... 5 more
Thanks a lot for the help!
Related
I am gettting the following errors while trying to install pycharm in my ubuntu 14.04 64 bit
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0
Start Failed: Internal error. Please report to http://jb.gg/ide/critical-startup-errors
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:101)
Caused by: java.lang.UnsatisfiedLinkError: /opt/jdk/jdk1.8.0_77/jre/lib/i386/libawt_xawt.so: libXext.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:97)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:72)
... 6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.awt.Component.<clinit>(Component.java:593)
at com.intellij.idea.Main.showMessage(Main.java:335)
at com.intellij.idea.Main.showMessage(Main.java:311)
at com.intellij.idea.Main.main(Main.java:104)
i can't figure out why this is happening. Any help on this is appreciated
Could you provide your method of installation?
Are you using the bundled JRE provided in the Ubuntu package?
Apt-get/apt update libXext.so.6 see: Can't find/install libXtst.so.6?
For additional info see:
https://www.jetbrains.com/help/pycharm/2016.1/requirements-for-pycharm.html
I'm trying to install Weblogic version 12.1.2 (because I have to) on Windows, but it won't install.
I downloaded 'oepe-12.1.2.1-kepler-installer-win32.exe', which was the version it made available and ran the exe. After a few seconds into the GUI installer I get this:
cmd property not found in autorun.inf
So I expanded the exe, navigated to the Disk1 folder and ran what was in the autostart file:
java.exe -jar install/modules/ora-launcher.jar
When I do this I get:
Preparing to launch the Oracle Universal Installer from C:\Users\xxxxxxx
Log: C:\Program Files\Oracle\Inventory\logs\install2015-07-06_06-01-24PM.log
[ERROR]: Installer has encountered an internal Error. Contact Oracle support with details
[EXCEPTION]:java.lang.reflect.InvocationTargetException
Any ideas? Could it be that I need JDK/JRE 6? I'm running 7. thanks.
the log file says this:
singlePageValidataionData handlers :[oracle.as.install.engine.modules.input.config.pagedata.PageHandler#4b4c7b84, oracle.as.install.engine.modules.input.config.pagedata.PageHandler#a413dbb, oracle.as.install.engine.modules.input.config.pagedata.PageHandler#413bc53f, oracle.as.install.engine.modules.input.config.pagedata.PageHandler#3b12cc8e]
singlePageValidataionData handlers :[oracle.as.install.engine.modules.input.config.pagedata.PageHandler#664d98b4]
java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.loadNativeLib(OiipwWin32NativeCalls.java:1503)
at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.<clinit>(OiipwWin32NativeCalls.java:50)
at oracle.as.install.engine.modules.statistics.util.SysInfo.getAvailableMemory(SysInfo.java:159)
at oracle.as.install.engine.modules.statistics.element.AvailableMemoryElement.<init>(AvailableMemoryElement.java:39)
at oracle.as.install.engine.modules.statistics.standard.StandardElementLocator.loadElements(StandardElementLocator.java:64)
at oracle.as.install.engine.modules.statistics.boot.ProfilerInitializer.initializeProfile(ProfilerInitializer.java:82)
at oracle.as.install.engine.modules.statistics.Statistics.launchModule(Statistics.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at oracle.as.install.engine.InstallEngine.launchModule(InstallEngine.java:530)
at oracle.as.install.engine.InstallEngine.processAndLaunchModules(InstallEngine.java:484)
at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:437)
at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:688)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at oracle.as.install.engine.InstallEngine.launchModule(InstallEngine.java:530)
at oracle.as.install.engine.InstallEngine.processAndLaunchModules(InstallEngine.java:484)
at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:437)
at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:688)
Caused by: java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.loadNativeLib(OiipwWin32NativeCalls.java:1503)
at oracle.sysman.oii.oiip.osd.win32.OiipwWin32NativeCalls.<clinit>(OiipwWin32NativeCalls.java:50)
at oracle.as.install.engine.modules.statistics.util.SysInfo.getAvailableMemory(SysInfo.java:159)
at oracle.as.install.engine.modules.statistics.element.AvailableMemoryElement.<init>(AvailableMemoryElement.java:39)
at oracle.as.install.engine.modules.statistics.standard.StandardElementLocator.loadElements(StandardElementLocator.java:64)
at oracle.as.install.engine.modules.statistics.boot.ProfilerInitializer.initializeProfile(ProfilerInitializer.java:82)
at oracle.as.install.engine.modules.statistics.Statistics.launchModule(Statistics.java:321)
... 8 more
[ERROR]: Installer has encountered an internal Error. Contact Oracle support with details
[EXCEPTION]:java.lang.reflect.InvocationTargetException
Yes, my fault, I should have downloaded the 'generic' version, which I didn't see. It's installed now :)
No idea why it refuses to install though, so if anyone else tries the exe and comes here, I have no answer.
I made a game that uses external libraries and resource files. Now I want test it on another PC(with Ubuntu OS), I tried to run it without eclipse by exporting to jar files, but it doesn't work. This is the hierarchy. Is there any simple way to do this ?
Edit
When I export it as Runnable(Note that I'm trying to run it still on windows not ubuntu) jar file and try to run it java -jar gra.jar It throws:
`Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at org.lwjgl.Sys$1.run(Sys.java:73)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:95)
at org.lwjgl.Sys.<clinit>(Sys.java:112)
at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at MainWindow.main(MainWindow.java:14)
... 5 more`
Make sure you are getting your resource files correctly, not referencing them in your local file system.
To ensure your resources are put in the JAR add them to your classpath.
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
lwjgl is not found. It should be in one of the directories listed in java.library.path.
You most certainly added a directory to java.library.path with the native dlls of jwgl when you set up your project. Eclipse cannot export this. You will have to create a starter script (sh, bat) which adds the dlls.
Have a look at the last step here:
http://www.lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_Eclipse
How did you pack the jar? If you used solely eclipse, you should use jarsplice. That may fix the error
The question lays out all the pertinent versions.
I'm trying to run one of the sample files at http://www.jcuda.org: JCublasMatrixInvert.java.
I've got the NVIDIA CUDA drivers installed; I've downloaded the JCUDA 0.4.1 bindings and added their /lib directory to my java.library.path. Here are the JVM parameters I set when I run:
-ea -XX:+UseParNewGC -XX:+UseNUMA -XX:PermSize=128m -XX:MaxPermSize=256m -Xmx1024m -Djava.library.path=F:\Projects\Java\learning\out\production\learning
Yet when I try to run the class I get the following stack trace:
Error while loading native library "JCublas-windows-x86_64" with base name "JCublas"
Operating system name: Windows 7
Architecture : amd64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.NullPointerException: No resource found with name '/lib/JCublas-windows-x86_64.dll'
at jcuda.LibUtils.loadLibraryResource(LibUtils.java:151)
at jcuda.LibUtils.loadLibrary(LibUtils.java:83)
at jcuda.jcublas.JCublas.initialize(JCublas.java:82)
at jcuda.jcublas.JCublas.<clinit>(JCublas.java:70)
at matrix.jcuda.JCublasMatrixInvert.main(JCublasMatrixInvert.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: F:\Projects\Java\learning\out\production\learning\JCublas-windows-x86_64.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at jcuda.LibUtils.loadLibrary(LibUtils.java:94)
at jcuda.jcublas.JCublas.initialize(JCublas.java:82)
at jcuda.jcublas.JCublas.<clinit>(JCublas.java:70)
at matrix.jcuda.JCublasMatrixInvert.main(JCublasMatrixInvert.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load the native library
at jcuda.LibUtils.loadLibrary(LibUtils.java:129)
at jcuda.jcublas.JCublas.initialize(JCublas.java:82)
at jcuda.jcublas.JCublas.<clinit>(JCublas.java:70)
at matrix.jcuda.JCublasMatrixInvert.main(JCublasMatrixInvert.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Process finished with exit code 1
I can see the allegedly missing dll at the path
F:\Projects\Java\learning\out\production\learning\JCublas-windows-x86_64.dll
What have I missed? What am I doing wrong? Can anyone who has had success with running this example advise me? Thanks.
If standard way is too hard - I recommend you to use mavenized version of JCuda. You could clone standard project here - https://github.com/MysterionRise/mavenized-jcuda it's working automatically for Windows/Linux 32/64 bit
All you need to do is to run:
You need to install Cuda 5.5 for your platform here - https://developer.nvidia.com/cuda-downloads
Call mvn clean package to build project
Call mvn exec:exec to run main class with "Hello, JCuda" sample :)
After that you could replace main class with your JCuda code
Download that file from the jCuda download section and put it into your library path.
After running tectonicus (minecraft map render), i run in to some error, solved a few by upgrading java to 1.6, and installing some libs: x11-libs/libXcursor & x11-libs/libXrandr
But now i got a new error and don't know where to dig next:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/root/.tectonicus/native/liblwjgl.so:
/opt/sun-jdk-1.6.0.26/jre/lib/i386/libjawt.so:
symbol awt_FreeDrawingSurface, version SUNWprivate_1.1
not defined in file libmawt.so with link time reference
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at org.lwjgl.Sys$1.run(Sys.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:82)
at org.lwjgl.Sys.<clinit>(Sys.java:99)
at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
at tectonicus.rasteriser.lwjgl.LwjglRasteriser.<init>(LwjglRasteriser.java:110)
at tectonicus.rasteriser.RasteriserFactory.createRasteriser(RasteriserFactory.java:24)
at tectonicus.TileRenderer.<init>(TileRenderer.java:146)
at tectonicus.TectonicusApp.run(TectonicusApp.java:778)
at tectonicus.TectonicusApp.main(TectonicusApp.java:1143)
are you running tectonicus on a headless machine?
if not check that the DISPLAY environment variable is set correctly
e.g.: DISPLAY=:0 java -jar ...