how to build OpenJDK from source

Asked by Avin on 2016-06-06

I am refereeing to this tar file
link1:
https://launchpad.net/ubuntu/+archive/primary/+files/openjdk-8_8u91-b14.orig.tar.xz
I am not able to find any MAKE in this source

but I am able to find in this link
link2
http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz

please help me how to build from link1

Thanks
Avinash

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2016-06-16
Last query:
2016-06-16
Last reply:
2016-06-06

For Oracle Java you can use:

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

Why do you want to compile OpenJDK ?

Avin (avinashub211) said : #2

the directory structure in link1 and link2 are not same, that's what my concern is.
then what's the use of downloading source from link1, if I am not able to build from the source
link1
https://launchpad.net/ubuntu/+archive/primary/+files/openjdk-8_8u91-b14.orig.tar.xz

I am trying to build a debug version of OpenJDK in link1

Thanks.

Best Manfred Hampl (m-hampl) said : #3

Oracle jdk and the jdk from openjdk are not the same.
Oracle's version has certain licensing restrictions that are different from those that OpenJDK has.

Debug symbols for openjdk8 are available in the standard Ubuntu repositories in the package openjdk-8-dbg

You have to understand that on Ubuntu you always have two source packages that go together.
In this case openjdk-8_8u91-b14.orig.tar.xz containg the original source. and the Ubuntu (or Debian) additions and modifications in a file named something like openjdk-8_8u91-b14-0ubuntu4~16.04.1.debian.tar.xz

This second package should contain everything needed in addition to the original source package, to build the .deb packages with the debuild command.

Avin (avinashub211) said : #4

Thanks Manfred Hampl, that solved my question.