I would simply like to execute a java class from within VBA on MAC.
In the MAC terminal one just types "java" and it executes the java command.
I tried:
t = "Macintosh HD:System:Library:Java:JavaVirtualMachines:1.6.0.jdk:Contents:Home:bin:java"
MacScript (t)
or
t = "Macintosh HD:System:Library:Java:JavaVirtualMachines:1.6.0.jdk:Contents:Home:bin:java"
shell (t)
but get runtime error 5 Invalid procedure call or argument.
I guess this is because 1.6.0.jdk is not simply a folder which I can include in the path – but I am not sure.
How would I have to call java from within VBA?
once this works I need to actually call: java myFile
How do I include the complete path for the java command and then the complete path for myFile?
Many thanks
You can’t call a Java function from VBA unless you use a run time bridge like this JavaBridge or you can use Web Services to wrap your VBA.