Solved

Can Java be used to write OLE Automation clients?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

914 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