Solved

determine java version for windows installer

Posted on 2013-05-18
4
449 Views
Last Modified: 2013-05-18
I am building a windows installer program.  I need to know the java version so I can load the correct jni.h in the project.  I cannot use a command window, I need to do it in code.  Any ideas?
0
Comment
Question by:dhenderson12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
phoenix5ire earned 500 total points
ID: 39177451
0
 

Author Comment

by:dhenderson12
ID: 39177543
thanks, that helped a lot and you get the points.  I a followup question, if you don't mind:
The programs that the installer handles all make reference to the jni.h file (and some other java header files as well).  Now that I know the path to, and current version of, java I can build the individual programs and the installer.  But what happens when java update occurs? do I need to re-build the release again, or is there a way to have an include statement that will read an external value and act accordingly?
0
 
LVL 3

Expert Comment

by:phoenix5ire
ID: 39177592
Thanks for the points. :)
To answer your question(s), I'm assuming Java is require to run your program. Once Java is installed, it has an option to auto-check/update on the computer that it is installed. This update check is independent of your program.

Regarding your 2nd question about recompiling a new release because of new Java version, if I understand your question correctly. If the (intent) code is to check/verify the installed Java version on the local machine, the Java registry key is static in Windows machine, I would continue to use the same key for the installer to check/verify the version of Java. Each time your program is install, the verification will check the same registry key and if the require Java version is met, your program installs, if not, it should prompt the user (installer) to download the current Java version before proceeding, the Java download URL is static for the most part, URL is: http://java.com/en/download/index.jsp
 
Let me know if this answer your questions.

Thanks.
0
 

Author Comment

by:dhenderson12
ID: 39177597
sort of ... I guess it depends on whether or not java plays nice with future versions on the client machine ie.: i build with 1.7.0_6 and the client has 1.7.0_12 (or vice versa).  Thanks, I have more research to do.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why use this lambda? 12 95
Create a Dropdown list with sub group 10 43
what type of pointer is this pointer? 3 31
Using the .NET JSON Serializer to create a single string 6 57
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question