Dear all,
We all know EViews11 can call programmes such as MATLAB, R and Python.
But can we call EViews programme through other popular languages? Especially through Java?
If it could, how can we do it?
Thanks a lot!
Can we call EViews programme through Java?
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Can we call EViews programme through Java?
When we say that EViews can connect to external environments such as R, MATLAB, and Python, we're specifically talking about the ability to do the following from within EViews:
As far as I know, there isn't a way to run a REPL session with Java, as it is purely a programming language that needs to be pre-compiled to run.
I would suggest doing one of the following instead:
Launch a Java Program
From within EViews, you can run a pre-compiled Java program using our SPAWN command. In this situation, you'll have to use an external CSV or TXT file to transfer data between EViews and Java.
Launch and Control EViews from Java
From within Java, use and control EViews using our COM Automation interface. Look into using COM objects from Java and refer to our COM Automation whitepaper that explains how to programmatically control EViews. Once you have an EViews Application object in your Java program, you call the PutData and GetData methods to transfer data to and from Java, without having to mess with external files.
Steve
- 1. Open an external session. (XOPEN)
2. Transfer EViews data to the external environment (XPUT)
3. Run an external command (XRUN)
4. Retrieve external data back into EViews (XGET)
5. Close external session (XCLOSE)
As far as I know, there isn't a way to run a REPL session with Java, as it is purely a programming language that needs to be pre-compiled to run.
I would suggest doing one of the following instead:
Launch a Java Program
From within EViews, you can run a pre-compiled Java program using our SPAWN command. In this situation, you'll have to use an external CSV or TXT file to transfer data between EViews and Java.
Launch and Control EViews from Java
From within Java, use and control EViews using our COM Automation interface. Look into using COM objects from Java and refer to our COM Automation whitepaper that explains how to programmatically control EViews. Once you have an EViews Application object in your Java program, you call the PutData and GetData methods to transfer data to and from Java, without having to mess with external files.
Steve
Re: Can we call EViews programme through Java?
Many thx Steve, I will have a try. And love EViews forever!When we say that EViews can connect to external environments such as R, MATLAB, and Python, we're specifically talking about the ability to do the following from within EViews:
R, MATLAB, & Python all allow you to run them "interactively" -- meaning you can start a REPL session to interactively run commands. This type of interactive session is a basic requirement for EViews to be able to connect and use it from EViews.
- 1. Open an external session. (XOPEN)
2. Transfer EViews data to the external environment (XPUT)
3. Run an external command (XRUN)
4. Retrieve external data back into EViews (XGET)
5. Close external session (XCLOSE)
As far as I know, there isn't a way to run a REPL session with Java, as it is purely a programming language that needs to be pre-compiled to run.
I would suggest doing one of the following instead:
Launch a Java Program
From within EViews, you can run a pre-compiled Java program using our SPAWN command. In this situation, you'll have to use an external CSV or TXT file to transfer data between EViews and Java.
Launch and Control EViews from Java
From within Java, use and control EViews using our COM Automation interface. Look into using COM objects from Java and refer to our COM Automation whitepaper that explains how to programmatically control EViews. Once you have an EViews Application object in your Java program, you call the PutData and GetData methods to transfer data to and from Java, without having to mess with external files.
Steve
Who is online
Users browsing this forum: No registered users and 2 guests
