aspose file tools*
The moose likes Java in General and the fly likes Development of a tool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Development of a tool" Watch "Development of a tool" New topic
Author

Development of a tool

Sivapraveen Chandana
Greenhorn

Joined: Jan 01, 2008
Posts: 16
Hi everyone,
I am working in a software firm (less than 1 year experience) and I need to develop a tool/stand-alone application which needs to search some log files located in the file system of a server based on search strings taken as input from the user and then copy the data(length of it may vary) related to that search string and paste it into a word document.
I am planning to use Swings for designing the user interface.
The above is the basic outline of my requirement.

Please suggest what features of core Java I should be using to accomplish this. I have done SCJP and SCWCD but I am new to tool development.

Please share your advice.

Thanks in advance....

Praveen.


praveen
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by Sivapraveen Chandana:
Hi everyone,
I am working in a software firm (less than 1 year experience) and I need to develop a tool/stand-alone application which needs to search some log files located in the file system of a server based on search strings taken as input from the user and then copy the data(length of it may vary) related to that search string and paste it into a word document.
I am planning to use Swings for designing the user interface.
The above is the basic outline of my requirement.

Please suggest what features of core Java I should be using to accomplish this. I have done SCJP and SCWCD but I am new to tool development.

Please share your advice.

Thanks in advance....

Praveen.


You may want to look at _not_ using Java. A small .NET tool would probably be a better technology choice here.

If you have to stick with Java you'll want to look at the Regular Expression libraries in Java (JDK 1.5+) in order to parse the docs and get out the data that you want. Apache has a set of libraries that interact with MS Office APIs (so you can write to a Word doc).


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3645
    
  15
Originally posted by Martijn Verburg:
A small .NET tool would probably be a better technology choice here.


Only if he's working on a platform that supports .NET.


Joanne
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1768
    
    7

Using Mono that would be Linux, Solaris, Mac OS X, Windows, and Unix


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3645
    
  15
So it's probably a reasonable suggestion then

But if you have to install either Mono or a JRE, I need a bit more justification as to why a small .NET tool would probably be a better technology choice here.
[ August 22, 2008: Message edited by: Joanne Neal ]
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by Joanne Neal:
So it's probably a reasonable suggestion then

But if you have to install either Mono or a JRE, I need a bit more justification as to why a small .NET tool would probably be a better technology choice here.

[ August 22, 2008: Message edited by: Joanne Neal ]


Hi Joanne, yep it was pretty much on the assumption that he'd have a .NET runtime (since he's working with MS Word docs I thought it was a reasonable assumption). Although I normally evangelise the Java option , I've found the few times working with Office docs that it's easiest to use MS .NET APIs as opposed to other technologies, but YMMV
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3645
    
  15
Originally posted by Martijn Verburg:
since he's working with MS Word docs I thought it was a reasonable assumption


I must get my eyes tested. I read the original post twice to see if there was anything Windows specific about it before my original post and it's just taken me two more reads of it before I noticed he mentioned 'word documents'. If I'd noticed that originally I wouldn't have questioned your suggestion.

Can we have another entry in the 'How To Ask Questions' section, that suggests people make appropriate use of capital letters.
Sivapraveen Chandana
Greenhorn

Joined: Jan 01, 2008
Posts: 16
Thanks
Martijn, Joanne and Jelle for your suggestions.

I want to make my requirement more clear.

I need to search through *.log files located in the file system of a server. So, I need to make a connection to the server first. Then, after copying the data relevant to a particular search string taken as input from the user I need to paste it into a Microsoft WORD document(*.doc)
Hopefully, now you understand my requirement better.
Please suggest the APIs I must be using. For searching, I may use REGEX and for user interface, I may use SWINGS. But, what do I use for copying the data from *.log files and pasting it into Microsoft WORD document(*.doc) ? Also, please suggest if there is some easier way to do it(I mean, by using some other API than the ones I mentioned?

And, I need to use JAVA to develop this tool.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

http://poi.apache.org/ is an Apache API for interacting with MS Office docs

Cheers,
Martijn
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3645
    
  15
You'll probably find it useful to read the Java I/O tutorial. This will show you how to read and write from files and other sources.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11401
    
  16

Originally posted by Martijn Verburg:
since he's working with MS Word docs I thought it was a reasonable assumption

My wife has MS-Office installed on her Macintosh so that she can use Word documents...

I don't know that Macs support .NET


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by fred rosenberger:

My wife has MS-Office installed on her Macintosh so that she can use Word documents...

I don't know that Macs support .NET


Fair point, I'll extend my assumption to that he's not developing for and environment without .NET
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Development of a tool