Solved

Can Java be used to write OLE Automation clients?

Posted on 2009-04-01
2
727 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now