• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Development of a tool

 
Sivapraveen Chandana
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Mono that would be Linux, Solaris, Mac OS X, Windows, and Unix
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://poi.apache.org/ is an Apache API for interacting with MS Office docs

Cheers,
Martijn
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 12098
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic