?
Solved

Call Java Code from VBA

Posted on 2012-08-31
2
Medium Priority
?
3,921 Views
Last Modified: 2012-09-27
Hello Experts,

i would like to call functions from a java .CLASSor .JAR file from VBA.

One possibility is to use the bidirectional ComBridge ComfyJ (http://www.teamdev.com/comfyj),
which offers to register a COM server in the Windows Registry so that it can be used within VBA using the following code:

Sub Test()
Dim objTest As Object
Set objTest = CreateObject("jniwrapper.comtojavasample.1")
Debug.Print objTest.myJavaMethod()
objTest = Nothing
End Sub

Open in new window


The only problem with this aproach is the use of the registry. In case that the end-user does not have administrative privileges, the registry might be inaccessible.

Does anyone know another approach for this?


Please note: Writing the external code in C/C++ instead of Java is NOT an option.
0
Comment
Question by:finaris
1 Comment
 
LVL 21

Accepted Solution

by:
Amitkumar P earned 1000 total points
ID: 38357441
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

809 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