KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

Where is Java Control Panel?

Sun Feb 16, 2014 9:50 pm

I am trying to run an unsigned applet on the Java installed as part of Raspbian so I need to set security to medium. This is normally done by running ControlPanel.

ControlPanel is normally in /usr/lib/jvm/<javaverion>/bin

But I cannot find it in /usr/lib/jvm/jdk-7-oracle-armhf/bin

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Where is Java Control Panel?

Mon Feb 17, 2014 10:28 am

The Oracle JDK for ARM do no longer contain the browser-plugin, the javaws "webstart" and the control-panel.
The Oracle browser-plugin and "webstart" is closed source technology and Oracle decide which JDK variants they ship this extra deployment technology with.

The IcedTea-web project have created free software replacements for the webbrowser plugin and webstart that you can use on mobile, desktop and embedded ARM systems such as the Raspberry Pi.
You can install icedtea-web and run unsigned applets by installing the
icedtea-7-plugin
package from the Raspbian archive.

Code: Select all

sudo apt-get install icedtea-7-plugin
The icedtea-web control-panel is accessible using the itweb-settings command.

Code: Select all

itweb-settings
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

Killertechno
Posts: 175
Joined: Wed Jan 02, 2013 8:28 am

Re: Where is Java Control Panel?

Fri Oct 23, 2015 3:49 pm

Hi guys, I've a trouble using java.
My webserver (on Pi) is using java applet to get data from server (also this running on same Pi).
I access to webpage through browser (on Windows PC), but my java console says:

java.security.AccessControlException: access denied ("java.net.SocketPermission" "192.168.33.2:18000" "connect,resolve")
I suppose I need to set this exception on server side (right?), then I need to edit java policy.
I can't find java.policy file, how can I solve this?

Thanks.

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Where is Java Control Panel?

Mon Oct 26, 2015 11:34 am

Killertechno wrote:Hi guys, I've a trouble using java.
My webserver (on Pi) is using java applet to get data from server (also this running on same Pi).
Cool, this indicate that the applet is working when using IcedTea-web.
your application will work on all Linux and BSD PC's using IcedTea-web.
Killertechno wrote: I access to webpage through browser (on Windows PC), but my java console says:

java.security.AccessControlException: access denied ("java.net.SocketPermission" "192.168.33.2:18000" "connect,resolve")
This indicate that the application do not work when using the proprietary Oracle java deployment plug-in due to how the plugin thinks about security using privileged code blocks and signed binarys using certificates.
Killertechno wrote:
Killertechno wrote: I suppose I need to set this exception on server side (right?),

then I need to edit java policy.
I can't find java.policy file, how can I solve this?

Thanks.
You have thee ways to fix this issue:
A: only use systems running icedtea-web since you have verified that it work.
icedtea-web is the only solution that still allow unsigned sandboxed applications and self signed applications which is ideal for hobby projects and enterprise applications running java applications that is expected to work for years to come.
B: obtain a certificate, sign your application and then place the code causing the exception inside a privileged block, example the following code allows you to open a file on the client, same thing with network access.

Code: Select all

File aPrivilegedFile = (File) AccessController.doPrivileged(new PrivilegedAction()
	{
		public Object run()
		{
			System.out.println("Getting File : " + location);
			File outputFile1 = new File(location);
			return outputFile1;
		}
	});
C: You need to change the java.policy settings file stored on the client.
Change the java policy file stored on the client, the Windows PC.
the manual for the java.policy file is found at:
https://docs.oracle.com/javase/8/docs/t ... Files.html
the file is located in the home folder or inside the java run-time directory on the windows pc
${user.home}\java.policy
${java.home}\lib\security\java.policy
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

Killertechno
Posts: 175
Joined: Wed Jan 02, 2013 8:28 am

Re: Where is Java Control Panel?

Mon Oct 26, 2015 6:19 pm

Hi xranby, first of all thanks for help.

The only way I've ever seen to get data from my server application was through Java, so I supposed to create a web interface to make it "standard".
I've installed icedtea due I've found only this plugin working with epiphany browser (to make connection test on Raspberry itself).

Do you really mean I need to use icedtea as only plugin to make it work?
Not so long time ago I got all working on Firefox, but Java/Firefox updates make it not working..... so I can't understand where (client/server side) is the trouble and how solve it.
I supposed all my troubles were on server side, so I changed java policies in all ways all day long, my brain is out of order now...

I'll check policies on client side tomorrow.
Thanks for help.

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Where is Java Control Panel?

Tue Oct 27, 2015 12:22 pm

Killertechno wrote:Hi xranby, first of all thanks for help.

The only way I've ever seen to get data from my server application was through Java, so I supposed to create a web interface to make it "standard".
I've installed icedtea due I've found only this plugin working with epiphany browser (to make connection test on Raspberry itself).

Do you really mean I need to use icedtea as only plugin to make it work?
Not so long time ago I got all working on Firefox, but Java/Firefox updates make it not working..... so I can't understand where (client/server side) is the trouble and how solve it.
I supposed all my troubles were on server side, so I changed java policies in all ways all day long, my brain is out of order now...

I'll check policies on client side tomorrow.
Thanks for help.
You can make your server output HTML using a web framework.
by doing that you do not need to use a plugin on your client.

The most minimal and fast web application framework for use on the pi is Rupy:
http://rupy.se/
https://github.com/tinspin/rupy
https://github.com/tinspin/rupy/wiki/Tutorial

There exist many other web application framework that you can use such as jetty, tomcat... and more.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

Return to “Java”