Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
392 views
in Technique[技术] by (71.8m points)

java - Difference between openjdk-6-jre, openjdk-6-jre-headless, openjdk-6-jre-lib

I am having trouble understanding some of the basics of Java JRE.

I need to run Java code in an embedded system and for this I need a minimal Java Runtime Environment installed in a Linux kernel, that is to say, the minimum package necessary for executing Java binaries. I think it is not possible to do this only with a JVM (the JRE package is necessary, am I wrong here?)

The thing is, when looking at the Debian repositories I don't quite understand the differences between the packages openjdk-6-jre, openjdk-6-jre-headless and openjdk-6-jre-lib. Will Java programs run only with the former? or, are the three of them needed?

This is an issue as there is a big difference in size (MB) between them.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You are correct in that you will need a JRE package to run any Java application.

Since you say you're running on an embedded platform I assume that the Java application you want to run has no GUI. In that case, you will be fine with openjdk-6-jre-headless. This is explained on the openjdk-6-jre-headless package page here "Minimal Java runtime - needed for executing non GUI Java programs".

As you can see from the debian package details page, openjdk-6-jre-headless depends on openjdk-6-jre-lib (among other packages), so that will get installed either way.

If however the Java application you want to run has a GUI, you will need openjdk-6-jre instead of openjdk-6-jre-headless


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...