Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Eclipse Luna with JDK ?

Options
  • 10-10-2014 10:00am
    #1
    Registered Users Posts: 2,475 ✭✭✭


    Hey Peps,

    I'm a recent graduate in Comp Sci and I've recently started a job on a helpdesk role. Part of my morning routine is check some log files on a server.
    One log file has over 9000 entry's that are updated every night, so as you can imagine its a bit of a pain to do this check.
    I was thinking I could write a simple java program to do a read file and print out any errors for me.
    I'm pretty confidant that I can manage this.
    So my question is before I download JDK does the new Eclipse Luna come with JDK or do I have download and run JDK first then run and install Eclipse Luna.
    As you might guess I'm not a developer so I'm sorry if this seems a basic question.


Comments

  • Registered Users Posts: 403 ✭✭counterpointaud


    Is this a Linux environment ?

    You may find shell scripts or commands more appropriate than Java for this type of task.

    i.e.
    grep --include=\*.{err,out,log,txt} -rnw '/path/to/logs/' -e "Error" 2>/dev/null
    


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    This might be worth checking out: https://code.google.com/p/otroslogviewer/


  • Registered Users Posts: 2,475 ✭✭✭bennyineire


    Hey guys thanks for your reply's, these seem like much better ideas

    @counterpointaud , nope this is on a windows machine, is there a power-shell equivalent

    @Itzy , this looks interesting will check it out


  • Registered Users Posts: 2,475 ✭✭✭bennyineire


    Itzy wrote: »
    This might be worth checking out: https://code.google.com/p/otroslogviewer/

    Does this require me to install JDK


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    I could be wrong, but I think the JRE should be fine.


  • Advertisement
  • Registered Users Posts: 2,475 ✭✭✭bennyineire


    Sure no harm in trying, I'll give it a whirl after lunch and report back


  • Registered Users Posts: 403 ✭✭counterpointaud


    Hey guys thanks for your reply's, these seem like much better ideas

    @counterpointaud , nope this is on a windows machine, is there a power-shell equivalent


    Something like:
    Get-ChildItem C:\path\to\file -Filter *.log -Recurse | Select-String "Error"
    

    Not sure how to redirect to a file, or suppress file permission errors in Powershell. Handy when there is only likely to be few errors, but many log files in the same dir.


  • Registered Users Posts: 586 ✭✭✭Aswerty


    If you don't want to use Power Shell you could use Cygwin. Cygwin provides Windows with functionality common to most Linux distributions. It runs as a command line shell similar to Bash, etc. Packages you might want for Cygwin, for your use case, include grep and gawk. The project website is cygwin.com.

    I'd agree with the others that for your use case you'd be better of using scripts or shell commands than building an application to process the logs.


  • Registered Users Posts: 2,475 ✭✭✭bennyineire


    Something like:
    Get-ChildItem C:\path\to\file -Filter *.log -Recurse | Select-String "Error"
    
    Not sure how to redirect to a file, or suppress file permission errors in Powershell. Handy when there is only likely to be few errors, but many log files in the same dir.

    Thanks man this worked a treat, took me a while to get powershell to behave the way I wanted (i.e. to permit scripts to run) but got there in the end.

    This will save me about 15 mins in the morning of looking at them fecking log files.

    Yeah I learnt something useful today :P


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    See if you can run it as an automated task, so it could be ready and waiting in the morning when you arrive.


  • Advertisement
  • Registered Users Posts: 2,475 ✭✭✭bennyineire


    Even better, **** man at this rate the robots really will take over


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    http://www.irishtimes.com/culture/is-artificial-intelligence-the-greatest-threat-to-humankind-1.1909630
    The idea of computers taking over the world has long been with us in science fiction. But now serious thinkers are saying it’s not a matter of if, but when. The physicist Stephen Hawking recently joined other scientists in warning about complacency over the rise of artificial intelligence.


Advertisement