Warning: Your deployed application may error out because file or folder paths not present - matlab

I get the following warning when deploying an application with matlab:
[Warning: Your deployed application may error out because file or folder paths
not present in the deployed environment may be included in your MATLAB startup
file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
determine the appropriate execution environment when including file and folder
paths, and recompile your application.
]
I have tried to reduce my application to merely a program that creates a figure, nothing more, and I still get the message.
Note: When I start my application, I get the splash screen and then it crashes.
I have tried deploying with R2016b, R2017a, R2017b. How do I get around this? I have tried using my own startup file, I have used isdeployed as suggsted. Nothing seems to work.
All help appreciated!

Type which startup.m -all in your command window. If you find the file then delete it from the path. Then perform the build process again. It might work.

Related

flutter blank screen on desktop(windows)

Running my application on another Windows machine results in a blank window. I works fine on the development machine.
I have included all the dll-files + data folder + 3 extra dll files mentioned on the Flutter website.
I have also ran "dependencies" on the resulting .exe file and can't see any missing dll's.
Compiling the "mydemo" application works fine, so I assume there are some other external files my application needs.
I have tried looking through the output of "flutter run -v" to find any clues of extra files needed, but can't see anything useful.
What is the preferred way to tackle a problem like this? How can I find out what files/resources are missing to distribute my app? Is there a way to use the "debug" version on the other machine instead and bring out the debug console window? I would guess that would show me errors when the app tries to load the missing resources.
Check if any package you depend on has some additional file requirements: for example, I'm using sqflite_common_ffi in some of my projects, which needs an additional DLL file to run. I don't know what you're referring to 'dependencies' ran on the EXE, though.
In any case, when I can't get any good output or error from a project, I do this: open up Windows prompt, go to the directory where you have put all the required files, and run
your_exe_file >> logFile.txt 2>&1
which will output the standard output and the standard error to the file. The log file name and extension don't really matter, it will be a simple text file.
For example, if I dont put the additional DLL for sqflite_common_ffi in the same folder of the compiled EXE, the output of the command above will specifically mention the name of the DLL that is missing.
if you got your project through a repository to run on another windows machine, use the command "flutter pub get"

Fatal Error: "MATLAB_PREFDIR must be an absolute path. Cannot set preferences directory to the relative path.." occurs when spmd is used

I am running a program on Matlab and I use spmd to parallelize my code.
The same code runs on 2 different PCs. One of them runs perfectly well, but the other doesn't and the Fatal Error occurs.
If I try to run a non-parallelized program, there are no errors. I don't know if there is a problem with this specific command or if I did something wrong myself.
Could it be related to the directories in which I have saved my code files?
If so then why does the non-parallelized program run?
I'm not sure if you still have this problem, but anyway...
The problem is with the path to preferences folder. So, you need to change it.
Mostly such error occurs if you don't have write access to this folder or its located in hidden folder.
To open the current path of the prefdir type winopen(prefdir) in matlab Command window. Then copy all files from this folder into new one (for instance C:\MATLABPreferences).
Now you need to change a path of the prefdif using .bat file with the following text:
fullfile (matlabroot, 'bin', 'matlab')
set MATLAB_PREFDIR=<New preference folder location>
"<MATLAB executable location>"
Example:
fullfile (matlabroot, 'bin', 'matlab')
set MATLAB_PREFDIR=C:\MATLABPreferences
"C:\Program Files\MATLAB\R2013b\bin\matlab.exe"
Run it and enjoy parallel computing with matlab.
More detailed explanation you can find here.
I've had problems with this, and so far the internet was not really useful. After hours of Googling, this turned out to be useful. You just need to add a new variable to your environmental variables (in case you are using Windows) named MATLAB_PREFDIR with the location of the preferred directory.
For me, it is C:\Users\Balázs\AppData\Roaming\MathWorks\MATLAB\R2014a, but you can get if you type prefdir into matlab's command line.

"Not A Valid Jar" When trying to run Map Reduce Job

I am trying to run a my MapReduce job by building a jar from eclipse , but while trying to execute the job , I am getting "Not a valid Jar" error.
I have tried to follow the link Not a valid Jar but that didnt help.
Can anyone please give me the instructions on how to build the jar from eclipse, for it to run on Hadoop.
I am aware of the process of building the Jar file from eclipse,however I am not sure, do I have to take any special care for building a jar file, so that it runs on Hadoop.
When you submit the command, make certain you have the following things on the line to do the command:
When you indicate the jar, make certain you are directing to the jar properly. It may be easiest to be certain by using the absolute path. To get the absolute path, if you navigate to the place where the jar is, then run 'readlink -f ' command to get the absolute path. So for you, not just hist.jar, but maybe /home/akash_user/jars/hist.jar or wherever it is on your system. If you are using Eclipse, it may be saving it somewhere funny, so make sure that is not the problem. The jar cannot be run from HDFS storage. must run from local storage.
When you name your main class, in your example Histogram, you must use the fully qualified name of the class, with the package, the project, and the class. So, usually, if the program/project is named Histogram, and there is a HistogramDriver, HistogramMapper, HistogramReducer, and your main() is in HistogramDriver, you need to type Histogram.HistogramDriver to get the program running. (Unless you made your jar runnable, which requires extra stuff at the beginning, making .mdf and things.)
Make sure that the jar you are submitting (hist.jar) is in the current directory from where you are submitting the 'hadoop jar' command.
If the issue is still persisting, please tell the Java, Hadoop and Linux version you are using.
You should not keep the jar file in HDFS when executing the MapReduce job. Make sure Jar is available in the local path. Input path and output directory should be the path from HDFS.

MATLAB path doesn't match pathdef

I am running MATLAB 2013b on a CentOS machine. Right now I have startup.m set to cd me into another directory, lets call it shared, where I keep all of my code. I also have pathdef.m set to add shared and some of its subdirectories to the MATLAB path.
The problem is that once MATLAB is open and I check the path settings, ~/matlab has also been added to the top of the path list, ahead of shared. The home folder is where I keep some old versions of code, so it causes the wrong version to be run sometimes. I've double checked my pathdef and startup files, and the ~/matlab directory is definitely not listed. What could be causing MATLAB to automatically add this directory to the path, and how can I fix it?

eclipse window not opened when i am trying to click eclipse.exe

When i am trying to open eclipse exe file , window is not opened , why this is happened , previously it is working fine but today it is not opened any changes i need to do?it will help full if any one gave quick fix .
thanks
Ramana
(The OP ramana solved it by uninstalling and re-installing Java, but below is another potential cause)
Check if your PATH hasn't changed somehow: see Java Tips: “Adventure” in resolving the Java error “Error occurred during initialization of VM”
Running Java.exe produce error in other directories (since the SDK’s bin is added to path.)
However running in it’s bin directory, it runs fine.
In the case of the ips mentioned before, the issue was:
The good news is that it is nothing supernatural or magical image but the bad news is that the Windows directory is the “protagonist” image.
From file search, it can be concluded that somehow certain mischievous program is copying some crucial java files into Windows directory which are stored in path, and so unless the java’s bin is the foremost in the path, one will bound to get the error.
The error occurs because java.exe or other Java executable expect some support files and directories to be found but obviously could not find it in Windows directory.
Running the java.exe in its bin directory will not produce error because Windows will use the current directory to which the file is run first before searching for it in the path.
That might not be the case for you, but that could still be related to a PATH issue.