File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Is this even possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Is this even possible?" Watch "Is this even possible?" New topic
Author

Is this even possible?

steven jackson
Greenhorn

Joined: Sep 18, 2007
Posts: 4
Hi, I'm in a bit of a dilemma. I'm working on a school related project where a client wants to stream some data from a logging device. The problem is the device comes with software that is closed (non-open source), but it is made with java

I need to somehow interact with the device and tell it to send data every at regular intervals. Is there a way to "tap" into the closed software program that the school paid for (has no public API or anything). I seriously have no idea how I would program something to talk to the device that's way beyond my skill level.

Is any of this even possible. Do people make programs that can automate other programs that have no available API or anything? I would really appreciate some input on this matter.
[ September 18, 2007: Message edited by: Bear Bibeault ]
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
This is a very common dilemma, and the answer is that the supplier/vendor/coder of the whatever it is has to provide some sort of hook, entry, interface or otherwise make the program available in the manner you desire.

It is a common, and sometimes tricky and hot question.

With some skill, you may be able to write whatever it is you are trying to hook into with your own java code. My favorite approach is to take some problem description, program behaviour description and start writing and designing a program that will do that.

If your concept connects to a remote database, others will be the one to help you.

Can / will you provide some generic description of what the program is already doing ?

Do not mention any business names or brand names, just what the program does.


"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
steven jackson
Greenhorn

Joined: Sep 18, 2007
Posts: 4
Thank you for replying, I honestly didn't expect such a high quality answer, thank you for that. The software I want to control or access with my own software controls a data logger that records temperatures every x minutes.

Currently, the only way to get a reading from that data logger requires you to perform a series of actions with their software to download the latest readings from the logger (Ex Menu -> Get Readings). If I could somehow create a program that could automatically call the logger and get it's data at intervals, I would be a happy camper

Like I said I'm completely clueless as to where to start.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3169
    
  10
The Robot class allows you to mimic mouse movements and key presses. Could you use this to run the required menu option ?


Joanne
steven jackson
Greenhorn

Joined: Sep 18, 2007
Posts: 4
Hi Joanne, that is a really cool API thanks for sharing. I thought it would work, but the program initially outputs data in a proprietary format that looks like a couple of squares if you open it up in notepad. After the readout I would need to export the data as well, to a csv format, so I could make a program that uses that data.

Is there anyway I could tap into the program while it is running? I have been researching a bit and I found something about communicating with the USB port, and getting data directly from the device, do you guys think that could work?

I'm also trying to find some threads on this topic, but I don't know any good search terms to use, except my own that produce nothing. I really want to try and make this work, any help is appreciated, thank you.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

Forget about hacking into the program. That is not likely to work. Anyway, you already have got it to produce some output. Why not just write something to take that output and reformat it the way you need it? Since that output is a standard product of the software, its format should be documented somewhere.
steven jackson
Greenhorn

Joined: Sep 18, 2007
Posts: 4
The program outputs files in some custom file format. I'm interested in some of the techniques Nicholas referred to in the first reply, I just want to figure out all my options before I commit to an implementation.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

Well, let's see. Hacking an undocumented program using techniques you know nothing about, which may not even be practical. Or converting a documented file format into another documented file format. Those are your options, it seems to me. I know which one I would choose.
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
Originally posted by steven jackson:
The program outputs files in some custom file format. I'm interested in some of the techniques Nicholas referred to in the first reply, I just want to figure out all my options before I commit to an implementation.


[steven jackson:]I really want to try and make this work, any help is appreciated, thank you.

Lookup Basic Stamp and Microchip PIC Projects .

It's a mess trying to go about it the way you are trying to go about it.

Simple temperature sensors, and a data logger written in Java are standard projects in the Basic Stamp community and there is a distinct isolation from some syrup issues that make it nasty to try to deal with this in a direct manner.

You can also consider text reading tools that are available in standard java, some of the masters we have here will be better qualified to help you with those.

They are all in java.io in your source directory, and you need to look for getline or readline or whatever it is called in java - along with getting a fundamental grasp of byte/char conversions that are done by thoses tools.

A program that could automatically call the logger and get it's data at intervals, if written by you, could be shared with others in a school environment that want to do the same thing.

Instead of trying to understand something the vendor is trying to protect, just "compete" with them .... that is what Open Source is all about.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this even possible?
 
Similar Threads
Mobile contacts Reading and Storing
Accessing a local file
JMF : How to capture videos
MS or MBA worthwhile? Advice appreciated
Project Idea