Installing Oracle Java 8 in Ubuntu


In an earlier post I talked about installing java in fedora 20. In this post I am going to do the same with Ubuntu. As you know Ubuntu is an Apt based repositories to install softwares. so its farely easy if you have the software in one of the Ubuntu pre-configured repository. But unfortunately Oracle java 8 is not included in one of those, Hence we will have to either download the same from java website and configure all by ourselves or use a third party repository for the same. Here i will talk about the easiest way, that is adding a third party repository from WebUpd8 team. WebUpd8 doest keep the java binaries in their server, they just provide a script that can download and install Oracle Java 8. So let us begin.

Open the Terminal and type as follows.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

and follow the on screen instructions.

thats it, you have installed java 8. happy coding

Fixing ‘file’ access is not allowed due to restriction set by the accessExternalSchema property in Java 8

After installing Java 8, I faced this issue ‘schema_reference: Failed to read schema document ‘MyWebservice.xsd_1.xsd’, because ‘file’ access is not allowed due to restriction set by the accessExternalSchema property’ when i tried to create web service client for my Java EE Webservice in Netbeans. Upon investigation i found that the error is happening for all java 8 users who is working with web service clients. to fix this error, please do the following.
Please create a file named ‘‘ and paste the below content to it.
javax.xml.accessExternalSchema = all

save the file to your jdk installation directory/jre/lib folder.

that’s it. the issue will be fixed now. happy coding.