Compiled application only runs on the compiling machine
2 次查看(过去 30 天)
显示 更早的评论
I have a strange situation where an application compiled on machine #1 only runs on #1 and not on #2. If I compile on #2, it then runs on #2 but not on #1.
The error I get seems similar to an issue that was fixed in R2014 - Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name: "com.mongodb.MongoClient" fails this test. I've tried using the .*, I've tried not using import and using the fully qualified name instead, all of these run on the compiling machine but not on any other.
Has anybody encountered this problem as well? Any suggestions?
--------------------------------------------------------------
I've copied the PackagingLog.html file below:
mcc -o DAP -W WinMain:DAP -T link:exe -d C:\Users\oerc0003\Dropbox\Projects\DIET\DAP\DAP\DAP\for_testing -v C:\Users\oerc0003\Dropbox\Projects\DIET\DAP\DAP\dap.m -a 'C:\Users\oerc0003\Documents\MATLAB\Add-Ons\Toolboxes\GUI Layout Toolbox\code\layout\+uix\Resources' -r 'C:\Program Files\MATLAB\R2017b\toolbox\compiler\Resources\default_icon.ico'
Compiler version: 6.5 (R2017b)
Dependency analysis by REQUIREMENTS.
[Warning: Package directories not allowed in MATLAB path:
C:\Users\oerc0003\Documents\MATLAB\Add-Ons\Toolboxes\GUI Layout
Toolbox\code\layout\+uix\Resources]
Parsing file "C:\Users\oerc0003\Dropbox\Projects\DIET\DAP\DAP\dap.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\oerc0003\Dropbox\Projects\DIET\DAP\DAP\DAP\for_testing\readme.txt".
Packaging...
Creating the bundle...
Self contained installer created at C:\Users\oerc0003\Dropbox\Projects\DIET\DAP\DAP\DAP\for_redistribution\MyAppInstaller_mcr.exe.
Packaging complete.
Elapsed packaging time was: 50 seconds.
3 个评论
Josh
2024-2-26
does any of this regexp trickery translate to practical application?
i understanding the importance of hacking but that's not really the point for applying regexp (you're not trying to improve your hacking skills via the Cody platform)
So I must go back to your first point about being the #1 ranked player, why is being ranked #1 on Cody so important to you?
in my mind, the most "efficient" solution is meant to offer those who wrote alternative algorithms an opportunity to learn something new, so that's why there's a desire to float the solution with the minimum size
as for having the highest Cody score, that doesn't necessarily require having the smallest solution for each problem. having the smallest solution earns a badge but not extra points every time (I may be wrong?), so the goal of having the highest Cody score actually has nothing to do with also earning the smallest solution for each puzzle.
conclusion - if you want to game Cody to earn points for a leaderboard that translates to nothing, have at it. it's your freedom of expression. but doesn't it seem a little selfish to also want your name at the top of every problem and prevent learning opportunities for others?
that's why people gripe about regexp, it's not because they care about leaderboards, it's because they want to learn and the regexp tricker doesn't offer any learning for algorithm writing. it's just a cheat to see your name on the internet more.
采纳的回答
Kojiro Saito
2017-6-24
编辑:Kojiro Saito
2017-6-24
It's due to Java class path difference of MATLAB and deployed environment. You need to add Java class path in deployed application. Please see this link.
Edited: I've reproduced the same error using MATLAB / MATLAB Runtime R2017a, the same jar files (bson-3.4.2.jar, mongodb-driver-3.4.2.jar, mongodb-driver-core-3.4.2.jar) on Windows 10 machines. Machine #1 is MATLAB, machine #2 is MATLAB Runtime only. I solved by adding jar files on machine #2 and adding classpath.txt under MCRROOT\toolbox\local where MCRROOT is MATLAB Runtime installation folder. To use jar libraries on deployed MATLAB Runtime environment, you need to (1) add the jar files to m files when compiling, or (2) copy the jar files on the deployed machine and add jar file paths on classpath.txt.
I hope this works.
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Java Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!