NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: Mus on May 31, 2008, 04:42:13 am



Title: EJS to Database Connection
Post by: Mus on May 31, 2008, 04:42:13 am
Hello,
I just wondering if EJS can be connected to the database such as ms.access or mysql.
I am trying to display the graph in applet where the data source (variable X and Y ) are retrieved from ms.access database.
If do you have an example code, could you please send to my email: fimusm@yahoo.com
Thank you in advance.

Regards,
Mus


Title: Re: EJS to Database Connection
Post by: Fu-Kwun Hwang on May 31, 2008, 02:11:52 pm
EJS is a java code generator. You can import any existing java library and use it with EJS.
So if you include java library for mysql , you will be able to execute sql statement with function call and do what you want.
I know that it can be done. But I have never try it.  So I do not have example to share with you.

You can also use AJAX to get the data and send those data to EJS with java script call. For example: snapshot of the simulation was generated this way. Javascript code call public method in EJS and EJS generate snapshot image and return  as data. Then image data sent to php script to create image file. And you can access database with php script easily.
I think this in-direct method will be easier to implement.


Title: Re: EJS Source code for Ideal gas simulation
Post by: muralijb on March 09, 2012, 12:58:22 am
Hello,
I just wondering if EJS can be connected to the database such as ms.access or mysql.
I am trying to display the graph in applet where the data source (variable X and Y ) are retrieved from ms.access database.
If do you have an example code, could you please send to my email: fimusm@yahoo.com
Thank you in advance.

Regards,
Mus


Hi 
any can send EJS Source code..because I need to modify it for Arabic language.
my email id is:krishna.jb@gmail.com


Title: Re: EJS to Database Connection
Post by: ahmedelshfie on March 13, 2012, 02:42:52 am
If you ask about EJS you can download from Easy Java Simulations (http://www.um.es/fem/EjsWiki/Main/Download)

Later unzip and set your path file, Enjoy !!