Need to develop a Java Interface to NS-3

131 views
Skip to first unread message

Tinks Abraham

unread,
Feb 12, 2013, 7:39:35 AM2/12/13
to ns-3-...@googlegroups.com
Could someone give a proper guideline or materials of how i can integrate ns-3 into java environment. I need to develop an interface. 
Please help me 

Murad Kablan

unread,
Feb 13, 2013, 8:27:11 PM2/13/13
to ns-3-...@googlegroups.com
The only possible way is using JNI calls. I couldn't run it though from withing ns-3 because I didn't know how to link the libraries used by jvm. 

Hope this helps.

Tinks Abraham

unread,
Feb 19, 2013, 11:29:40 AM2/19/13
to ns-3-...@googlegroups.com
So could u give an idea on how i can use JNI and have a ns-3 simulation in eclipse

Murad Kablan

unread,
Feb 20, 2013, 4:20:21 PM2/20/13
to ns-3-...@googlegroups.com
The first thing to do is understanding JNI (Java Network Interface) which you use if you want to call java functions from C/C++ code or vice versa.
Saying this, that doesn't mean it is easy to use JNI inside ns-3. It seems the easiest and probably the best way to  run application on ns-3 node is use DCE. These applications are C/C++ applications, that's why you need JNI if you want to run Java code.

I tried to do this but I failed and if you look at this thread, https://groups.google.com/forum/?fromgroups=#!topic/ns-3-users/uDumHIHVzJY   I was asking a question about this matter. It seems hard to do this with ns-3 at the time been. 
I guess you have another option by using AgentJ on ns-2 .

Could you tell me what exactly you are trying to do with JNI? Maybe we can find a better way.

Thanks,
Murad
Reply all
Reply to author
Forward
0 new messages