<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: GUI integrated browser control	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gui-integrated-browser-control</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Wed, 16 Jul 2025 14:39:04 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Seth		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-526940</link>

		<dc:creator><![CDATA[Seth]]></dc:creator>
		<pubDate>Wed, 16 Jul 2025 14:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-526940</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-516669&quot;&gt;Seth&lt;/a&gt;.

@Yair @Collin,

I figured out a sort of work around to pass the information i needed to MATLAB in the newer versions that use the cef browser. I just pass a string of number IDs seperated by a comma. In a javascript function, I collect the text I need from the HTML browser input, create a temporary &quot;textarea&quot; element, write the text in that element, copy that text to the clipboard, and read the clipboard text with MATLAB. I can trigger the function from either HTML or MATLAB click but it is more stable from the MATLAB side. You do need to override the focusable attribute of the MATLAB side java browser like here (https://undocumentedmatlab.com/articles/fixing-a-java-focus-problem).

example javascript code

needed_text = &quot;Hello&quot;;
const temp = document.createElement(&quot;textarea&quot;);
temp.value = needed_text;
temp.style.position = &quot;fixed&quot;;
document.body.appendChild(temp);
temp.focus();
temp.select();
document.execCommand(&quot;copy&quot;);
document.body.removeChild(temp);]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-516669">Seth</a>.</p>
<p>@Yair @Collin,</p>
<p>I figured out a sort of work around to pass the information i needed to MATLAB in the newer versions that use the cef browser. I just pass a string of number IDs seperated by a comma. In a javascript function, I collect the text I need from the HTML browser input, create a temporary &#8220;textarea&#8221; element, write the text in that element, copy that text to the clipboard, and read the clipboard text with MATLAB. I can trigger the function from either HTML or MATLAB click but it is more stable from the MATLAB side. You do need to override the focusable attribute of the MATLAB side java browser like here (<a href="https://undocumentedmatlab.com/articles/fixing-a-java-focus-problem" rel="ugc">https://undocumentedmatlab.com/articles/fixing-a-java-focus-problem</a>).</p>
<p>example javascript code</p>
<p>needed_text = &#8220;Hello&#8221;;<br />
const temp = document.createElement(&#8220;textarea&#8221;);<br />
temp.value = needed_text;<br />
temp.style.position = &#8220;fixed&#8221;;<br />
document.body.appendChild(temp);<br />
temp.focus();<br />
temp.select();<br />
document.execCommand(&#8220;copy&#8221;);<br />
document.body.removeChild(temp);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Seth		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-526932</link>

		<dc:creator><![CDATA[Seth]]></dc:creator>
		<pubDate>Mon, 14 Jul 2025 16:43:18 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-526932</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520862&quot;&gt;Nicholas&lt;/a&gt;.

@Nicholas

I finally figured out a workaround for communicating what I need back to MATLAB in version 2024b using javascript in the HTML browser. Since I was able to get that to work, I next needed to get it compiled. 

It worked for me to just replace both the jar and jarext folders in the &quot;C:\Program Files\MATLAB\MATLAB Runtime\R2024b\java&quot; folder with the ones in the &quot;C:\Program Files\MATLAB\R2024b\java&quot; folder. You also have to copy the classpath.txt file from the &quot;C:\Program Files\MATLAB\R2024b\toolbox\local&quot; to the &quot;C:\Program Files\MATLAB\MATLAB Runtime\R2024b\toolbox\local&quot; folder. 

There is probably only a certain set of these java files that are necessary for it to work but I just wanted to make sure it worked before traversing down the rabbit trail of missing java classes.

Now I just need to create a wrapper installer for the user to do this on installation. I could probably build it in to the startup of the compiled application but that would probably require an administrator to open the software once after installation.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520862">Nicholas</a>.</p>
<p>@Nicholas</p>
<p>I finally figured out a workaround for communicating what I need back to MATLAB in version 2024b using javascript in the HTML browser. Since I was able to get that to work, I next needed to get it compiled. </p>
<p>It worked for me to just replace both the jar and jarext folders in the &#8220;C:\Program Files\MATLAB\MATLAB Runtime\R2024b\java&#8221; folder with the ones in the &#8220;C:\Program Files\MATLAB\R2024b\java&#8221; folder. You also have to copy the classpath.txt file from the &#8220;C:\Program Files\MATLAB\R2024b\toolbox\local&#8221; to the &#8220;C:\Program Files\MATLAB\MATLAB Runtime\R2024b\toolbox\local&#8221; folder. </p>
<p>There is probably only a certain set of these java files that are necessary for it to work but I just wanted to make sure it worked before traversing down the rabbit trail of missing java classes.</p>
<p>Now I just need to create a wrapper installer for the user to do this on installation. I could probably build it in to the startup of the compiled application but that would probably require an administrator to open the software once after installation.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Amin zaami		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-522683</link>

		<dc:creator><![CDATA[Amin zaami]]></dc:creator>
		<pubDate>Mon, 04 Sep 2023 21:23:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-522683</guid>

					<description><![CDATA[I have the same problem as Nicholas, The function works fine on R2022, but when compiled it fails (I used com.mathworks.mlwidgets.help.LightweightHelpPanel), I tried compiling with the previous class &quot;com.mathworks.mlwidgets.html.HTMLBrowserPanel&quot; (which was suitable for previous MATLAB release) it also failed.

I tried many tricks to make it work, also asking ChatGPT, but has not yet succeeded... Any tip is appreciated.]]></description>
			<content:encoded><![CDATA[<p>I have the same problem as Nicholas, The function works fine on R2022, but when compiled it fails (I used com.mathworks.mlwidgets.help.LightweightHelpPanel), I tried compiling with the previous class &#8220;com.mathworks.mlwidgets.html.HTMLBrowserPanel&#8221; (which was suitable for previous MATLAB release) it also failed.</p>
<p>I tried many tricks to make it work, also asking ChatGPT, but has not yet succeeded&#8230; Any tip is appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-522475</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 21:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-522475</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-522473&quot;&gt;Sebastian&lt;/a&gt;.

In theory you could use the &lt;a href=&quot;https://en.wikipedia.org/wiki/Data_URI_scheme&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;data: URI scheme&lt;/a&gt; (e.g. &lt;code&gt;.load(&#039;data:text/html,&#060;html&gt;&#060;body&gt;Hello world&#060;/body&gt;&#060;/html&gt;&#039;)&lt;/code&gt;), but for some reason it doesn&#039;t work well in Matlab GUI, I&#039;m not sure why.
Instead, try to store your HTML in a temporary text file and then load that file using the &lt;a href=&quot;https://en.wikipedia.org/wiki/File_URI_scheme&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;file: URI scheme&lt;/a&gt;, for example: &lt;code&gt;.load(&#039;file:/C:/path/to/file.name&#039;)&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-522473">Sebastian</a>.</p>
<p>In theory you could use the <a href="https://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank" rel="nofollow">data: URI scheme</a> (e.g. <code>.load('data:text/html,&lt;html>&lt;body>Hello world&lt;/body>&lt;/html>')</code>), but for some reason it doesn&#8217;t work well in Matlab GUI, I&#8217;m not sure why.<br />
Instead, try to store your HTML in a temporary text file and then load that file using the <a href="https://en.wikipedia.org/wiki/File_URI_scheme" target="_blank" rel="nofollow">file: URI scheme</a>, for example: <code>.load('file:/C:/path/to/file.name')</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sebastian		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-522473</link>

		<dc:creator><![CDATA[Sebastian]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 15:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-522473</guid>

					<description><![CDATA[Thanks for your update to the now unsupported `HTMLBrowserPanel`. I tried to replace it with the `LightweightHelpPanel` but the application I am working on is showing generated HTML code. Is it possible to display a HTML string in the `LightweightHelpPanel`? I only see the &#039;load&#039; method which tries to resolve a URL.]]></description>
			<content:encoded><![CDATA[<p>Thanks for your update to the now unsupported `HTMLBrowserPanel`. I tried to replace it with the `LightweightHelpPanel` but the application I am working on is showing generated HTML code. Is it possible to display a HTML string in the `LightweightHelpPanel`? I only see the &#8216;load&#8217; method which tries to resolve a URL.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nicholas		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-521435</link>

		<dc:creator><![CDATA[Nicholas]]></dc:creator>
		<pubDate>Wed, 03 May 2023 15:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-521435</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520883&quot;&gt;Yair Altman&lt;/a&gt;.

Yair,
Changing the desktop help options did not solve the issue.  Though, it’s unclear how I could change these options in the Runtime, if that&#039;s what you meant?
I should clarify that the app is functional from the full desktop MATLAB, but it does not if only the Runtime is installed.
I should also clarify my original question: Have you successfully run the BrowserPanel in a compiled application on a machine with only the Runtime (i.e., no desktop installed)?
I found that with both Desktop and Runtime installed, the compiled application is functional when the desktop’s Path Environment Variable supersedes the Runtime’s version.  But it fails when they&#039;re swapped and the Runtime is given precedence.
This seems to corroborate what Seth and Collin were talking about above, where Seth supposed “My guess was that MATLAB runtime does not get installed with the full set of jxbrowser classes […]”.  I wonder if this is similar, where the Runtime has the LightWeightHelpPanel class, but not all dependencies to load it.
Any thoughts?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520883">Yair Altman</a>.</p>
<p>Yair,<br />
Changing the desktop help options did not solve the issue.  Though, it’s unclear how I could change these options in the Runtime, if that&#8217;s what you meant?<br />
I should clarify that the app is functional from the full desktop MATLAB, but it does not if only the Runtime is installed.<br />
I should also clarify my original question: Have you successfully run the BrowserPanel in a compiled application on a machine with only the Runtime (i.e., no desktop installed)?<br />
I found that with both Desktop and Runtime installed, the compiled application is functional when the desktop’s Path Environment Variable supersedes the Runtime’s version.  But it fails when they&#8217;re swapped and the Runtime is given precedence.<br />
This seems to corroborate what Seth and Collin were talking about above, where Seth supposed “My guess was that MATLAB runtime does not get installed with the full set of jxbrowser classes […]”.  I wonder if this is similar, where the Runtime has the LightWeightHelpPanel class, but not all dependencies to load it.<br />
Any thoughts?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-521059</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 11 Apr 2023 09:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-521059</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520894&quot;&gt;Nicholas&lt;/a&gt;.

The error indicates that the &lt;code&gt;LightweightHelpPanel&lt;/code&gt; exists, but fails to load due to some funky preference of your deployed Help documentation. Try to set your Matlab Preferences/Help/Documentation Location to &quot;Web&quot; instead of &quot;Installed locally&quot; and see if this helps. You could also try to update the &quot;Quick help display&quot; preference beneath it.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520894">Nicholas</a>.</p>
<p>The error indicates that the <code>LightweightHelpPanel</code> exists, but fails to load due to some funky preference of your deployed Help documentation. Try to set your Matlab Preferences/Help/Documentation Location to &#8220;Web&#8221; instead of &#8220;Installed locally&#8221; and see if this helps. You could also try to update the &#8220;Quick help display&#8221; preference beneath it.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nicholas		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520894</link>

		<dc:creator><![CDATA[Nicholas]]></dc:creator>
		<pubDate>Fri, 24 Mar 2023 18:54:33 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-520894</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520883&quot;&gt;Yair Altman&lt;/a&gt;.

Hi Yair,

Thanks for the reply.  I am on Windows 10.  I also forgot to mention that this all works wonderfully out of the editor.  It only fails once compiled.

So, yes, I have tried a simple program with &#039;displayWebPage&#039;.  Among many other tests, I&#039;ve also built a figure with only the LWHP embedded.  They all fail when LWHP is created.  Using your function to test, the log reports the error at line 79 (createBrowserIn call), but I show below that it dies at line 111 (LWHP).

However! I should note that displayWebPage will load a page, but it does so only by way of the catch and subsequent &#039;web&#039; call!  For me, this loads Undocumented in a new Chrome tab, not the expected ML figure.  The log was initially empty, so, I added a few &#039;disp&#039; calls to your function to track what was going on. 
Namely, in the catch block I now have:
&lt;pre lang=&#039;matlab&#039;&gt;
catch ME
   disp(&#039;error caught!&#039;)
   ME.getReport()
   disp([&#039;class(&#039;&#039;jBrowser&#039;&#039;) &#039;, &#039;returns: &#039;, class(jBrowser)])
   disp([&#039;exist(&#039;&#039;com.mathworks.mlwidgets.help.LightweightHelpPanel&#039;&#039;) returns: &#039;, ...
         num2str(exist(&#039;com.mathworks.mlwidgets.help.LightweightHelpPanel&#039;))])

   % Close any newly-created figure
   if newFig, delete(hFig), end

   % Open the URL in system browser
   disp(&#039;url displayed in system browser instead&#039;);
   web(url, &#039;-browser&#039;);
   if nargout, hContainer = []; end
end
&lt;/pre&gt;

I have also added displays before and after LWHP is created to see if it makes it through (it does not):
&lt;pre lang=&quot;matlab&quot;&gt;
% Add maximized browser panel within hParent
disp(&#039;Line before LWHP&#039;);
jBrowserPanel = javaObjectEDT(com.mathworks.mlwidgets.help.LightweightHelpPanel); %#ok
disp(&#039;Line after LWHP&#039;);
&lt;/pre&gt;

So, for the sake of clarity, no functional changes to you code, just command window displays.  This is what&#039;s written to the Log File:

&lt;pre&gt;
Line before LWHP
error caught!

ans =
    &#039;Error using displayWebPage&#062;createBrowserIn
     Java exception occurred: 
     java.lang.NoClassDefFoundError: com/mathworks/instutil/InstutilResourceKeys
     	at com.mathworks.mlwidgets.help.DocCenterRoot.initDocRelease(DocCenterRoot.java:54)
     	at com.mathworks.mlwidgets.help.DocCenterRoot.(DocCenterRoot.java:36)
     	at com.mathworks.mlwidgets.help.HelpPrefs.(HelpPrefs.java:57)
     	at com.mathworks.mlwidgets.help.DocCenterDocConfigParams.(DocCenterDocConfigParams.java:32)
     	at com.mathworks.mlwidgets.help.MLDocConfigBase.getInstance(MLDocConfigBase.java:27)
     	at com.mathworks.mlwidgets.help.docconfig.WebDocConfig.(WebDocConfig.java:28)
     	at com.mathworks.mlwidgets.help.DocCenterDocConfig.getInstance(DocCenterDocConfig.java:56)
     	at com.mathworks.mlwidgets.help.LightweightHelpPanel.initDocConfig(LightweightHelpPanel.java:62)
     	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:57)
     	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:53)
     Caused by: java.lang.ClassNotFoundException: com.mathworks.instutil.InstutilResourceKeys
     	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
     	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
     	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     	... 10 more
     
     Error in displayWebPage (line 79)
     
     Error in display_main (line 1)&#039;

class(&#039;jBrowser&#039;) returns: double
exist(&#039;com.mathworks.mlwidgets.help.LightweightHelpPanel&#039;) returns: 8
url displayed in system browser instead
&lt;/pre&gt;

As you can see, the error is thrown at line 79 (at createBrowserIn); &#039;Line after LWHP&#039; is not displayed to log; and the jBrowser class remains double from initialization (@ line 71).  This all points to the compiled app failing when attempting to call:

&lt;pre lang=&quot;Matlab&quot;&gt;jBrowserPanel = javaObjectEDT(com.mathworks.mlwidgets.help.LightweightHelpPanel); %#ok&lt;/pre&gt;

Thanks!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520883">Yair Altman</a>.</p>
<p>Hi Yair,</p>
<p>Thanks for the reply.  I am on Windows 10.  I also forgot to mention that this all works wonderfully out of the editor.  It only fails once compiled.</p>
<p>So, yes, I have tried a simple program with &#8216;displayWebPage&#8217;.  Among many other tests, I&#8217;ve also built a figure with only the LWHP embedded.  They all fail when LWHP is created.  Using your function to test, the log reports the error at line 79 (createBrowserIn call), but I show below that it dies at line 111 (LWHP).</p>
<p>However! I should note that displayWebPage will load a page, but it does so only by way of the catch and subsequent &#8216;web&#8217; call!  For me, this loads Undocumented in a new Chrome tab, not the expected ML figure.  The log was initially empty, so, I added a few &#8216;disp&#8217; calls to your function to track what was going on.<br />
Namely, in the catch block I now have:</p>
<pre lang='matlab'>
catch ME
   disp('error caught!')
   ME.getReport()
   disp(['class(''jBrowser'') ', 'returns: ', class(jBrowser)])
   disp(['exist(''com.mathworks.mlwidgets.help.LightweightHelpPanel'') returns: ', ...
         num2str(exist('com.mathworks.mlwidgets.help.LightweightHelpPanel'))])

   % Close any newly-created figure
   if newFig, delete(hFig), end

   % Open the URL in system browser
   disp('url displayed in system browser instead');
   web(url, '-browser');
   if nargout, hContainer = []; end
end
</pre>
<p>I have also added displays before and after LWHP is created to see if it makes it through (it does not):</p>
<pre lang="matlab">
% Add maximized browser panel within hParent
disp('Line before LWHP');
jBrowserPanel = javaObjectEDT(com.mathworks.mlwidgets.help.LightweightHelpPanel); %#ok
disp('Line after LWHP');
</pre>
<p>So, for the sake of clarity, no functional changes to you code, just command window displays.  This is what&#8217;s written to the Log File:</p>
<pre>
Line before LWHP
error caught!

ans =
    'Error using displayWebPage&gt;createBrowserIn
     Java exception occurred: 
     java.lang.NoClassDefFoundError: com/mathworks/instutil/InstutilResourceKeys
     	at com.mathworks.mlwidgets.help.DocCenterRoot.initDocRelease(DocCenterRoot.java:54)
     	at com.mathworks.mlwidgets.help.DocCenterRoot.(DocCenterRoot.java:36)
     	at com.mathworks.mlwidgets.help.HelpPrefs.(HelpPrefs.java:57)
     	at com.mathworks.mlwidgets.help.DocCenterDocConfigParams.(DocCenterDocConfigParams.java:32)
     	at com.mathworks.mlwidgets.help.MLDocConfigBase.getInstance(MLDocConfigBase.java:27)
     	at com.mathworks.mlwidgets.help.docconfig.WebDocConfig.(WebDocConfig.java:28)
     	at com.mathworks.mlwidgets.help.DocCenterDocConfig.getInstance(DocCenterDocConfig.java:56)
     	at com.mathworks.mlwidgets.help.LightweightHelpPanel.initDocConfig(LightweightHelpPanel.java:62)
     	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:57)
     	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:53)
     Caused by: java.lang.ClassNotFoundException: com.mathworks.instutil.InstutilResourceKeys
     	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
     	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
     	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     	... 10 more
     
     Error in displayWebPage (line 79)
     
     Error in display_main (line 1)'

class('jBrowser') returns: double
exist('com.mathworks.mlwidgets.help.LightweightHelpPanel') returns: 8
url displayed in system browser instead
</pre>
<p>As you can see, the error is thrown at line 79 (at createBrowserIn); &#8216;Line after LWHP&#8217; is not displayed to log; and the jBrowser class remains double from initialization (@ line 71).  This all points to the compiled app failing when attempting to call:</p>
<pre lang="Matlab">jBrowserPanel = javaObjectEDT(com.mathworks.mlwidgets.help.LightweightHelpPanel); %#ok</pre>
<p>Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520883</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 24 Mar 2023 11:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-520883</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520862&quot;&gt;Nicholas&lt;/a&gt;.

Nicholas - yes, I used it in a compiled Windows app using R2022b (no update). You didn&#039;t specify the Matlab code location that threw the error so I can&#039;t help you much. Maybe you&#039;re not running on Windows? Anyway, try compiling a simple program that just calls &lt;code&gt;displayWebPage&lt;/code&gt; and see what happens.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520862">Nicholas</a>.</p>
<p>Nicholas &#8211; yes, I used it in a compiled Windows app using R2022b (no update). You didn&#8217;t specify the Matlab code location that threw the error so I can&#8217;t help you much. Maybe you&#8217;re not running on Windows? Anyway, try compiling a simple program that just calls <code>displayWebPage</code> and see what happens.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nicholas		</title>
		<link>https://undocumentedmatlab.com/articles/gui-integrated-browser-control#comment-520862</link>

		<dc:creator><![CDATA[Nicholas]]></dc:creator>
		<pubDate>Thu, 23 Mar 2023 15:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=847#comment-520862</guid>

					<description><![CDATA[Hi Yair,

Have you attempted your displayWebPage utility (or the LightweightHelpPanel in general) within a compiled application?  It appears to fail in apps derived from both R2022b and R2023a, at least (the two I&#039;ve tried).  I get the same failed results with displayWebPage or various simplified figures I&#039;ve assembled for testing/debugging.  They all compile and launch successfully, but the same error is thrown whenever the LightweightHelpPanel is called.  The Java error stack below seems to indicate a missing class, but I can&#039;t tell for sure.  Can you discern if something is missing and, if so, what is missing?  

Or any other tricks up your sleeve?

 This was written to one of the app&#039;s output log:

Java exception occurred: 
java.lang.NoClassDefFoundError: com/mathworks/instutil/InstutilResourceKeys
	at com.mathworks.mlwidgets.help.DocCenterRoot.initDocRelease(DocCenterRoot.java:54)
	at com.mathworks.mlwidgets.help.DocCenterRoot.(DocCenterRoot.java:36)
	at com.mathworks.mlwidgets.help.HelpPrefs.(HelpPrefs.java:57)
	at com.mathworks.mlwidgets.help.DocCenterDocConfigParams.(DocCenterDocConfigParams.java:32)
	at com.mathworks.mlwidgets.help.MLDocConfigBase.getInstance(MLDocConfigBase.java:27)
	at com.mathworks.mlwidgets.help.docconfig.WebDocConfig.(WebDocConfig.java:28)
	at com.mathworks.mlwidgets.help.DocCenterDocConfig.getInstance(DocCenterDocConfig.java:56)
	at com.mathworks.mlwidgets.help.LightweightHelpPanel.initDocConfig(LightweightHelpPanel.java:62)
	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:57)
	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:53)
Caused by: java.lang.ClassNotFoundException: com.mathworks.instutil.InstutilResourceKeys
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 10 more]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>Have you attempted your displayWebPage utility (or the LightweightHelpPanel in general) within a compiled application?  It appears to fail in apps derived from both R2022b and R2023a, at least (the two I&#8217;ve tried).  I get the same failed results with displayWebPage or various simplified figures I&#8217;ve assembled for testing/debugging.  They all compile and launch successfully, but the same error is thrown whenever the LightweightHelpPanel is called.  The Java error stack below seems to indicate a missing class, but I can&#8217;t tell for sure.  Can you discern if something is missing and, if so, what is missing?  </p>
<p>Or any other tricks up your sleeve?</p>
<p> This was written to one of the app&#8217;s output log:</p>
<p>Java exception occurred:<br />
java.lang.NoClassDefFoundError: com/mathworks/instutil/InstutilResourceKeys<br />
	at com.mathworks.mlwidgets.help.DocCenterRoot.initDocRelease(DocCenterRoot.java:54)<br />
	at com.mathworks.mlwidgets.help.DocCenterRoot.(DocCenterRoot.java:36)<br />
	at com.mathworks.mlwidgets.help.HelpPrefs.(HelpPrefs.java:57)<br />
	at com.mathworks.mlwidgets.help.DocCenterDocConfigParams.(DocCenterDocConfigParams.java:32)<br />
	at com.mathworks.mlwidgets.help.MLDocConfigBase.getInstance(MLDocConfigBase.java:27)<br />
	at com.mathworks.mlwidgets.help.docconfig.WebDocConfig.(WebDocConfig.java:28)<br />
	at com.mathworks.mlwidgets.help.DocCenterDocConfig.getInstance(DocCenterDocConfig.java:56)<br />
	at com.mathworks.mlwidgets.help.LightweightHelpPanel.initDocConfig(LightweightHelpPanel.java:62)<br />
	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:57)<br />
	at com.mathworks.mlwidgets.help.LightweightHelpPanel.(LightweightHelpPanel.java:53)<br />
Caused by: java.lang.ClassNotFoundException: com.mathworks.instutil.InstutilResourceKeys<br />
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)<br />
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)<br />
	&#8230; 10 more</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
