Folder error setting up WSDL in Matlab on mac - matlab

I'm trying to set up WSDL tools in Matlab on a mac (following this tutorial: https://www.mathworks.com/help/matlab/matlab_external/display-a-world-map.html).
The matlab.wsdl.setWSDLToolPath('JDK',jdk,'CXF',cxf) function needs to get the path for both openJDK and Apache-CXF. I have downloaded both of these, but am unsure what the correct path should be on a mac. The examples provided on the MathWorks website and forums all have examples of paths for a PC, but on a mac it is not clear to me what the actual program file would be.
I get errors along the lines of these:
Warning: The path '/opt/homebrew/Caskroom/adoptopenjdk8/8,292:b10/OpenJDK8U-jdk_x64_mac_hotspot_8u292b10.pkg' has been
saved but the folder was not found.
> In matlab.wsdl.setWSDLToolPath (line 107)
Warning: The path '/Users/bricehen/Downloads/apache-cxf-3.4.6.tar.gz' has been saved but the folder was not found.
> In matlab.wsdl.setWSDLToolPath (line 107)
This is the error if I provide the path to the downloaded packages themselves.
If I provide paths to the unpacked folders I get from the downloaded pkg or tar.gz files, I get errors along the lines of:
Error using matlab.wsdl.setWSDLToolPath>checkVersion (line 232)
The path '/opt/homebrew/Caskroom/adoptopenjdk8/8,292:b10' does not seem to be a JDK folder.
Error in matlab.wsdl.setWSDLToolPath (line 119)
checkVersion(path, 'java', 'JDK', '-version', ...
Any help would be greatly appreciated!

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

SUN benchmark code Invalid .mex file error

I've downloadad the SUN benchmark code from MIT:
version 2:
http://people.csail.mit.edu/jxiao/SUN/source_code/
Once I download the 15 image dataset and run the function:
compute_features.m
I get an Invalid MEX file error:
Invalid MEX-file
'/home/arturo/Documents/Virality/reddit_data/SUN_source_code_v2/code/OpenCVmexWrapper/cvlib_mex.mexa64':
libcv.so.1: cannot open shared object file: No such file or directory
The file /home/arturo/Documents/Virality/reddit_data/SUN_source_code_v2/code/OpenCVmexWrapper/cvlib_mex.mexa64 actually does exist, so I'm thinking the problem hast to do with libcv.so.1, or the .mexa64 file is broken (which is very unlikely)
I read something about adding a path via LD_LIBRARY_PATH when I googled the error, but I'm not sure what path I should exactly add, at least temporarily. I have opencv installed along with its library, so I'm not sure what the problem is. My current system is Ubuntu 12.04 64bit.
There's a similar question here, but the answer says that for their specific case they have the source code of the MEX files posted, which is not the same fortune I have: running old mex file on new matlab releases
Found the answer. The key is to link explicitly to the folder the file 'libcv.so.1' is in just before running matlab.
so in the matlab folder:
LD_LIBRARY_PATH=/home/arturDocuments/Virality/reddit_data/SUN_source_code_v2/code/scene_sun ./matlab
And in matlab:
matlab>> compute_feature
Compling the source code in the other folders is also necessary.(vlfeat,VOC,libsvm). As well as editing the path in the function im2superpixels # GeometricContext_dhoiem from :
segcmd = '../segment_pedro/segment 0.8 100 100';
to:
segcmd = '/YOUR_PATH/SUN_source_code_v2/code/segment_pedro/segment/ 0.8 100 100';
*(The folder is one level above.)

Invalid MEX-file error in MATLAB using GPUstart

I get following error with run GPUstart in Matlab:
Error using ==> moduleinit at 14
Invalid MEX-file 'C:\GPUmat\modules\rand\RANDModuleManager.mexw64': The
specified module could not be found.
Error in ==> GPUmatLoadModules at 18
moduleinit;
Error in ==> GPUstart at 168
GPUmatLoadModules(fullfile(GPUmatPath,'modules'));
How to solve this?
I found a similar problem in google, maybe it will help you:
http://www.mathworks.de/support/solutions/en/data/1-X8A09/index.html
Subject:
Why do I receive a "specified module could not be found" error while
running a MEX-file created from MATLAB 7.0.1 (R14SP1)? Problem
Description:
When I try to run a MEX-file I created, I receive the following error:
??? Invalid MEX-file 'MEX-file name': The specified module could not
be found. where "MEX-file name" is the name of my MEX-file. However, I
did not receive any errors when compiling the file.
Solution:
This error can occur if you do not have all of the necessary DLL files
that the MEX-function is dependent upon or if you are running a
MEX-file on a different version of MATLAB than it was compiled on.
In order to view dependent DLL files and help locate the source of
this error, you may use the third-party product "Dependency Walker".
The Dependency Walker can be downloaded from the following web site:
http://www.dependencywalker.com/
Kindly refer to the attached solutioon below for more information on
how to use the Dependency Walker to profile your MEX file.
After finding the missing dependent module, add it to the directory
where the MEX file resides or add it to the system search path.

How to properly install libsvm-3.11?

I'm using libvm-3.11. I downloaded it here and extracted. Then I set path in Matlab. After that whenever I run my program, it gives the same error always.
??? Invalid MEX-file 'E:\Gomu\Gomu General\final yr
Project\proj\libsvm-3.11\windows\svmtrain.mexw32': The specified module could not be found.
Error in ==> trysvm at 6
svmStruct = svmtrain(T,TrainMat,'showplot',true);
What should I do?
read the README file and compile the C files using mex. Mex files are platform/MATLAB version dependent. The binary download doesn't always work for everybody.

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.