100% java way of determining system idle period?

I'm trying to determine if there's a 100% pure java method for determining a systems idle time.
If not, then I'll have to go with a platform specific method.

No such thing. Java doesn't interact with the system except in terms of itself. So it can tell you how much free space is left on the heap but not how much memory the java process is using nor how much free space the system has. And since the idle time is a system rather than a java attribute, java doesn't have it.

Similar Messages

  • Is there any way to determine if a link is a book mark or hyperlink in java script

    Is there any way to determine if a link is a book mark or hyperlink in java script
    Sub Problem:
    I am making an array of quads of all the hyperlinks in a document. I would like to automatically skip over all the bookmarks in the starting pages of a document and just get the links of the hyperlinks.
    Now I have to manually set the pages that contain bookmarks so they are not included in the array.
    Is there any way to determine if a link is a book mark or hyperlink in java script?
    It would help automate the conversion I need below
    John
    Main Problem:
    I have been working on converting a set of pdf files with 1000’s of hyperlinks like www.site.com\folder1\file1.pdf#page=10
    To jump to a local copy of the files with a relative type link
    ../folder1/file1.pdf and then go to the proper page.
    I have found that it can be done manually by changing the hyperlink to a javascript
    var otherDoc = app.openDoc('../folder1/file1.pdf', this);otherDoc.pageNum = 10 - 1;
    and setting each destination file with a disclose()=true;
    Based on the help so far that java script cannot access the hyperlink value in a link
    See: http://forums.adobe.com/thread/1039908?tstart=60
    I have resorted to the following plan using acrobat javascript, an external keyboard macro recorder and excel in combination to get around the problem
    Four folder level acrobat javascripts with “buttons”
    One to get all the link quads in an array, in the pdf and report the total number
    The second creates a form field in the far corner of the first page and moves there.
    The third jumps to each link found by creating a form field just to the left of the link and zooms in so it can be selected by a “mouse click” from the keyboard macro recorder 
    The forth deletes the form field
    The keyboard macro recorder runs javascript 2 and then 3 then clicks on the link just to the right of the middle of the screen and uses keys to get to the advanced editing to get to edit the hyperlink .
    The hyperlink is then copied to excel where it is converted using string functions to the needed javascript text to be copied back.
    To the acrobat file into a java script (after deleting the hyperlink)
    Rinse/lather/repeat
    I have been able to convert about 150 links an hour.
    Better then hand typing, but not like having java access to the links.
    I am looking to improve the solution

    thanks for your help.
    I may have been confusing a "acrobat bookmark" and a bookmark in a word file that is converted to a pdf and ends up being a
    link of the type:
    "Go to a page in this document"
    which I do not want in my array vs
    a link of the action type:
    "Open a web link"
    Which I do want
    John
    My code, note how I have to skip pages with "Go to a page in this document" links depending on the document, I would like to use the same code for each document and skip over the "Go to a page in this document" links :
    global.ilinkindex = 1; 
    global.aLinkquads = [ [0, 1, 1, 0, 0],
           [0, 0, 0, 0, 0] ];
    function GetLinkArray()
    global.ilinkindex = 1;
    var iTotalLinks=0;
    // for ( var p = 0; p < this.numPages - 8 ; p++)                   // end before bookmarks for each page of the file x.pdf
    //  for ( var p = 0; p < this.numPages; p++)                     // for each page of the file
    for ( var p = 23; p < this.numPages; p++)                     // start after bookmarks for each page of the file y.pdf
      var cropbox = this.getPageBox("Crop", p);
      var alinksonpage = this.getLinks(p, cropbox);            // get array of links on page
      for ( var ll = 0; ll < alinksonpage.length; ll++)
       var linkquads = alinksonpage[ll].rect;     // get link Quads
       linkquads[4] = p;          // add page number to link Quads array
        global.aLinkquads[global.ilinkindex] = linkquads; // add quads to global link Quads array
        global.ilinkindex++;
    iTotalLinks = global.aLinkquads.length - 1;
    global.ilinkindex = 1;
    app.alert("Number of Links in Document is " + iTotalLinks );

  • Is there a way to determine which rows are inserted in JDT1 table by the system automatically?

    Hi,
    Is there a way to determine which rows are inserted in JDT1 table by the system automatically? Example, many GLs which are mapped in GL Account Determination, like Foreign Exchange Gain / Loss, Rounding Account, etc. are inserted by the system automatically in the Journal Entry on various scenarios, like during Incoming Payment, etc.
    Which SQL query can give me those rows? Basically the WHERE condition should be based on which column or multiple columns in JDT1 table?
    Thanks.

    Hi Rajesh,
    I'm not entirely sure but I think the TransId is the same in the header that belongs to the transaction.
    OINV.TransId = JDT1.TransId
    Best regards,
    Pedro Magueija

  • Is there a way to determine exactly where a breakpoint occurs?

    Hello everyone:  I am having trouble getting my head around this problem I am having, so I'm hoping someone here has run into something like this and has a tip for me.
    I have a PXI-7354 that I am using to control a rotary stage which has an 8000 lpr encoder, and a 10:1 reduction gear, so I have 80,000 lpr effectively.
    I am using the 7354 to generate a Breakpoint Pulse every 100 encoder counts, so I should be getting 800 pulses per revolution.  (I use the breakpoint pulses to trigger a second device and aPXIe-5122 data acquisition card to synchronize the production and acquisition of a data record.)
    However, and here's the problem:
    When I rotate 1 revolution, I see 799 pulses
    When I rotate 2 revolutions, I see 1598 pulses
    When I rotate 3 revolutions, I see 2397 pulses
    etc. 
    I am losing 1 pulse per revolution. I haven't figured this out yet, as I am using periodic breakpoints with a whole number of breakpoints as a period.
    THe problem is that I "count" the number of breakpoint pulses that I get in order to derive the angular position where the breakpoint occurs.  For instance, if I start at 0 degrees, and I have 0.45 degree spacing between breakpoints, after 10 pulses, I should be at 4.05 degrees.  After 100 pulses, I should be at  44.55 degrees.
    As I am missing one count per rev, however, my derived angular position is incorrect.
    I need a way to determine the actual position of each breakpoint.  The most obvious way to do this is to use the HS capture functionality of the board, and I could (further) share the breakpoint pulse with the HS Capture input on the motion card to do HS capture, but is there any way to do this internally on the 7354?
    Thanks for looking at this, any help is appreciated.
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI
    Solved!
    Go to Solution.

    Thanks for your response, Matt.
    I have already got the BP signal going to my external device via a UMI-7774, so this is not a problem.  The tricky part of this question is whether there is an easy way to "share" the BP information with the HS Capture INPUT line so that I can grab a HS position when the BPs are generated, so that I'd have a buffer of ACTUAL position, rather than relying on the BPs being in the correct location (and DERIVING the instantaneous position of the BPs by counting the BPs).  It seems that it is NOT possible to share the signal by routing the BP1 Out simultaneously to the external UMI 7774 pin AND to either the HS Capture INPUT OR to my data acquisition card.  I know that I can route my encoder signal and other things to my DAQ card, but this won't help me in this case.  Furthermore, I can only have 1 BP per axis, so it isn't possible to replicate that functionality on a second BP generator.
    I am working on setting up a third device to count the pulses generated by the 7354 when I exercise the stage through motion, so I'll have more data later today.
    I'll post here any findings.
    Thanks again,
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI

  • Execute java programs automatically when system is connected to internet

    Good Day friends...
    Iam beginner in java. Please goes through the Question and please answer.
    I need to start my java programs automatically when system(windows operating-xp/7) is connected to the internet.
    Thanks in Advance,
    Shackir

    A. You might want to learn about Windows Services. Try searching for it on the web
    B. There is no way to programmatic detect if/when the local computer is connected to the internet, at least not in Java. The best you could do would be to create a timer and to periodically try to make your connection

  • Vendor agnostic way to determine you have a proxy.

    In the Java Persistence API is there a vendor agnostic way to determine that an object is an unitialized proxy? The only thing that seems to be consistent is that trying to access a property on the proxy will throw an exception. Can I determine ahead of time that an exception would be thrown?
    Thanks much.

    You might catch the Exception and have a look at it what it says. Maybe the proxy server is not the reason for the problem. Perhaps Yahoo does not like to be accessed in the way your application does.
    import java.net.*;
    import java.io.*;
    public class URLReader {
        public static void main(String[] args) {
            URL yahoo = new URL("http://www.yahoo.com/");
            BufferedReader in = null;
            try {
                in = new BufferedReader(new InputStreamReader
                                       (yahoo.openStream()) );
                String inputLine;
                while ((inputLine = in.readLine()) != null) {
                    System.out.println(inputLine);
            } catch (Exception e) {
                System.out.println(e.getMessage());
            } finally {
                in.close();

  • How to get system idle time

    Hello Sir,
    I am Udhaya. I don't know how to capture system idle time using java. Please any one help me how to get system idle time. Any class is available in java to get idle time?
    Thank in advance
    Udhaya

    jwenting wrote:
    DrLaszloJamf wrote:
    jwenting wrote:
    the moment you ask the system for its idle time that idle time becomes 0, so just returning a constant value of 0 would always yield the correct answer.But when you don't call this constant method the value it would return is wrong. This is the sort of thing that keeps me up at night.Except of course that when you don't call it it doesn't return it and therefore still behaves properly.
    Or were you thinking of philosphical problems like "what does a method do when it's not called?"?Actually I was trying to see if I could get the OP to say boo to a goose.

  • TRACK SYSTEM IDLE TIME

    Hii Guys,
    I am working on a client server architecture based project named "ATTENDANCE TRACKING SYSTEM".
    For this, I need a java program that can run in background(without any interface) and track system idle time on client machine.
    The idle time is the time elapsed since last key was pressed or since last time mouse was moved(whichever is later).
    So that, i can use the output of that program to track the idle time of the client machine.
    I searched a lot, but everywhere i found to use JNI. But i dont know anything yet about JNI.
    Please help me out...

    Prince_2188 wrote:
    Thanxx 4 ur reply Mr. Jschell
    But the problem here is that i will have to do it in JAVA, as i have been asked by Wipro Technologies to do it in JAVA.Probably not a good idea to name names.
    The requirement is stupid.
    And given that the requirement is not negotiable you might want to review the contract/requirements before going further. Because using JNI is not using java. So what makes you think that that doesn't break the contract?
    >
    On Internet, i found that doing this task purely in JAVA is not possible and i will have to do it using JNI and C++.
    But i dont know how to use JNI and moreover i could not find coding for the same on Internet.
    Secondly, i m not aware of the functions in Windows API that can help me out in this regard....
    Go to a windows site and ask about what API one would use to monitor idle time. Do NOT mention java. Just ask about the windows API.

  • System Idle process at Exchange server too high

    Hi there everyone,
    I am having an issue since a long period of time regarding the usage of CPU by system idle process at my exchange server 2010.I am hereby attaching the screenshots for more details.
    What might be the issue guys as per your experience?
    Regards,
    Sufiyan

    This one may help.
    http://blogs.technet.com/b/maliks/archive/2012/04/25/exchange-2010-store-exe-service-takes-high-memory-utilization.aspx
    or ask them more over here.
    https://social.technet.microsoft.com/Forums/exchange/en-US/home?forum=exchange2010
    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.

  • Determine system folder

    The point is: I need to get some *.dll. It stores in system folder (usually windows/system). But this folder can be installed on disk C:, D:, etc. Besides it some user can install windows not in "window" folder but in any folder he wants.
    Thus I want to determine system directory. Is it possible to do by means of java. And how it can be done - if possible.
    Thanks.

    So you want to say that it's impossible to determine
    from an applet users system folder?
    I'm not going to write anything to HDD. I just want to
    know where is system folder situated.An Applet cannot read or write files on the client system, without being signed and getting permissions to do so. Therefore, not only you can't get the name of Windows folder, even if you knew it, you had nothing to do with it.
    You can't get a list of files in a directory, you can't check for existense of a file, and you certainly can't open a file.
    - Noam.

  • Definite Way to Determine Patch Level / Patch Cluster Version?

    Operating System is Solaris 10 x86 09/10
    I need to know what is the official way to determine what was the latest patch cluster applied to the system.
    I have tried the following:
    uname -a
    showrev -p
    cat /etc/release
    They give me the Solaris version, patches applied, and kernel versions but they do not give me the name or version of the latest patch set/cluster applied.
    For example, I know that the patch set for 01/2013 was applied. How can I prove this? Is there a command that will display that?
    Is there another way to show the dates of the latest patches applied?
    Basically I need to be able to show a third-party that the system has been updated to a certain date. Right now I have a feeling that if they see 09/10 they will assume that is when the system was last updated.
    Thank you in advance.

    In $ORACLE_HOME/inventory/ContentsXML/comps.xml, all the information related to oneoffs installed is kept. Infact OPatch reads this infor and reports during lsinventory.
    But it is recommended to handle this file very carefully, if this file is damaged, then its almost that your home is gone, coz....no update can be done without proper inventory.

  • HT201364 Trying to upgrade to OS Maverick. Get message "this computer cannot be upgraded". Checked all tech specs, match requirements. Is there a way to determine what prevents instalation?

    Trying to upgrade to OS X Mavericks. Got message "this computer cannot be upgraded". Checked all tech specs, they match requirements. Is there a way to determine what prevents instalation?

    Check that your computer is compatible with Mountain Lion/Mavericks.
    To check the model number hold down the option/alt key, go to the Apple menu and select System Information.
    iMac (Mid 2007 or newer) model number 7,1 or higher
    MacBook (Late 2008 Aluminum, or Early 2009 or newer) model number 5,1 or higher
    MacBook Pro (Mid/Late 2007 or newer) model number 3,1 or higher
    MacBook Air (Late 2008 or newer) model number 2,1 or higher
    Mac mini (Early 2009 or newer) model number 3,1 or higher
    Mac Pro (Early 2008 or newer) model number 3,1 or higher
    Xserve (Early 2009) model number 3,1 or higher

  • HT4009 I'm in Subscription **** on the iPad.  Is there an App or faster way to determine current Magazine subscriptions?

    How can I easily be sure I don't already have a magazine subscription or a single issue in Newsstand (or Zinio) when confronted with a purchase option. Is there an App or faster way to determine this information?  Both Newsstand and Zenio have seen fit to "hide" this data deep in another App or menu, perhaps as a marketing tool to get you to buy multiple copies of the same magazine.  I travel for a living and buy and delete digital magazine all the time.  Sometimes, I buy them and am unable to download immediately due to slow WiFi or restrictions in airports, this adds to the confusion as what I have bought, deleted, or never downloaded, especially with multiple readers.  Additionally, the App store manages current subscriptions on one menu and single purchases in another.    I love reading on the new iPad, but the management of subscriptions has been an absolute nightmare.   Is there another Newstand App that is easier to use or perhaps a Subscription Management App?     

    Take a look here:
    http://support.apple.com/kb/HT4098
    Other than looking in the various locations or doing a search for the title, I don't know of any way to easily find single-issue purchases.
    Regards.

  • Is there a way to determine if an application is 32-bit or 64-bit?

    Is there a way to determine if an application is 32-bit or 64-bit? To be more specific, I want to be able to determine if a 32-bit application is being emulated under WOW64. I'm trying to use the Call Library Function and selecting IsWOW64Process from the Kernel32.dll, but I can't seem to get it to work. I think I may be setting it up wrong. I'm using a constructor node and invoke node for Process and after calling GetProcesses in the invoke node I'm sending that into a For Loop to inspect each process seperately. Inside the For Loop is where I'm trying to use the Call Library Function. From what I've read IsWOW64Process has a Handle as an input and a pointer to a boolean as an output. I may be incorrect in this as I've seen multiple varieties of this call on the internet. I've tried setting this up but I can't seem to get it to work. I'm looking for help on how to correctly use the Call Library Function or if anyone knows a better way to do this I'm open to suggestions. Thank you for any help. 
    Solved!
    Go to Solution.

    Hi klynn,
    I've got a link you might want to check out to make sure that your call function is correct.
    http://msdn.microsoft.com/en-us/library/ms684139%28v=vs.85%29.aspx
    I would also recommend that you check out DLL.VI example in example finder.
    Example Finder > Communicating with External Applications > Using External Code> Integrating DLLs > Call DLL.vi
    Hope this helps,
    Josh L.
    Applications Engineer
    National Instruments

  • Looking for a better way to determine string variable from multiple options

    Hi,
    I trying to figure out a better way to determine a string variable from multiple options.
    Say i have five pictures each with a different filename: img1 - img5...these file names could be named anything really but for this example i will keep them as img1, img2, img3, img4 and img5.
    I want to display a messagebox with the string depending on what a certain variable is.
    So for example, we have the number X, if X = 1 then i want the messagebox to show "img1" as the message
    Essentially the way I have been doing it so far is:
    Private Sub WhichImage()
    Dim ImageName As String = ""
    Dim i as integer
    If i = 0 Then
    ImageName = "img1"
    End If
    If i = 1 Then
    ImageName = "img2"
    End If
    If i = 2 Then
    ImageName = "img3"
    End If
    If i = 3 Then
    ImageName = "img4"
    End If
    If i = 4 Then
    ImageName = "img5"
    End If
    MessageBox.show(imagename, "Name of image", MsgBox.Style.OkOnly, MsgBoxResult.Ok)
    end
    Up until now, this has been fine, but what if I have 50 images, do I have to do this for all 50 images? or is there an easier way like putting the image names into a text file and have it read from the file depending on what the variable i equals? If so,
    how do I go about this? Does each image name go on a separate line? can it just be separated by a comma instead? or is there a better way?
    Please note that i know that i have declared "i" above in my code and not intialised it with anything, in reality "i" comes from somewhere else in the program so please ignore that part, it is not what I am concerned with.
    Thanks
    Mersec

    Does each image name go on a separate line? can it just be separated by a comma instead? or is there a better way?
    Arrays are useful for this.
    Dim imagenames() As String = {"img1", "img2", "img3", "img4", "img5"}
    Dim imagename As String = imagenames(i)
    MessageBox.Show(imagename, "Name of image")
    Any sort of collection will do instead of an array, and may be simpler to manage. There are many other options - the most suitable one probably depends on where the names originally come from.  For instance, if you are getting them from a folder
    using the FileSystem.GetFiles method, then they are already in a collection.
    If the files names never change then you may as well include them in the program code, using something like the code above.  If they can change, then you could use a text file, but that means you need a file update routine.  If that is required
    then the way you store the names will dictate how you access them.

Maybe you are looking for

  • Old name and password won't work when networking to new Win7PC.

    I have a name/password problem when trying to network a new Win 7 PC via a new Netgear 2200 Router to a MacMini. It networked 100% OK with the old XP System and old Netgear Router, but now when I click on the PC icon that shows up in Workgroup the ol

  • New to Pages, mail merge help needed

    OK, I tried to get some help a couple of days ago in the Numbers discussion pages but apparently the invoice I'm trying to create won't work. (At least, no one has replied to the other post.) So I've given up on trying to create a usable Invoice in N

  • Can I use Airport TimeCapsule's internal hard drive as a network-based backup solution for both windows and mac?

    Does the following scenario work??? :- A Windows PC is connected to Airport TimeCapsule (ATC) wifi. A Mac is connected to the ATC wifi. The Mac's Time Machine software is set up and automatically backs up to the internal HDD. The Mac can browse files

  • Cameras not recognized in FCP

    I am a HS film teacher and have nine cameras-various brands, all minidv tapes models. They have all worked at one time for capturing footage using the log and capture screen in FCP, but now ALL of them do not work. I have tried different computers ra

  • Iphone 5 screen brightness

    Hi . iPhone 5 does not decrease the brightness of my screen.help me please