Xenobiologist Posted November 25, 2006 Share Posted November 25, 2006 (edited) Hi, I'm currently writing a java versions check script. These are the things I want to know: 1. All java versions installed on the pc (JRE and webstart) 2. Which version is the one the user uses to start apps. 3. IE Seetings belonging to java 4. Which codepage is installed 5. I'll have to have a look if the keys in 2. match the version displayed in java control panel What is the best way to get a collection of all installed java versions? --> Getting it from here ? 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' --> or parsing StringSplit(EnvGet("PATH"), ';') for the string java? 2. Is it this for javaw :HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\javaw.Exeand this for javaws : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\javaws.exe 3&4&5. I have to look up Any advice is appreciated. Edit: For the ones who asked why: We need this, cause our Framework is only tested on specific versions. We specify them also in the start.jnlp file. But some customers install other java versions and wonder why strange things happen. The difference between the java version are sometimes crazy, cause a newer or older version then the tested one, causes not an error all the time. Sometimes there is just a weird behaviour e.g. in the event handling. ... That is why, we need to check the version first, before starting to search the error. So long, Mega Edited November 25, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
MHz Posted November 25, 2006 Share Posted November 25, 2006 2. Is it this for javaw :HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\javaw.Exeand this for javaws : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\javaws.exeI would go the App Paths method as it is easier and should remian consistant in case they change installer type. Get the default value for the path to javaws.exe and then use FileGetVersion should do it. I have 5.0.90.1 installed at present. Link to comment Share on other sites More sharing options...
Xenobiologist Posted November 25, 2006 Author Share Posted November 25, 2006 I would go the App Paths method as it is easier and should remian consistant in case they change installer type. Get the default value for the path to javaws.exe and then use FileGetVersion should do it. I have 5.0.90.1 installed at present.Hi,thanks for the reply. But that will only show the default version to start an application. You can still start apps with older or newer versions, too. The problem is normally older versions, because of this:The put a shortcut a there desktop to start webstart "URL". Something like this run as:C:\Programme\Java\j2re1.4.2_08\javaws\javaws.exe http://gsesnr01.:8001/worksts/jnlp/start.jnlpThen it doesn't matter what app paths is in the reg for javaws, right!So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Xenobiologist Posted November 26, 2006 Author Share Posted November 26, 2006 Sorry for the bump, but nobody who did that before? :"> So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
/dev/null Posted November 26, 2006 Share Posted November 26, 2006 Edit: For the ones who asked why: We need this, cause our Framework is only tested on specific versions. We specify them also in the start.jnlp file. But some customers install other java versions and wonder why strange things happen. The difference between the java version are sometimes crazy, cause a newer or older version then the tested one, causes not an error all the time. Sometimes there is just a weird behaviour e.g. in the event handling. ...That is why, we need to check the version first, before starting to search the error.well, if you need a special java version, do it like all others, install your preferred version in a subdirectory of your application, then you don't have to care about other installed versions.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Xenobiologist Posted November 26, 2006 Author Share Posted November 26, 2006 well, if you need a special java version, do it like all others, install your preferred version in a subdirectory of your application, then you don't have to care about other installed versions.CheersKurtHi,thanks for the reply. That is not possible. The application is a webStart app. So the customer types a url in the browser, downloads the jnlp file and then starts the app via JavaWebStart. The problem is, I cannot see which version of webstart they use to start the app. Nevertheless, I'm on my way of getting the script done. Thanks!So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
/dev/null Posted November 26, 2006 Share Posted November 26, 2006 thanks for the reply. That is not possible. The application is a webStart app. So the customer types a url in the browser, downloads the jnlp file and then starts the app via JavaWebStart. The problem is, I cannot see which version of webstart they use to start the app.well, did you read the webstart docu and faq? There are ways to request a certain JRE version and also to automatically install such a jre.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
McGyver Posted December 23, 2006 Share Posted December 23, 2006 Did you ever get your Java version checker working? I am in the same boat of needing to know what versions of java are installed. Any help you can pass along would be greatly appreciated. Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 24, 2006 Author Share Posted December 24, 2006 Hi, yes I did finish it. It is a bit special for our company. But I can strip it down and then I'll post the code or send it to you. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
McGyver Posted December 26, 2006 Share Posted December 26, 2006 That would be great. Any help is always appreciated.Hi,yes I did finish it. It is a bit special for our company. But I can strip it down and then I'll post the code or send it to you.So long,Mega Link to comment Share on other sites More sharing options...
McGyver Posted January 3, 2007 Share Posted January 3, 2007 Any luck on getting the stripped down code? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now