How to properly find paths of applications running on Windows (or other OSs

Hello all -
I am writing a Java desktop application that retrieves a string from a text field, and then uses the string to launch firefox with the google URL containing that search string. The way I start firefox from within the application is that I hard-code the path as follows:
private String firefoxPath = "C:\\Program Files\\Mozilla Firefox\\firefox ";
This is unreliable of course since the above path is only a default installation. Is there a way that I can dynamically determine the path of firefox (or any other installed application in fact) from within a running Java program?
Thank you.

drMohsenMadi wrote:
Generally speaking however, is there a way one locates the path of a running process from within a Java program?Nope, not without using JNI + some native code.

Similar Messages

  • How can I find out what is running in the background and running my batterie down

    How can I find out what is running in the background

    Hi simpbarby,
    Welcome to the Support Communities!
    The links below will help you understand what apps are running on your iPhone.  You can quit the ones that you aren't using.
    iOS: Understanding multitasking
    http://support.apple.com/kb/ht4211
    This link will provides tips to conserving battery life:
    Apple - Batteries - iPhone
    http://www.apple.com/batteries/iphone.html
    Optimize Your Settings
    Depending on how they are set, a few features may decrease your iPhone battery life. The tips below apply to an iPhone running iOS 7.0 or later.
    Enable Wi-Fi: Having Wi-Fi enabled helps consume less power when doing activities that access data. Go to Settings > Wi-Fi and log in to a Wi-Fi network.
    Adjust brightness: Dim the screen or turn on Auto-Brightness to extend battery life. Turning on Auto-Brightness allows the screen to adjust based on lighting conditions.
    Fetch new data less frequently: The more frequently email or other data is fetched, the quicker your battery may drain. To fetch data manually: Go to Settings > Mail, Contacts, Calendars > Fetch New Data and tap Manually.
    Turn off push notifications: Apps with Push Notification alert you of new data, which may impact battery life. To disable, go to Settings > Notifications, choose the app you want to disable, and do the following:
    Change Alert Style to None.
    Turn Badge App Icon off.
    Turn Sounds off.
    Note: New data will be received when you open the app.
    Minimize use of location services: Apps that actively use location services, such as Maps, may reduce battery life. You can see which applications have recently used location services by going to Settings > Privacy > Location Services.
    Use Airplane Mode in low- or no-coverage areas: Your iPhone always tries to maintain a connection with the cellular network, which may use more power in low- or no-coverage areas. Turn on Airplane Mode to increase battery life in these situations.
    Viewing Usage StatisticsKnowing and understanding your iPhone usage can help you better manage your battery life. To view your iPhone usage statistics, go to Settings > General > Usage. Under “Time since last full charge”:
    Usage: Amount of time iPhone has been awake and in use since the last full charge. iPhone is awake when you’re on a call, using email, listening to music, browsing the web, or sending and receiving text messages, or during certain background tasks such as auto-checking email.
    Standby: Amount of time iPhone has been powered on since its last full charge, including the time the phone has been asleep.
    I hope this information helps ....
    Have a great day!
    - Judy

  • How can we find out which application is runing UDP port 69?

    Whenever I run Cisco Network Assistant on my Windows 7 computer, I receive "The embedded TFTP server cannot start".
     netstat -an|more shows “udp 0 0 0.0.0.0:69 ...” How can we find out which application is runing UDP port 69?
    Bob Lin, MCSE & CNE Networking, Internet, Routing, VPN Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com

    These ones may help.
    Have you ever wanted to see which Windows
    process sends a certain packet out to network?
    Process
    Monitor v3.1
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to use "Find my iPhone" application ?

    How to use "Find my iPhone" application ?

    Find My Phone would have had to be activated/turned on before your phone was lost/stolen.. There is no way to do that now, thus no way to use such to locate your phone. Had you done so, you would login to iCloud.com from any computer & see if you could locate your phone.

  • Application Runs Under Windows 8.1 But Not Under Windows XP (I Know XP Is Deprecated)

    The problem is with the obtuse error message put out by Windows's program loader. It reads, in part, "..is not a valid Win32 application." The application runs everywhere except on Windows XP. Looking for root cause of the problem. It's a very
    simple application. Only a few lines of code. 
    C:\Packaged-Software\32-BIT\Reboot.exe is not a valid Win32 application.
    Proposed nature of the problem:
    1. The file was downloaded from a website but the download was incomplete.
    2. The full file system filename path contains bad characters such blank space.
    3. Visual Studio constructed an application that won't run anywhere much less on XP.
    4. The supporting libraries are not properly installed (e.g. .NET Framework4, and VCREDIST).
    Retorts:
    1. The file wasn't downloaded from a website and is intact.
    2. The filename path doesn't contain any spaces.
    3. The application runs under Windows 8.1.  Also on Windows 7.
    4. The supporting libraries are properly installed.
    So, what's the problem?  One surely will not discover the root cause from "not a valid application."
    Body must be 4 to 60000 characters long.  I had put the code here.  It isn't 60000 character long.  But it validated as if there are more than 60000 characters.  Sorry for the incomplete submission due to website construction error.
    MARK D ROCKMAN

    Hi F7H2fw,
    How did you develop the application ?
    Here is a similar symptom and this may explain the issue somehow:
    Setup.exe is not a valid Win32 application
    http://blogs.msdn.com/b/vsnetsetup/archive/2012/10/16/setup-exe-is-not-a-valid-win32-application.aspx
    I suspect there is a compatibility issue here .
    Considering this is more likely a developing issue .It is recommended to ask for help from our MSDN Forum .They are more familiar with the developing issue .If it is possible ,please attach the code in that thread .Thanks for your understanding and cooperation.
    MSDN Forum
    https://social.msdn.microsoft.com/Forums/en-US/home
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How do I find out what applications are running in the background

    I have a 2008 iMac with 2GB memory.  How do I find out what programs are running in the background?  I am going to buy a new iMac before the end of the year to replace this one.  When I looked at Activity Monitor it shows 1.8Gb used but doesn't tell all the programs running.

    open activity monitor [if it doesnt launch click winders>Activity Monitor]. then it'll show all proceses

  • How do I find out which application is stealing focus?

    I'm having problems with my Macbook Pro in which my active window keeps deselecting every 5-10 seconds or so, which is making even typing this question extremely difficult.
    I have figured out from searching the web that it is because of an application stealing focus. However, in all the boards that say how to fix this problem, none of them actually tell you how to identify which application is the one stealing focus.
    The most information I could find was to go to Applications > Utilities > Activity Monitor
    and to look for which application is stealing the focus, but it doesn't say WHERE to look.
    Do I look at CPU? Number of threads? Real memory? What?
    Here are my specs:
    - Mac OS X version 10.6.8
    - Processor: 2.3 GHz Intel Core i5
    - Memory: 4 GB 1333 MHz DDR3
    (Let me know if you need any additional info about the system.)
    How do I figure out which application is the one stealing focus? (If you could write it in painfully simple instructions, that would be fantastic).
    Thank-you in advance to any helpful answers!
    -Carly

    First, quit all applications, close all windows and reboot the Mac. Hold down the Shift key prior to the startup chime until it finishes starting. This is called a Safe Boot and causes the system to load only its components, no third party stuff and do other housekeeping tasks. Will take AWHILE, be patient. Run ONE Apple app at a time and see if the issue persists. If it does not, then you will have determined the system is OK and the issue is caused by a third party app. Now reboot normally and see if the issue reasserts itself.  Try this and holler back.
    Note: running Safe Boot in day-to-day use is unadvisable cause many apps require the use of their extensions and won't work correctly, if at all.

  • How do you find out what application is generating a plist file in your preference folder?

    I have had two similar warnings come up in Drive Genius 3, a program that I use to manage my drives.  The warnings occur during a daily verification of preferences on my main drive, a 256GB SSD. 
    They state:
    "The preference file at '/Users/me/Library/Preferences/com.analogsolutions.Football.plist' may be corrupted."
    "The preference file at '/Users/me/Library/Preferences/org.machinedevelop.National.plist' may be corrupted."
    Per Drive Genius' advisement, "Corrupted files can cause appplication crashes and should be moved to the Trash." I delete the files, however they are regenerated each day. 
    Q: How do you figure out what application is generating a preference file?  And is there a way to tell if this is a OS generated preference file? 
    I have searched online and cannot find any information about either Analog Solutions or Machine Develop nor am I able to discern what these particular .plist files are for... 
    Q: Are these two .plist files truly potentially harmful?
    Thanks for the Help!
    iMac
    model iMac12,2
    3.4 GHz Intel Core i7
    8 GB 1333 MHz DDR3

    Hi Everyone, sorry for the late response.  I have been monitoring my Preferences Folder; every moment I am on my computer trying to catch what application/process generates these files.  I was hoping to try your suggestions, but oddly enough the offensive .plist files have not returned since the last time I deleted them about a week ago.... strange...
    In any case, I have responded to some of your suggestions and questions that I have information on:
    X423424X wrote: Ok, can you double click the .plist file?  If so it should attempt to launch the Property List Editor (in your Utilities folder).  That way you can look at stuff in the plist.  Maybe (hopefully) there's something in there that can shed some light on who is creating it.   If Property List Editor cannot open the file (some apps create files that have the .plist extension but don't actually create the proper XML format -- probably what ProSoft was alluding to) then try opening it with a text editor.
    The .plist file when opened in text editor contains a string of (what to me seems to be) an arbitrary list of numbers.
    Linc Davis wrote: Those files have been given obfuscated names so you won't know what created them. They must contain encrypted registration data for some third-party commercial software that you use.
    Yes, seems likely...
    Linc Davis wrote: It should be fairly easy to find out what application is creating them, if you really care. Move the files to the Desktop, then log out. Log back in while holding the shift key as you click the "Log In" button. That will prevent your login items from loading, among other things. Open your account preferences and launch the login items one at a time by double-clicking them in the list. After each one, check to see whether the files have been recreated.
    Ran through login, one by one, no luck in identifying the application(s). 
    X423424X wrote: Another thought, lock the plists on the hope that whatever is using them will "choke" and complain about it (no guarantee that will work but worth a try).
    Thanks, the lock idea is the one I will try next if they ever reappear...
    X423424X wrote: Also, I don't recall if I asked this but if those plists are deleted while logged in will they be recreated during that same login session.  Or do they only appear after you deleted them and then and then logged out and back in?  Or do you have to reboot to recreate them?
    Unfortunately I do not know for certain.  Though from all my login/startup/reboot tests I believe that they are not directly linked to starting up the machine or loging in either.
    I'm not really certain why the .plist have not returned.  I haven't uninstalled any programs, though I did run a couple updates for some widgets within the last week; however that was about 3 days after I deleted the last set of .plist files and usually they reappered everyday.  In any case, given that they have not been regenerated I guess my problem is solved per se, at least I am no longer getting that annoying warning everyday.   Still, it's a bit of a mystery  
    Thanks again for all the help!

  • How do I find out what application is  connected to my Nano (2nd Gen.)

    When I try to eject it it says "The iPod cannot be ejected because it contains files that are in use by another application."
    Does this happen to anybody else, and how do I find the other application so I can eject me iPod Nano (2nd Generation)?

    Are you playing a song in iTunes that listed in contents of iPod while it is connected. Try going to your music lib and play a song and disconnect your iPod.
    Also, make sure you are not located in some sub dir that utililizes iTunes.
    You can also hit 'ctrl,alt,delete' to see what applications are running on your PC.

  • BI 4.1 How to easily find which APS is running a particular service?

    I am trying to track down an error with BI4.1 version management (note 2008275)
    and the correction says
    "Ensure that only 1 APS server is defined with a "Lifecycle management service" and running across the entire cluster."
    This led me this question, how can you determine which APS is running a particular service without having to hunt and peck through every APS?
    I ran the 4.1 wizard and I have 20 APS.
    Just curious if there is a better way for future reference.
    Thanks
    Lee Lewis

    Hi Lee,
    The BI Platform Support Tool would be the most productive/easiest way find and compare APS services,
    See the wiki below:
    http://wiki.scn.sap.com/wiki/display/BOBJ/SAP+BI+Platform+Support+Tool
    ~Valdrin

  • How can I find out which applications depend on Rosetta?

    Before I upgrade, I need to find out which of my applications are still using Rosetta.
    How can I find these?
    Thanks.

    Open "System Profiler" and select "Applications". Then sort by "Kind".  Anything that requires Rosetta will be labelled as PowerPC.
    Cheers,
    Rodney

  • How do you shut off the applications running in the background of IOS7

    How do you shut off applications running in the background on IOS7

    http://ios.wonderhowto.com/how-to/completely-close-out-running-applications-ipho ne-ios-7-save-battery-0147375/

  • How do I find user/library/application support

    I want to back up my Yojimbo Database. BareBones tells me it is in the Application Support Folder in the User Library. How do I find the User/Library!

    The User (meaning your name)/Library is now hidden in 10.7+ so you need to use the Finder > Go and paste
    ~/Library
    and press enter, then open the Application Support folder.

  • How can I debug a web application running on Weblogic 10.3

    Hello,
    I have inherited a NetUI Web Application developed using Weblogic Workshop and I can't manage to debug it. I have configure my server in Workshop and to debug it I right-click the project in Project Exporer and select Debug As -> Debug On Server, but this isn't working. The browser does open the application doesn't appear to be getting delpoyed.
    Can anyone help me out? I am using Weblogic 10.3 and Java 1.6.
    Thanks,
    Sean

    Hi Kal,
    The application is an enterprise application packaged as an EAR. if I right click on the project and click Debug As -> Debug on Server, the application appears in the Server Tab, but it does not start automatically. If I then manually start the server the application runs, but it does not stop at break points and I can not debug it.
    If I right-click on the web project that is packaged as part of the ear and select Debug As -> Debug On Server again the application is deployed, but I can't debug it. I don't get error messages, the application functions as normal but it does not stop at break points. When I attempt to debug the application via the Web Project, two browsers open automatically, both correctly displaying the application.
    Regards,
    Sean

  • How can I keep my winform application running after logout

    Dear developers,
    I have an application that insert or update Data to an SQL server every 2, 3 hours.
    I can’t use the SQL server itself (creating a new job). Instead I defined a timer which executes the code every 3 hours.
     The application runs in the server - a winform application.
    And this is the problem, when I logoff the application is being closed…
    Is there a way to keep the application running? (same as Jobs)
    Tanks,
    Patric

    Uri's solution may work for you.
    The proper approach though is a SQL Server Agent job. It resides on SS, it gives you nice history.
    Talk with the responsible DBA?
    Kalman Toth, SQL Server & Business Intelligence Training; SQL SERVER GRAND SLAM

Maybe you are looking for