I want to display a message to the user informing them that the minimum version of Java that must be installed is the value I have set for the <minversion> element of my Java validVersion. I believe that you provide this functionality, but I just cannot figure it out from your documentation

asked 09 Oct '12, 18:07

DennisU's gravatar image

DennisU
16779
accept rate: 0%


You can specify one or more valid versions by specifying <validVersionList> for <autodetectJava>, which whould include one or more <validVersion> definitions - each defines a valid version that can be used.

For example:

<autodetectJava> <promptUser>0</promptUser> <validVersionList> <validVersion> <maxVersion>1.7</maxVersion> <minVersion>1.4</minVersion> </validVersion> </validVersionList> </autodetectJava>

This will accept any version of Java between 1.4 and 1.7, inclusive.

link

answered 09 Oct '12, 18:34

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

I understand how to setup the "validVersionList" and already am doing do. My question is not about how to specify a minimum java version, but how do a get that value ("1.4" in your example) as a variable so I can insert it into a message that I display to the user. Something like....

"No valid version of Java could be located on your system. Our application requires a minimum Java version of ${minVersion}."

(09 Oct '12, 19:15) DennisU

Thank you for the explanation. It is not possible to retrieve what you have set in the <validVersion>. What you can do is set the minVersion variable earlier using <setInstallerVariable> and then specify <minVersion>${minVersion}</minVersion>.

(10 Oct '12, 03:27) wojciechka ♦♦

That is what I figured out.

(10 Oct '12, 12:31) DennisU
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×40
×27

Asked: 09 Oct '12, 18:07

Seen: 1,077 times

Last updated: 10 Oct '12, 12:31