PDFlib works only if the library is in /usr/lib not in a custom path - classpath

we are using PDFlib for personalizing PDFs.
The pdflib.jar library and the libpdf_java.so file are both in the folder:
/home/user/my/custom/library/path/
I start the server with this argument:
java -Djava.library.path=/home/user/my/custom/library/path/
like it is mentioned in the pdflib tutorial
After deploying on my jBoss5 Server i got this error message:
ERROR [STDERR] Cannot load the PDFlib shared library/DLL for Java.
Make sure to properly install the native PDFlib library. For your
information, the current value of java.library.path is:
/home/user/my/custom/library/path/
So, the path ist correct (i tried it with and without the / at the end)
If I put the jar and the lib in my /usr/lib folder, everything works fine, but not with my custom folders.
I use it on a linux 64bit, if that matters!
The custom folder and the files got chmod 755 - so this shouldn't be the problem
Looking forward to your hints!

Related

Tessarect implementation JAVA

I'm trying to implement OCR recognition through Tessarect.
But at the moment I'm stuck with this error.
This is what I've done so far:
Homebrew tessarect
Download the API
Link the Jar with my project (build path > Configure build path > Add external Jar's
But when I compile my code this is the error
Error opening data file D:/Tess4J/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Warning: Invalid resolution 0 dpi. Using 70 instead.
I've downloaded the eng trained data and I've tried different stuff but I can't figure out how to solve this.
I'm running eclipse in macOS Catalina.
Thanks!
My situation
Set your datapath correctly.
Your location D:/Tess4J/tessdata/eng.traineddata is wrong

Eclipse CDT 4.11.0 crashes with SWT library not found error

I am trying to get Eclipse 4.11.0 running on my RHEL 6.10 system but it crashes when I try to run it. It points me to a log file that states:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I tried running it again and it crashed again with a different log file entry:
...UnsatisfiedLinkError Could not load SWT library
It was looking for:
~/.swt/lib/linux/x86_64/libswt-pi4-gtk-4924r25.so
but the only file in that directory was libswt-pi3-gtk-4924r25.so
I also found libswt-pi3-gtk-4924r25.so in eclipse/configuration/org.eclipse.osgi/458/0/.cp.
I removed my ~/.swt directory and ran it again. Once again I got:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I noticed that it made the ~/.swt/… directory structure and put the libswt-pi3-gtk-4924r25.so file in it so I tried to run it again and it (not surprisingly) gave me the following:
...UnsatisfiedLinkError Could not load SWT library
Does this have something to do with the version of gtk that I'm running on my system? Why does eclipse include the libswt-pi3-gtk.4924r25.so library in their installation, then look for the libswt-pi4-gtk-4924r25.so library?
Installing libgthread resolved the issue for me (SLES15, GTK3).

How to build Qtkeychain with Windows?

I'm trying to build my OwnCloud client. I'm using "Generic Build Instructions" from this link - https://doc.owncloud.org/desktop/2.5/building.html.
I'm stuck at 3 step with an error:
Could NOT find Qt5Keychain (missing: QTKEYCHAIN_LIBRARY)
I downloaded Qtkeychain and compiled it using this link - https://github.com/frankosterfeld/qtkeychain/wiki.
Everything is in my C disk. PATHS are set correctly. Can someone tell me what am missing here.
Adding PATH photo:
Adding a photo to be clear what am talking about:
How did you compile qtkeychain?
With the environment variable %QTDIR% set correctly, e.g. C:\Qt\Qt5.6.0\5.6\msvc2015, you should be able to compile qtkeychain
cmake -G "MinGW Makefiles" .
mingw32-make
and get a 32bit file named "libqt5keychain.dll.a".
You can then add the directory containing this file to your Windows path environment variable. This should work (it does for Nextcloud, at least).

cmake to eclipse project conversion issue

I am trying to create an eclipse project from a cmake project .
I used the following command
cmake -G "Eclipse CDT4 - Unix Makefiles" ./`
it gives the following error
CMake Error at CMakeLists.txt:119 (find_package):
By not providing "FindGlib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Glib", but
CMake did not find one.
Could not find a package configuration file provided by "Glib" (requested
version 2.28) with any of the following names:
GlibConfig.cmake
glib-config.cmake
Add the installation prefix of "Glib" to CMAKE_PREFIX_PATH or set
"Glib_DIR" to a directory containing one of the above files. If "Glib"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
I have glib installed . actually it couldn't resolve the path i guess. wherever find is there in cmake file , it is giving the smiler errors. please i suggest a way out, i badly need to load this project in cmake. Thanks.
Here is line 119 where error message is pointing
find_package(Glib 2.28 REQUIRED)
include_directories(${Glib_INCLUDE_DIRS})
list(APPEND LIBS ${Glib_LIBRARIES})
add_definitions(${Glib_DEFINITIONS})
When you call find_package(MyPackage) in a CMake file, it tries to find a FindMyPackage.cmake configuration in its system path (/usr/share/cmake-2.8/Modules on my Ubuntu box), or in the directory you did specify as CMAKE_MODULE_PATH).
The solution to your problem is to create a directory for modules in your source tree (e.g. CMakeModules), put in it a FindGlib.cmake file that you can find using Google, and add
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
in your CMakeLists.txt before the actual call to find_package.
(your problem is not related to the Eclipse generator, you could remove that from the title of the question).

Compiling android native app calling ndk-build from eclipse, on ubuntu

On ubuntu 11.10 I installed eclipse from repositories, installed adt and cdt plugins. I am able to compile the hello-jni example using command line, but i would like to use eclipse for the task.
I followed the guide here: http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and defined a PATH variable in eclipse preferences (window->preferences->c/c++->environment), pointing to the ndk-r7b folder. But the project won't buid. I get this error:
(Cannot run program "ndk-build"
(in directory "/home/athos/android/ndk-r7b/samples/hello-jni"):
java.io.IOException:
error=2, File o directory non esistente)
(last line should be "no such file or directory" in english)
If I specify "${PATH}/ndk-build" or "/home/athos/android/ndk-r7b/ndk-build" as the build command. i get this:
/home/lavoro/android/ndk-r7b/ndk-build
ERROR: Cannot find 'make' program. Please install Cygwin make package
/home/lavoro/android/ndk-r7b/ndk-build: 40: dirname: not found
or define the GNUMAKE variable to point to it.
If I define the GNUMAKE variable in window->preferences->c/c++->environment i get this:
ERROR: Your GNUMAKE variable is defined to an invalid name: /usr/bin/make
Please fix it to point to a valid make executable (e.g. /usr/bin/make)
Which is funny, since It suggests the exact same directory I indicated. Make is installed and present at the indicated location.
What am I missing?
It's a bit ugly, but you can always put
/fully/qualified/path/to/ndk-build
In your build command.