Is there any way to detect if there 's an JRE installed on customer machine

I want to know if the customer has the JRE installed to make sure that my program can run.So the problem come,how can I know that.Someone told me to use
a command like "java -version",which seemed reasonable.In that way,i should write a bat file do that.This file will detect if there is an JRE installed,if there is get the version of the JRE and compare with the available JRE of my program,but if not,connect to the offical site to download.It is really hard for me to do that bat file.I am just a new programer without any experience.So I really appreciate if someone give me some advice.Sorry,my english is so bad.I am waithing for the help.

scphan wrote:
masijade. wrote:
P.S. @OP, java -version will only work if the path is set correctly, of course, and what it returns will not, necessarily, be the highest version installed on the system, just the particular version that the path points to first.>This works in versions 1.1 and up:
public class FindVersion
     public static void main( String args[] )
          String prop = System.getProperty( "java.version" );
          System.out.println( prop );
import java.io.*;
public class ReadVersion
     public static void main( String args[] )
          try
               Process proc = Runtime.getRuntime().exec( "java FindVersion" );
               BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream()));
               String line = in.readLine();
               System.out.println( "java.version="+line );
          catch ( IOException e )
               e.printStackTrace();
Yes, of course that does, when Java is already installed, of course. The question here was how to determine if it is installed, at all. And, that will also only give you the version of the Java currently being used, of course, and not, as I pointed out in that quoted post, not necessarily the highest version installed on the system.
Please make your posts applicable.

