Solved

Can Java be used to write OLE Automation clients?

Posted on 2009-04-01
2
752 Views
Last Modified: 2013-11-23
I.e. with Visual Basic I can write simple code like

Set objXLApp = CreateObject("Excel.Application")
objXLApp.Visible=True
objXLApp.Quit

or the like.  Can Java do this to?  If so, what would be equivalent Java code to the above?  And what would I need to compile and/or interpret the Java code (i.e. I'd need VB to compile it as an EXE or just write VBScript code and save it as a .vbs file - what would I need for Java?)

Thanks!!!!
DTXCF
0
Comment
Question by:DalTXColtsFan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Expert Comment

by:Thomas4019
ID: 24044640
java's Runtime class allows to you execute windows comands, Runtime.getRuntime().exec(). Or an even easier way is Desktop.open(File f).
0
 
LVL 4

Accepted Solution

by:
freer earned 125 total points
ID: 24044685
If you are happy to run only on Windows, there are OLE Automation libraries for Java. One comes with the free Eclipse SWT library see:

http://download.eclipse.org/eclipse/downloads/documentation/2.0/html/plugins/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/ole/win32/OleAutomation.html

It's more complex to use than VB though.

Tim
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iterator/ListIterator approach 17 68
sql import cannot be resolved jsp 3 116
Coding for the first time 9 100
Java pass by reference 3 74
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question