tags:

views:

70

answers:

1

Our C++ application hosts Sun's JVM and I need to upgrade it to the newest version on Windows. I downloaded JDK 6u20, but I have no idea which folders to take into our installation. We currently have some version of Java 5 but it seems that whoever did it in the first place, cherry picked the files.

I'd like to know which folders to take from the installation of JDK. We are using JNI so I will also need all the include files/libs.

Also, the Java people are saying that I should take the files from JDK installation rather than the JRE, is there any difference? Maybe in the jars that ship in the JDK's JRE?

+3  A: 

Without knowing your application, it's not possible to say which files can be left out, so I'd say use the entire JRE.

However, you can find out which files the original creator of the installer didn't select by comparing the installer's JRE files with the original JRE. You can then write up these files and take a guess as to why they are not needed by your application.

If in doubt, leave it in. :)

EDIT: The JRE redistribution license requires the software to be complete:

(a) you distribute the Software complete and unmodified and only
    bundled as part of Your applets and applications ("Programs"),

See http://java.sun.com/javase/6/webnotes/install/jre/README

However, the same document also mentions that the files are divided into required and optional files, and lists which files are optional. So, you can leave out the optional files.

mdma
FYI, If you're delivering part of the JRE, instead of all of it, you're probably in violation of the Java redistribution license.
Craig Trader
I tried comparing the folders, but in our current jvm bin folder there are only 6 DLLs. In the installation's bin folder there are 43 :/Maybe I'll just copy everything besides the `exe` files, since I'm sure we don't need those.
Idan K
If you want a "private" JRE but also stay within the redistribution licence, you might try using an Ahead of Time compiler, like Excelsior JET. This compiles your java code down to a native DLL and bundles only the JRE DLLs that are really needed.
mdma
@Idan K - the `jre/README.txt` file lists the redistribution requirements, including which files/directories are optional.
McDowell
@McDowell - we think alike - I'd just added this to my answer and then saw your comments after.
mdma
excellent, should always read the `readme` first ;-) Thanks!
Idan K