This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java code to do task on other application

 
Ravisankar Jegadeesan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a java program to do a set of tasks between applications. For example in excel i have a list of record IDs, i need to open those records in another application (3rd party application, which i don't know the API). And I need to retrieve record title, time etc... I need to save those data into excel. I heard about Robot class in java. But the problem is if i open a record i may take 10 seconds or 2 minutes. So the java program should wait until it opens the record. Also I don't know how to make the 3rd party application as active window.

Please help in this...

Thanks in advance Ravi
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Controlling other executables is easier in the OS's native scripting language - AppleScript on OS X or Windows PowerShell on Windows. You can invoke scripts written in those languages from Java code via Runtime.exec or the ProcessBuilder class.
 
Ravisankar Jegadeesan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer

It seems I need to install Powershell in my system. Unfortunately i don't have privileges to install this. I am able to build a Java programm and run it.
Is there any way in Java?

Thanks in advance
Ravi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic