<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Getting java working on UBTouch]]></title><description><![CDATA[<p dir="auto">Hello everyone, i have been busy trying to get java working an ubuntu touch.</p>
<p dir="auto">The approach i am using is by packaging OpenJDK binaries with the click package and linking to it in the .desktop file.</p>
<p dir="auto">i got this approach working in amd64 with "clickable desktop" and even made a working window/UI in swing.</p>
<p dir="auto">however i have run into some problems with arm64 and armf.</p>
<p dir="auto">first of all i don't have a phone that supports armf UBTouch so i can't test the build, i was hoping someone here could test it for me?</p>
<p dir="auto">Second of all, i cant seem to find any arm64 binaries for openjdk that work portably, does anyone know where to find it or how to cross-compile it for arm64 on amd64?</p>
<p dir="auto">Heres a screenshot of the amd64 build:<br />
<img src="/assets/uploads/files/1587457451394-screenshot-from-2020-04-21-10-23-43.png" alt="Screenshot from 2020-04-21 10-23-43.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Click downloads:<br />
armf(<a href="https://drive.google.com/open?id=1tNf9r9V_w7saZM1IE385tDng35TqvuKk" target="_blank" rel="noopener noreferrer nofollow ugc">https://drive.google.com/open?id=1tNf9r9V_w7saZM1IE385tDng35TqvuKk</a>)<br />
amd64(<a href="https://drive.google.com/open?id=1EGq5kHdh7KdtqCKrpBJB2SzWZjWYnIfg" target="_blank" rel="noopener noreferrer nofollow ugc">https://drive.google.com/open?id=1EGq5kHdh7KdtqCKrpBJB2SzWZjWYnIfg</a>)<br />
arm64(<a href="https://drive.google.com/open?id=1IGhc0XXfiUH8eL8FiEmoxAC_kkLTyBes" target="_blank" rel="noopener noreferrer nofollow ugc">https://drive.google.com/open?id=1IGhc0XXfiUH8eL8FiEmoxAC_kkLTyBes</a>)</p>
<p dir="auto">Source code(<a href="https://github.com/ComLarsic/Java-Template-UT" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ComLarsic/Java-Template-UT</a>)</p>
<p dir="auto">Update: so i found available arm64 binaries but after installing the updated click package on my oneplus3t it immediately closes itself, does anyone maybe know why?</p>
]]></description><link>https://forums.ubports.com/topic/4132/getting-java-working-on-ubtouch</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 19:59:44 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/4132.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Apr 2020 08:24:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Getting java working on UBTouch on Fri, 08 Apr 2022 01:09:37 GMT]]></title><description><![CDATA[<p dir="auto">is that a working version of java for a nexus arm7</p>
]]></description><link>https://forums.ubports.com/post/63561</link><guid isPermaLink="true">https://forums.ubports.com/post/63561</guid><dc:creator><![CDATA[Bigdaddyweldz]]></dc:creator><pubDate>Fri, 08 Apr 2022 01:09:37 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 23 Jun 2020 13:37:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dobey" aria-label="Profile: dobey">@<bdi>dobey</bdi></a> Opened here: <a href="https://github.com/ubports/apparmor-easyprof-ubuntu/issues/16" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ubports/apparmor-easyprof-ubuntu/issues/16</a></p>
]]></description><link>https://forums.ubports.com/post/35551</link><guid isPermaLink="true">https://forums.ubports.com/post/35551</guid><dc:creator><![CDATA[Elleo]]></dc:creator><pubDate>Tue, 23 Jun 2020 13:37:04 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 23 Jun 2020 13:32:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dobey" aria-label="Profile: dobey">@<bdi>dobey</bdi></a> Okay, will do!</p>
]]></description><link>https://forums.ubports.com/post/35550</link><guid isPermaLink="true">https://forums.ubports.com/post/35550</guid><dc:creator><![CDATA[Elleo]]></dc:creator><pubDate>Tue, 23 Jun 2020 13:32:06 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 23 Jun 2020 13:30:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/elleo" aria-label="Profile: Elleo">@<bdi>Elleo</bdi></a> said in <a href="/post/35541">Getting java working on UBTouch</a>:</p>
<blockquote>
<p dir="auto">It seems x-mir-helper isn't able to launch confined, perhaps there should be a discussion about adding an AppArmor policy for these use cases?</p>
</blockquote>
<p dir="auto">If that's true, probably a good idea to open an issue about it at <a href="https://github.com/ubports/apparmor-easyprof-ubuntu" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ubports/apparmor-easyprof-ubuntu</a></p>
]]></description><link>https://forums.ubports.com/post/35548</link><guid isPermaLink="true">https://forums.ubports.com/post/35548</guid><dc:creator><![CDATA[dobey]]></dc:creator><pubDate>Tue, 23 Jun 2020 13:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 23 Jun 2020 12:16:15 GMT]]></title><description><![CDATA[<p dir="auto">I just had a bit of a play with this and was able to get it working with just the following changes to the original repository:</p>
<ol>
<li>Set <code>X-Ubuntu-XMir-Enable=true</code> in the .desktop file</li>
<li>Remove the policy groups from the AppArmor profile and set <code>"template": "unconfined",</code> instead</li>
</ol>
<p dir="auto">It seems x-mir-helper isn't able to launch confined, perhaps there should be a discussion about adding an AppArmor policy for these use cases?</p>
<p dir="auto"><img src="/assets/uploads/files/1592914076880-ubports-java.jpg" alt="Photo of a Java application running on BQ Aquaris 4.5" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forums.ubports.com/post/35541</link><guid isPermaLink="true">https://forums.ubports.com/post/35541</guid><dc:creator><![CDATA[Elleo]]></dc:creator><pubDate>Tue, 23 Jun 2020 12:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Sat, 25 Apr 2020 17:19:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dobey" aria-label="Profile: dobey">@<bdi>dobey</bdi></a> no, i did not edit the .desktop in the applicion folder manually. i have tried reinstalling it and i still get the same error. i will try to rebuild it and completly remove the app using UTTweak tool</p>
]]></description><link>https://forums.ubports.com/post/32109</link><guid isPermaLink="true">https://forums.ubports.com/post/32109</guid><dc:creator><![CDATA[ComLarsic]]></dc:creator><pubDate>Sat, 25 Apr 2020 17:19:45 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Sat, 25 Apr 2020 13:42:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comlarsic" aria-label="Profile: ComLarsic">@<bdi>ComLarsic</bdi></a> Try uninstalling the app, and then installing it again. Or change the version number and building a new click, and installing that.</p>
<p dir="auto">You did edit the original <code>.desktop</code> file and build a new click, rather than editing the <code>.desktop</code> in <code>~/.local/share/applications/</code> right?</p>
]]></description><link>https://forums.ubports.com/post/32088</link><guid isPermaLink="true">https://forums.ubports.com/post/32088</guid><dc:creator><![CDATA[dobey]]></dc:creator><pubDate>Sat, 25 Apr 2020 13:42:39 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Sat, 25 Apr 2020 11:33:18 GMT]]></title><description><![CDATA[<p dir="auto">After adding the line to the desktop file i seem to still not be able to run the app.</p>
<p dir="auto">i checked the .desktop file in /home/phablet/.local/share/applications</p>
<p dir="auto">and tried running the line behind <code>Exec=</code><br />
Manually in the terminal like so:<br />
<code>aa-exec-click -p javatest.comlarsic_JavaTest_1.5.0 -- JavaBin/bin/java -jar main.jar</code><br />
and i get the error <code>aa-exec: ERROR: profile 'javatest.comlarsic_JavaTest_1.5.0' does not exist</code></p>
<p dir="auto">Here is the .desktop file that shows in the applications folder:</p>
<pre><code>[Desktop Entry]
Name=Java-test
Exec=aa-exec-click -p javatest.comlarsic_JavaTest_1.5.0 -- JavaBin/bin/java -jar main.jar
Icon=/opt/click.ubuntu.com/.click/users/phablet/javatest.comlarsic/assets/logo.svg
Terminal=false
Type=Application
X-Ubuntu-Touch=true
X-Ubuntu-XMir-Enable=true
Path=/opt/click.ubuntu.com/.click/users/phablet/javatest.comlarsic
X-Ubuntu-Old-Icon=assets/logo.svg
X-Ubuntu-Application-ID=javatest.comlarsic_JavaTest_1.5.0
X-Ubuntu-UAL-Source-Desktop=/opt/click.ubuntu.com/.click/users/phablet/javatest.comlarsic/JavaTest.desktop
</code></pre>
<p dir="auto">what seems to be going wrong here?</p>
]]></description><link>https://forums.ubports.com/post/32077</link><guid isPermaLink="true">https://forums.ubports.com/post/32077</guid><dc:creator><![CDATA[ComLarsic]]></dc:creator><pubDate>Sat, 25 Apr 2020 11:33:18 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Thu, 23 Apr 2020 11:36:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comlarsic" aria-label="Profile: ComLarsic">@<bdi>ComLarsic</bdi></a><br />
Hi,</p>
<p dir="auto">You can use this app as a convenience : <a href="https://open-store.io/app/logviewer.neothethird" target="_blank" rel="noopener noreferrer nofollow ugc">https://open-store.io/app/logviewer.neothethird</a><br />
And you can have a look in <code>.cache/upstart/</code></p>
]]></description><link>https://forums.ubports.com/post/31934</link><guid isPermaLink="true">https://forums.ubports.com/post/31934</guid><dc:creator><![CDATA[AppLee]]></dc:creator><pubDate>Thu, 23 Apr 2020 11:36:23 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Thu, 23 Apr 2020 10:39:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dobey" aria-label="Profile: dobey">@<bdi>dobey</bdi></a> i tried adding thr line to the .desktop file but it still closes on launch.</p>
<p dir="auto">you mentioned something about a log file, i am sorry if this is a bit of a newbie question but where could i find the log file?</p>
]]></description><link>https://forums.ubports.com/post/31930</link><guid isPermaLink="true">https://forums.ubports.com/post/31930</guid><dc:creator><![CDATA[ComLarsic]]></dc:creator><pubDate>Thu, 23 Apr 2020 10:39:40 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 21 Apr 2020 14:06:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dobey" aria-label="Profile: dobey">@<bdi>dobey</bdi></a> Ah ok! thanks for the tips!</p>
]]></description><link>https://forums.ubports.com/post/31819</link><guid isPermaLink="true">https://forums.ubports.com/post/31819</guid><dc:creator><![CDATA[ComLarsic]]></dc:creator><pubDate>Tue, 21 Apr 2020 14:06:15 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 21 Apr 2020 14:03:37 GMT]]></title><description><![CDATA[<p dir="auto">Java does not have Mir or Wayland backends, and therefore works on your PC because you are using X11, while the phone is not. I'm pretty sure you would see an error about <code>DISPLAY</code> if you check the log file.</p>
<p dir="auto">You will need to add <code>X-Ubuntu-XMir-Enable=true</code> to your <code>.desktop</code> file.</p>
<p dir="auto">Also, you really should not include the binaries in your git repo, but instead pull them in during the clickable build process, so you can avoid having architecture-dependent things in the repo. You should avoid duplicating data/source files otherwise, too.</p>
]]></description><link>https://forums.ubports.com/post/31818</link><guid isPermaLink="true">https://forums.ubports.com/post/31818</guid><dc:creator><![CDATA[dobey]]></dc:creator><pubDate>Tue, 21 Apr 2020 14:03:37 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 21 Apr 2020 11:34:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wdehoog" aria-label="Profile: wdehoog">@<bdi>wdehoog</bdi></a> i am not getting any kernel crashes, the app just closes itself.<br />
i have ran openjdk directly using the terminal before and everything seemed to be running fine. maybe its a device specific problem?</p>
]]></description><link>https://forums.ubports.com/post/31815</link><guid isPermaLink="true">https://forums.ubports.com/post/31815</guid><dc:creator><![CDATA[ComLarsic]]></dc:creator><pubDate>Tue, 21 Apr 2020 11:34:23 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 21 Apr 2020 11:19:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comlarsic" aria-label="Profile: ComLarsic">@<bdi>ComLarsic</bdi></a> Some time ago I tried to run librespot-java using various versions of openjdk. They all caused kernel crashes (related to pulse audio) and made my phone reboot (opo). Sorry, no java for me.</p>
]]></description><link>https://forums.ubports.com/post/31814</link><guid isPermaLink="true">https://forums.ubports.com/post/31814</guid><dc:creator><![CDATA[wdehoog]]></dc:creator><pubDate>Tue, 21 Apr 2020 11:19:22 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 21 Apr 2020 10:58:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/capsia" aria-label="Profile: Capsia">@<bdi>Capsia</bdi></a> I figured as much, it seems to me that either OpenJDK or the app itself doesn't have access to the correct files it needs. i might have to change the apparmor permissions a bit.</p>
]]></description><link>https://forums.ubports.com/post/31812</link><guid isPermaLink="true">https://forums.ubports.com/post/31812</guid><dc:creator><![CDATA[ComLarsic]]></dc:creator><pubDate>Tue, 21 Apr 2020 10:58:15 GMT</pubDate></item><item><title><![CDATA[Reply to Getting java working on UBTouch on Tue, 21 Apr 2020 10:36:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/comlarsic" aria-label="Profile: ComLarsic">@<bdi>ComLarsic</bdi></a> Hi, I've tested it on armhf (Nexus 5 dev) and I can confirm the behavior. The app closes itself immediately.</p>
]]></description><link>https://forums.ubports.com/post/31809</link><guid isPermaLink="true">https://forums.ubports.com/post/31809</guid><dc:creator><![CDATA[Capsia]]></dc:creator><pubDate>Tue, 21 Apr 2020 10:36:51 GMT</pubDate></item></channel></rss>