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/

Similar Messages

  • Install JRE in silent mode using batch script

    hi,
    i hav developed a java application which i want to run on another pc where jre is not available. i want to install jre along with my java application by using batch script.
    please give the sample script code so that i can execute batch script on client machine.( i am currently using jre 1.6).
    Thanks in advance,
    Prashant.

    It is not supported at this time. I believe it will be around in 3.1... but that's out in the future. Von or Svetlana might be able to give more insight.
    CPO install is pretty quick, are you trying to do mass installs or something?

  • 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");

  • How to checkout from the batch script?

    Hello All !
    Does anybody knows how to maintain versioned files with the batch scripts? Particularly I'm talking about doing a checkout/checkin operations. Are any command-line utilities available? Is it possible at all?
    Regards, Sergey.

    you can get entire table script
    select dbms_metadata.get_ddl('TABLE','TABLE_NAME','SCHEMANAME') from dual;
    IT is not possible to get only the partition script
    As it is a part of table definition.
    You can also use the third party tool like 'TOAD' to get the script also.

  • I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Is Apple aware of this problem? No longer supported?

    My web page uses a Java Applet to allow my visitors to replay chess games; the Chess Viewer Deluxe applet was written by Nikolai Pilafov some time ago and has been working properly for some time (until recently). I don't monitor this part of my site regularly so I am not sure when it began to fail. On his web site [http://chesstuff.blogspot.com/2008/11/chess-viewer-deluxe.html] he has a link to check LiveConnect object functionality (which fails for OBJECT tags). His recommendation is to "seek platform specific support which might be available from the JRE developers for your platform".
    I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Until I checked the LiveConnect object functionality, I was unable to identify the source of the console error messages. This does seem to be the smoking gun.
    Is Apple aware of this problem? Are these classes no longer supported? Has anyone else had this problem? You can attempt to recreate the problem locally by going to my web page: http://donsmallidge.com/DonSmallidgeChess.html
    Thanks in advance for any help you can provide!
    Abbreviated Java Console output:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-384-10M3425 Java HotSpot(TM) 64-Bit Server VM
    load: class ZeroApplet.class not found.
    java.lang.ClassNotFoundException: ZeroApplet.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)
    load: class JavaToJS.class not found.
    java.lang.ClassNotFoundException: JavaToJS.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)

    I just went up to check the LiveConnect object functionality page AND IT WORKED THIS TIME! I must confess, this is very mysterious. I will do some more checking and reply here if I can determine why it is working now (and more importantly, why it didn't work before).

  • Java is blocked. Don't know why. Error: Application Blocked Java Plug-In 10.51.2.13 using JRE version 1.7.0_51-b13 Java HotSpot(TM) Client VM

    I keep receiving this message when trying to use http://www.exodus-chats.org/DolTerias . it uses a java based chat system, and won't allow me to open the application. I've tried checking through my options menus, but I've found no reason as to why this can be blocked. The only thing I've come up with is my plug ins, but it doesn't allow me to change anything to allow the app to be used.
    Application Blocked
    Details: Java Plug-In 10.51.2.13 using JRE version 1.7.0_51-b13 Java HotSpot(TM) Client VM

    Starting in Java 7 Update 51, sites that would normally be blocked based on your Java Security settings can be added to an Exceptions list, via the Java Control Panel. See the Java Help page [http://www.java.com/en/download/faq/exception_sitelist.xml How can I configure the Exception Site List?] for details.
    Ref: http://kb.mozillazine.org/Java#Java_security_prompts

  • Which JRE version to install on 64bit OS (win server 2008)

    Hello everyone
    I'm not sure what Java and JCO versions / releases to install on a Windows Server 2008 Standard 64bit Edition. We're installing  Edge BI 3.1... apparently this is 32bit Software. I understand that we need to install JCO 2.1.9. Normally I prefer to install 64bit versions of a software on a 64bit OS.
    In the JCO 2.1.9 installation preliminaries I read:
    The SAP Java Connector (JCo) 2.1.9 requires a Java Runtime Environment (JRE) version 1.3 or 1.4. The 64-bit JCo versions need a 64-bit JRE version 1.4. Please see SAP note 549268 for a current and detailed list of supported platforms and Java runtime environments.
    Unfortunately I can't find a 64bit JRE version 1.4... just a 32bit JRE 1.4.2_19 version. Furthermore this Java version is end of life. See http://www.oracle.com/technetwork/java/javase/download-138376.html.
    So question is: what versions exactly for JCO 2.1.9 (32 or 64 bit) and JRE should I install?
    Thanks for some clarification in advance to anyone!
    Renaud
    EDIT:
    According to [this|Re: BOE SAP integration kit issue - Java connector] posting it seems that it is required to install the 32bit version of JCO 2.1.9

    Actually, this problem is only partially solved. I still get "Can't connect to local MySQL server through socket '/var/mysql/mysql.sock..." when I type 'mysql'. I can access mysql by typing 'sudo mysql', but still get the socket error when connecting via php, so I think I still need to get to the point where I can type mysql without sudo.
    Also, I went ahead and installed MySQL 5 with the tar package.
    Message was edited by: rabbitdog

  • JRE versions and Browsers and Applets

    Is there a way to assign a particular JRE version to a browser session through JavaScript or VBScript programatically so that I can run applets from different sources which need different JREs?
    Basically I will have 2 links/buttons which will call two separate javascript methods to open two different browser windows to run two different applets running under different JREs
    However when I start IE each 'session' of IE is assigned to one JRE, any way to overcome this?
    TIA,
    Raj

    Martin thanks for your inputs
    I am sourcing html pages from multiple sites and the html/applet tag is generated by those websites.
    They do have the applet tag pointing to proper class-id of the java plugin.
    However, the problem is with IE one family(session) of browsers are attached to one version of JRE plugin.
    Here 'session' means: you open a browser and from within that browser you do go from a link or javascript etc. to another browser they are in same 'session'
    I am working on dynamically setting JRE plugin version to different browsers.
    Not sure I made it clear or confusing : )
    Thanks

  • JRE versions to test

    1. There are so many JRE versions from Sun out there. I wonder which versions do people typically test their java programs/applets with.
    2. what is the relation between JRE version (1.4.2_07) and the default virtual machine version(1.4.2_07-b05)?
    3. 1.4.2_07-b05 ... can someone explain the 5 fields of this version number and when each of them changes?
    thanks.

    Reply to (1) - Whatever Java virtual machine(s) you
    want to guarantee it'll run with. Typically a few
    versions.The reason I ask is my applet works on a machine with JRE1.4.2_08 but not on a machine with 1.4.2_04. For another problem, reading cookie through liveconnect did not work very well with 1.4.1. I also know that in 1.4.2_03, javascript cannot called applet methods to do privileged work even if the applet is signed - what I dont know is if this is a change between 1.4.1 and 1.4.2 series or introduced in 1.4.2_03.
    Things like these make me wonder if I have to test my applet with every JRE version out there. But since that is lot ot work, I am looking for recommedations as to what versions the QA can use for testing.

  • Detect JRE version of the Client Browser fiom a JSP

    I have an Applet that is called from a JSP page that works only in certain JRE versions .
    I was wondering if there is a way of finding the Installed JRE version of the Client ...

    You could use some of the old traditional Javascript code that determines what browser it's running in, and have that code pass different parameters to the applet based on its determination.

  • Bouncing Apache service through schedule batch script

    Hi
    We are using Oracle11i(11.5.10.2) with Database version 10.2.0.3 on windows 2000 server.
    We are getting login page error frequently for temporary solution we are bouncing apache service frequently.
    Now i want to restart Apache service through schedule batch script ,is it possible?
    Thanks
    With Regards
    Umair

    Hi Husseinr,
    Use Windows Task Scheduler to accomplish this.
    there is no diect option to schedule the service to restart and Actually i don't have batch script to schedule through Task Scheduler.
    Why don't you try to fix the issue instead of bouncing Apache? Did you log a SR?
    We raised SR and We are Following SR also it is has been running for long time,so until SR Solution i want to bounce the Apache servie through Scheduled Batch Script.
    Thanks
    Umair

  • 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

  • Jinit or JRE version?

    Jinit or JRE version?
    I am working on a large Forms, Reports & Discoverer 6i upgrade to 10.1.2.0.2 project.
    We are unsure as to which JVM and which JVM version to put through our build process. User desk tops will be a mixture of NT and XP.
    Reading the product statement of direction JRE would appear the way to go. Counter to that is our relative inexperience with the products, particulary on the OAS side and with JInit coming with the product it is also a strong contender.
    Im looking for a recommended product and version. My initial leanings are towards
    Oracle JInitiator 1.3.1.25(2) (Win32(1), based on JDK 1.3.x)

    Hi Aram,
    How to find whether the oracle applications 11.5.10.2 is making use of oracle jinit or using JRE pluginPlease see
    Script to find Apache, Java, Jinitiator, Forms version and JVM details for Oracle E-Business Suite 11i [ID 466890.1]
    my jinit version 1.3 .If i upgrage jinit to jre plugin as like jinit download on clinet machine ,the same jre will also get >automatically downloaded to client machine from oracle apps yES.
    That is why in step 2.2.1 OF doc 290807.1, we copy the .exe file to $COMM_TOP/util/jinitiator. So that the execuable can be downloaded from the server.
    What is ATG in oracle applications and how its usedful in oracle apps?ATG -> Applcation Technology Group.
    The oracle applications technical modules are maintained by ATG.
    Application Technology Group (ATG) Newsletter - Issue April, 2011 Volume 13 [ID 1310067.1]
    Thanks

  • How to find JRE Version on client machine

    My client machine does not have any class file, they are running web pages on web Browser.
    We have some specific plug-in based on JRE Versions (e.g. JRE 5 or JRE 6).
    Also we do not have permission to run an applet on client machine as it�s a security concern.
    We have following senerio
    Application server on Machine-1
    Web Server on Machine-2
    Client on Machine-3
    We need JRE version of Machine-3.
    Please provide me a solution.
    Thanks in advanced.

    Old post but replying anyways so that the solution can be used for later
    For Firefox/Mozilla/Netscape this can be done through javascript like below
         for (i=0; i<navigator.plugins.length; i++) {
         document.write(navigator.plugins.name);
         document.write("::::");
         document.write(navigator.plugins[i].filename);
         document.write("::::");
         document.write(navigator.plugins[i].description);
         document.write("<p>");
    It prints out "Java Plug-in::::NPJava12.dll::::Java Plug-in 1.4.1_02 for Netscape Navigator (DLL Helper)"
    from which the plug-in version can be found out
    For IE :
         try{
              var obj= new ActiveXObject("WScript.Shell");
              if (obj!= null) {
    //Version for the installed JRE          
    var ver = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java\ Runtime\ Environment\\CurrentVersion");
              alert(ver);
         }catch(e){}

  • J2EE and related J2SE/JRE versions

    I understand the difference between J2EE and J2SE/SDK/JDK, and JRE. However, I'm having trouble identifying what version of SDK each of the J2EE versions uses. Maybe they match up.
    For example, if I have an old project someone says was built with J2EE 1.3 SDK, does that use J2SE/JRE 1.3? Does Java EE 5 use Java 1.5? 1.6? 1.4? (For example, if I'm setting Eclipse Compiler Compliance Level for a J2EE 1.3 project, what should it be?)

    is there a way for me to know what Java version that would have been or could have been compiled against?No.
    Edit: Slight clarification - the class files in the application contain a magic number that corresponds with the compiler target - so for any given class file you can determine what JRE was targeted at compile time. This can be different from the compiler version. Different classes in the same application may have been targeted to different JRE versions.
    Are there any versions of Java that it could not be compiled against?No.
    what version of Java does the Application Server on which this will be deployed support.The Application Server will be running on a JRE corresponding to a particular Java release. That JRE will support all versions of Java prior to the release. Code compiled on subsequent versions of Java can, if suitably written, be targeted to run on that version of the JRE and (depending on versions) may not need specific targeting to do so. Whether they in fact work or not depends entirely on what library calls they make.
    What's the business requirement that drives this request?
    Edited by: dcminter on 03-Mar-2010 18:54

Maybe you are looking for

  • Creating XML files with the DME

    Hi All, I'm working on an integration project between my company and HSBC, they are requesting that we supply our AP payment files for foreign currency in XML format. I have some limited experience with the DME and know it can create XML files, howev

  • I can´t update my devices apple from company

    I install manually iTunes to my corporate computer last month, and works perfect, syncronize, update and all fine and 100%. So this week in my company distribute the iTunes automatically.... and the sttop this possibility, I don´t how do this, when I

  • Music files stored in two different folders

    Most of my music files are located in the folder I named for my iTunes library. Others are in a Music folder which is a subfolder of the iTunes Media folder. I'm not sure how this happened, but it seems to have happened after a backup. All the new ad

  • Iphone 3G - cannot access the bottom of the mail,Contact etc. Settings pane

    When I go to the pane I can set all my mail accounts etc but if I try to scroll down to the bottom of that page where I can set the sorting order of the contacts the iphone freezes and takes me back to the home screen. I have done a total 2 hour rese

  • When will there be an update for OpenCL support on the HD4000?

    Quite frustrating that even the the hardware supports OpenCL, it is not supported by the OS.  When can we expect an update to fix this?