Determine the JRE version of a user

I have 2 versions of an applet (which I didn't write) - one which works on the standard built-in browser JRE, and one with more features but requires the Sun JRE.
Rather than require that everyone download the Sun JRE, I'd rather write a tiny redirect applet that tells which version they have and redirect to the appropriate page, with a note saying "to get more features download the Sun JRE" and a link or something.
I know I can do this by something like seeing if Class.forName("java.util.ArrayList"); throws an exception, but that seems hackish and I was wondering if there was a better way?

Aha! nm, I found it
System.getProperty("java.vendor");
System.getProperty("java.version");

Similar Messages

  • Determine if JRE version is compliant through Batch Script

    I am deploying multiple programs to remote systems. Some of the programs require JRE 1.41 or later to run. I would like to create a bat script to not only identify the JRE version, but identify if the client has a newer version of JRE. So far I have been able to identify the latest version. However, I do not know how to compare to a later version of JRE. For example lets say JRE version 6.0 comes out. At this point the program will probably be compliant with my machine, but I don't know how to make my script identify later versions, since batch files only compare and don't have many math features. I thought about doing a comparison between every java version that has been deployed.(I haven't even found a comprehensive list either) But this may not provide support for newer versions of JRE Any suggestions? Below is what I have so far.
    @echo off
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
    type reg1.txt | find "CurrentVersion" > reg2.txt
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if %JavaTemp% == 1.41 echo G2G
    if %JavaTemp% == 1.3 echo Failed. You need to upgrade JRE to at least 1.41

    does anyone know how (or if it's possible) to
    determine if a JRE is the international version?
    thanks.There is no API to provide this answer conclusively. However, one might guess.
    For example, in the non-localized JRE, you will not have the Japanese locale support. So you could do something like this:
    Locale[] supportedLocales = DateFormat.getAvailableLocales();
    If the Locale array contains a Locale for ja_JP, then you have the international version. It's simple, but perhaps not the cleanest way of determining the answer to your question.
    Regards,
    John O'Conner
    http://www.joconner.com/javai18n/

  • How do you determine the firmware version for a laptop docking station?

    How do you determine the firmware version of a HP docking station?
    Laptop Model: HP 2740p
    OS: 64bit Windows 7
    Expansion Base: 2740 Ultra Slim Expansion Base WA995AA#ABA
    Thank you for any assistance.
    Alvin

    atenpo wrote:
    How do you determine the firmware version of a HP docking station?
    Laptop Model: HP 2740p
    OS: 64bit Windows 7
    Expansion Base: 2740 Ultra Slim Expansion Base WA995AA#ABA
    Thank you for any assistance.
    Alvin
    WA995AA#ABA shows to be a hard drive, not a docking station

  • How to determine the JDK version required to use a jar?

    Hi all.
    I am using a hosted server that uses JDK 1.4.2 and I cannot upgrade the VM. I have been finding it extremely difficult to install web applications on this server since I find that after installing the app, the web server complains the bytecode used in the jar is newer than the VM can understand (or it complains that the app uses JEE servlet or JSP methods it cannot find).
    To compound the problem, only about 25% of the sites I've visited that provide jars for download mention the minumum JDK version required to use them. (Some do not mention any system requirements at all besides 'requires Java and a Java application server').
    Do any of you know of any tools that can analyze a jar and determine the bytecode version it uses?
    (Another helpful tool would be one that can determine the minimum JEE APIs required to run a web app..., but that's probably wishful thinking :)).
    Thanks for your help.
    Michael N. Christoff

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

  • So Can I determine the business partners linked to user based on the assigned role and org. structure?

    Hello, I am working on a SAP CRM 7 Sales implementation and we are implementing leads and opportunity scenarios. The current business organization model is that there multiple vertical and horizontal departments. This is typical matrix structure. This organization has done the segregation of its clients based on the verticals so every clients belongs to at least one or more Vertical department but Horizontal departments can contact all the clients. In the same way sales executives are also either belonging to one or more Verticals or Horizontal departments? Horizontal sales executive can create leads for any clients available in the system but a Vertical sales executive can only create lead only for the client belongs to his vertical and assigned to him. This can be achieved by creating organization structure and business partner relationship.
    Now the problem statement is that few sales executives need work for both some Verticals and Horizontals at the same time. But requirement is that they should be able to do the both roles with single user id but multiple roles. So when sales executive is creating leads his vertical department, he should only be able to select clients assigned to his Vertical only but when he is creating lead for Horizontal department, he should be able to select any clients.
    So Can I determine the business partners linked to user based on the assigned role and org. structure?
    Please let me know if this is not clear also  note we are only using CRM WebUI no SAP ePortal.
    Thanks a lot your help in advance.
    Regards
    Sudesh Sharma

    Thanks, Tahir
    my problem has solved
    Kind Regards,
    Faisal

  • How to I determine the firmware version on my hp prime?

    Friends
    How to I determine the firmware version on my hp prime?
    Thanks
    Migs

    The easiest way is: Home, Help, Tree, up-cursor, Enter.
    Note: I don't work for HP.  I'm just another happy HP customer.
    -Joe-

  • ITunes quits when I'm trying to open it. I have installed the latest version and another user on the same Mac can use their iTunes when they log in. I have tried deleting iTunes and re-installing but it still won't open. Any ideas?

    iTunes quits when I'm trying to open it. I have installed the latest version and another user on the same Mac can use their iTunes when they log in. I have tried deleting iTunes and re-installing but it still won't open. Any ideas? Thanks.

    Hold down the option key while starting iTunes and make an new library.  Will it open then? If so, you have a bad library.  With the new library import the library.xml version of the file in your iTunes folder.  This will make it 90% like before (some metadata are not identical, but I don't know which ones).
    iTunes: How to re-create your iTunes library and playlists - http://support.apple.com/kb/ht1451

  • Is there any way I can set the jre version before I open the browser

    I want to set the jre version of the browser before I open the window. Can I have any batch script that does this? Is this possible does any body already did this?

    Have you tried the applet tag to specify the version runtime your
    app will use? Here's a link to an old documentation, but the
    principle should still apply, if it's what you're looking for:
    http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html

  • How to determine the Java version in Windows XP

    In Windows 2000, I can determine the version of Java that's running by typing 'java -version' in a command prompt. However, when I type this in a command prompt in Windows XP, a message says 'java is not recognized as an internal or external command ...'.
    Is there some other means of determining the version of Java that's running on Windows XP?
    Thank you.

    I found the directory with java.exe on my XP client. After updating my Path and then typing 'java -versions' I still see a 'java not found message'. No problem though - a README.TXT says that I have JRE 1.1.7B.
    One final question - a co-worker who also has XP just starting seeing a pop-up window saying 'Runtime' error when running a Java applet. His java.exe is in a path that includes the sub-directory 'JRE' On my XP client, java.exe is in a path which includes a 'JRE11' sub-directory. We therefore seem to have different versions of the JRE. Since I don't see the Runtime error when running the same applet, should my co-worker try upgrading his JRE?
    Thank you.

  • Determine the Struture columns Based on User Entry in Bex Report

    Hello Experts,
    I have requirement as below.
    Requirement: Create a Bex report to Display Credits and Sales based on Fiscal Period in Rows and Profit centers in Columns ( PC1, PC2, PC3....PCN where N is Number of Profit centers a user entered in Selection screen).
    I want to take Fiscal Period, Sales and Credits in Rows and Each profit center in Seperate Columns. The Tricky part is, I cannot define a structure with fixed number of Columns since User can Enter any number of Profit Centers in the selection Screen.
    To put it simple terms, I have to Pass the Profit Center Variable Values to the Structure and Determine the Number of Columns in the Structure Dymanically at runtime..
    Can this be done. If so Please let me know the Solution.
    Thank and Regards,
    Prashanth

    Hi Pasha,
    Thanks for responding back.
    Actually there are 2 other Columns that I did not mention above. First Column is to Display values for all Profit Centers and the other Column is to Display the difference of Total - 'Values of all the Profit Centers that the user has selected'. Im not sure how it will work if I put the PC Char outside the Structure.
    Please let me know If you have some more thought.
    Thanks,
    Prashanth

  • I don't like the new itunes, how do I go back to a previous version.  I find the new version is not user friendly.

    I don't like the new itunes.  It's not as user friendly as the previous versions.  How do I go back to a previous version?

    That sounds like the difference between the new Firefox home page '''about:home''' and the previous Google Search page which has '''GMail''' at the top if you used GMail.
    You can change your home page so that it points to what you had before, which It would be something like:
    * http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official
    Note on Google pages
    * They won't show GMail at the top until you have gone to GMail
    Directions to '''reset your home page''':
    * http://support.mozilla.com/en-US/kb/How to set the home page
    More on Search and on Keyword Shortcuts
    * [http://dmcritchie.mvps.org/firefox/search.htm Search and Substitution Shortcuts especially for Firefox users]
    * [http://dmcritchie.mvps.org/firefox/kws.htm Firefox Keyword Shortcuts]
    But I don't really understand why you or anyone else would want to use such a page for a home page, it is redundant. You have as many search engines as you want in the search bar, the default search is Google.
    You can invoke '''GMail''', any search, any bookmark, any bookmarklet with a [http://dmcritchie.mvps.org/firefox/kws.htm keyword shortcut] .
    '''You're not stuck with how the toolbars have been changed''' in Firefox 4.0, '''this is Firefox''', you can '''customize''' it. That is why Firefox became so popular, you can customize it how you want it with Customize Toolbars, Extensions, Themes, Styles.
    You can make '''Firefox 4.0.1''' look like '''Firefox 3.6.17''', see numbered items '''1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 look like 3.6)]

  • How do I determine the executable version number?

    Hi.
    I have a VI and a build specification for it.  In the Version Information section of the build specification, I set the version number to auto-increment.  I would like to display this version number on an indicator on the front panel of the executable, but I have not found a property that provides this information. Does anybody know how to get the executable version number? I am aware that it is possible to right-click on the .exe file in windows explorer, go to properties and get it that way, but I would like to display it on the VI itself.
    On a related topic, I have noticed that only the 'build' field of the version gets auto-incremented. How does the application builder decide when it is time to increment the major, minor and fix fields?  Or will it only ever auto-increment the build field and I am supposed to update the other fields manually? (That would actually make sense, but I would like confirmation.)
    Thanks in advance,
    Alejandro
    Solved!
    Go to Solution.

    -Please check this if its helpful
    http://digital.ni.com/public.nsf/allkb/935BA7FB426305398625711E0055F1FA
    -And vote for this if you like idea
    http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Get-EXE-version-in-LabVIEW/idi-p/1324119
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • How to determine the oc4j version?

    Dear All,
    I would like to clarify which version of the OC4J server ( actually which version of the j2ee & servlet API) we have available. Where can I quickly see this info?
    The best thing I have found is http://oursecurehost/7780/relnotes.htm I see we have "Oracle9i Application Server Release Notes" ... but I believe this to be incorrect....
    Many thanks in advance
    regards
    Ben Bookey

    Check MetaLink Note:230611.1
    How to display the OC4J version details through a JSP
    Regards
    Dimitre

  • Is it possible to change the Calendar 7.0 view to show 2 weeks instead of 1 week or month view. I find the month view is far too messy and the 1 week too short. To date I found the previous version more visibly user friendly

    I have upgraded to Mavericks and have found the Calendar 7.0 not visually user friendly. The week view is too resrictive and the month view far too messy. Is there any way of editting the view, the ability to change the colour and thickness of the grid lines would at least help. This version of Calendar seems to be a retrograde step.

    Agree.  Positively loathe the new calendar display - each day blends into the next and I can't get my information at a glance.  Looks like it's time to switch to BusyCal or Google Calendar.

  • In OLS, how to determine the list of labels a user is allowed to use?

    subject says it all; we have determined how to determine ALL labels available, but how do we filter it via existing lbac tables to show the labels the current user (either direct or via proxy) can use?
    thanks, alan

    Hi there,
    maybe these views do help:
    http://st-doc.us.oracle.com/10/102/network.102/b14267/admpriv.htm#i1012870
    Thanks, Peter

Maybe you are looking for