Similar Messages

  • Any way to detect when a NotificationListeners MBean is removed?

    If I have an MBeanServerConnection through which I register a NotificationListener, is there any way to detect when either the MBean that the NL is registered for is removed or destroyed?
    Specifically, I fire up a process, register an MBean.
    A client connects to the process, and registers a NotificationListener.
    Finally, I destroy the original process. How can I be notified that this has happened in my NotificationListener Client?
    Is there something else I can use to monitor the JMX connection?

    It sounds as if you are looking for a notification when an MBean is unregistered. To get that, you need to register a listener on the MBean Server Delegate. See MBeanServerDelegate and MBeanServerNotification.
    Regards,
    Éamonn McManus -- JMX Spec Lead -- [http://weblogs.java.net/blog/emcmanus]

  • Any way to back up FAT formatted external hard drive to Time Machine?

    I'm a photographer, and right now my library of photos is a complete mess. I have about 20 GB of photos on one external hard drive and about 30 GB on my Mac's built in hard drive. I recently purchased a new external hard drive to use with Time Machine. I was under the impression that I could back up everything on my first external hard drive to my new external hard drive. Little did I know, because my first external hard drive is FAT formatted, I cannot back it up to the Time Machine hard drive.
    So my main question is this: is there any way to back up this FAT hard drive to my Time Machine hard drive? If I can't use Time Machine, do you have any other recommendations for backing up my entire photo library?
    Thank you for your help!

    A TM backup drive should be used just for TM backups. Buy another drive to use for your photo library. You can then use other backup utilities to keep it current such as:
    Backup Software Recommendations
    1. Retrospect Desktop (Commercial)
    2. Synchronize! Pro X (Commercial)
    3. Synk (Backup, Standard, or Pro)
    4. Deja Vu (Shareware)
    5. Carbon Copy Cloner (Donationware)
    6. SuperDuper! (Commercial)
    7. Intego Personal Backup (Commercial)
    8. Data Backup (Commercial)
    9. SilverKeeper 2.0 (Freeware)
    10. MimMac (Commercial)
    11. Tri-Backup (Commercial)
    12. SyncTwoFolders (Freeware)
    Others may be found at VersionTracker or MacUpdate.
    Visit The XLab FAQs and read the FAQ on backup and restore. Also read How to Back Up and Restore Your Files.
    Message was edited by: Kappy

  • Is there any way to detect commited deleted record in a table?

    Hi All,
    Is there any way to find out commited deleted record in a table without using triggers?
    Thanks,

    If you want to get back the deleted records and you are using 10g or above than Flashback technology can get that for you.
    If you want to find out the commands that did the work and you are not using 10g than as suggested, Auditing and LogMiner can be the option.
    Aman....

  • Recently my ipad and iphone 5S were stolen - is there any way to track them if İ had not yet installed find my iphone?

    My ipad Air and ıiphone 5S were recentşy stolen from my apartment.  They are relaticely new and I had not had a chance to install the Find my iphone app.  HOwever it is in my cloud from my last iphone.  İs there any way to track these two devices?  İs there a standard GPS locator on the newer models?
    Thank you for your time!

    If you did not activate Find my iPhone when you set up the iPad/iPhone, there is no way of tracking them. Having installed the Find my Phone app is not necessary and it is irrelevant as that app is for tracking other lost iDevices.
    Log in to your iCloud account via the iCloud website. Do you see the stolen devices? Do the show up on the device list? If so, the Find my Phone is active and you will be able to track them if they connect to the internet. If not, they are gone.

  • Any way to detect RTMFPP2PDisable

    I have spent one week to find a send data problem and finally find that the user set RTMFPP2PDisable to 1.
    That user can connect to my rtmfp server but cannot send any data.
    Is there any api to detect that RTMFPP2PDisable is 1 and tell the user to enable it?

    hi,I also Encounter this problem, I manually RTMFPP2PDisable = 0, still can't solve this problem, reinstall flash also cannot solve

  • Any way to do this? Windows program without installing windows.

    I got Adobe Premier Pro last year after winning a local film competition. I got a PC version because my best computer at the time was a PC. Now I have a Macbook pro and would really like to do my editing on it. I know I could install XP on the Mac with bootcamp but I don't really want to. I was wondering if there was anyway of somehow getting the PC version to work. Possibly emulating it somehow. I don't really have the money to buy XP anyway and I'm moving away to college with only the macbook. I have no desire to go back to imovie. Is there any way to get Primeire Pro to work with out having XP?
    Macbook Pro 17 in.   Mac OS X (10.4.7)  

    Not yet, but I think some 3rd party developers are working on a solution similar to WINE (on Linux) that would allow Windows programs to boot up in a Mac environment.

  • Working on Win 8.1, Downloaded PSE 13, installed, and it asks me for login every time I start the software. Any way around this? I want to use PSE on a machine that will be permanently offline.

    Any way around this? I want to use PSE 13 on a workstation that will be permanently offline. I spent hours with Adobe support and they suggested deleting a file called
    opm.db in the following location
    [System drive]:\Users\[user name]\AppData\Local\Adobe\OOBE
    and then rename the oobe folder to new oobe folder
    But then our chat session automatically terminated and that's as far as I got.
    Will this work?
    Will I still have full functionality?
    Can someone help?  Thanks!
    Desperate in Denver PA

    hello, when this is happening after you've already updated firefox with your admin account, try to delete the ''updates'' folder and ''active-update.xml & updates.xml'' within the %localappdata% folder of your restricted account like it is described in http://kb.mozillazine.org/Software_Update#Software_Update_not_working_properly

  • Is there any way to detect the iphone is rebooting currently?

    I am developing an app in which i want to call an API before device(iPhone) reboot.

    If you're a registered developer, you will find a faster and more accurate response in the NDA'd private forums at developer.apple.com. Else you might try the general developer forum here on the ASC, although the threads I've seen there are more oriented to OS X.

  • Is there any way to get a list of the apps installed on my phone through MyVerizon?

    I am going to be upgrading in a few days, and I want to obtain a list of all the apps I have installed, so that I can cull out the ones I don't use much or at all.
    Is there a list on the MyVerizon website anywhere of what's installed on my phone??

    If you have an android phone, you can log into your Gmail account on the Play Store website and see which applications are installed and downloaded at one time. You can also see the same installed list in the Play Store app on the phone.

  • HT1338 my old mac cant connect to internet and my migration assistant needs an upgrade is there any way to download to my new mac and install the upgrade on my old one so i can complete the migration process?

    I just purchase a new IMac, I am trying to use migration assistant. the problem I am having is my old mac cannot connect to the internet and it needs a software update, can I download the update on my new mac and install it somehow on my old mac?

    If it's a free update, search Apple's support site for it and move the dmg as you would any file. If it's a paid upgrade, no; the Mac App Store upgrades, while downloadable, can't be downloaded from a Mac which can't use them.
    (78632)

  • Is There Any Way Under Heaven to Prevent Kit-Kat from Installing?

    I've already had my phone screwed up enough.  Tonight the stupid Kit-Kat downloaded to my Galaxy S3, and I'm getting those annoying pop-up dialogues asking me when I want to start the install.
    I don't WANT to start the install.  After reading so many problems here, especially the battery charging issues, I don't understand why this update continues to be pushed on those that have not already been stuck with it.
    Please!  ANYONE!  Tell me how to get this out of my phone.  I am looking for new phone, though I shouldn't have to, but it's going to be a couple of months before I can do it.  I'm only one year into a 2-year contract so I'm having to pay out of pocket for the new one.  I've already spent a ton of money on portable power packs, extra batteries, extra chargers.
    These things are money-pits, plain and simple.  And making people tear their hair out.  For Pete's sake, leave us alone!

    bubblemaker  Elector
    Try this...
    Application Manager-All-Google Services Framework-Uncheck Show Notifications
    That at least stopped the annoying popups that just WAIT for you to get through your lock-screen, then jump in before you can hit another app, forcing the install.
    I don't know if this will hold it off forever, but my daughter has been able to avoid the 4.3 update since last December.
    The Android icon will appear in your notification bar, but it will remain quiet.
    EDITED TO UPDATE:  Well, no, it isn't working after all.  All is lost and our phones are doomed.

  • Udf mapping: any way to detect last processed record?

    Hi !
    I need to detect inside my java user defined function, in the graphical mapping, if I am processing the last record of my input message, for example to add a trace message about how many records were processed, etc....I know I can detect the first one by mapping a function to the root node...and how about the last one ? are there any internal mapping variables available to recall inside a udf ?
    thanks,
    Matias

    Hi,
    one way would be to use a UDF of type queue
    which will store all values from your message
    this way you can get a total number of records
    if you have the total then you know which one is the last one...
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Any way to detect key loggers?

    I have reason to believe that a keylogger was installed on my computer over the network maliciously. How would i find it if it was installed on computer? The mac keyloggers that I looked at all run in "invisible" mode (and can be put in any folder on the computer and will work)

    What sort of network are you connected to: LAN, Corporate network, etc.?
    As for a keylogger, if you're not connected to a network that manages your Mac, there'd be no way for anyone to install anything without Admin access, and only you should have that. So unless you aren't the Admin or leave yourself logged in all the time, this shouldn't be any concern.
    If you want to look for a keylogger, you'd have to open Activity Monitor and look through all the running processes to see if there is one running. Then you could Force Quit it, and find it on your system and delete it.
    Mulder

  • Some apps require Adobe Flash; however, when I try to inst all, get message saying my iPad (version 7.0) can't support Adobe Flash, so can't access. Any way around this?en I attempt to install, get message that my iPad cannot support such.  I have a

    Some apps require Adobe Flash; however, when I attempt to upload the program, I receive message to the effect that my iPad (version 7.0)  cannot support Adobe Flash, so I am unable to view some attachments sent.  I just bought my iPad recently and am still figuring everything out. If there is some solution to my problem, I would appreciate being advised. Thanks.

    https://discussions.apple.com/thread/5461191?tstart=0

Maybe you are looking for

  • Windows 7 Driver fro HP All-in-One - 20-2210x

    Hi everyone,  is there any way to download driver for Windows 7 x64 on  HP All in one 20-2210x. As on their website its only supported by Windows 8: http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4158&lc=en&cc=us&dlc=en&sw_lang=&product=7308.

  • Slider bar is missing at the top of iTunes.

    Slider bar is missing at the top of iTunes. Not sure how to get it back into view. Not sure if this has been answered. First time posting on here and very new to Apple software, Macbook that is. Iphones and Ipads i've got covered. Thanks

  • Syntax error but I'm too blind to see...

    Using the below SQL from my usrStartFrm.ASP page to ORA 8i I have set a page variable = a session variable +++++++++++++++++++++++ dim usrLoginID SUB usrStartFrm_onenter()      usrLoginID = Session("LoginID") End SUB +++++++++++++++++++++++++ But I c

  • Is there a way i can prevent my hp 6600 to stop disconnecting from wifi?

     I have  do the setup wireless wizard everday.

  • Doubt on bw

    hi friends, i want to know about the production support issues like how we are going to do in realtime,what are the errors we faced,how we work in production support what is tickets pls send me some documents or post ans [email protected] thanks in a