How to install(use) NSG2(NS2 Scenarios Generator 2) in ubuntu 10.0.4
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to install(use) NSG2(NS2 Scenarios Generator 2) in ubuntu 10.0.4
Hello All,
I want to use NSG2 in Ubuntu.
But I'm unable to use it!!
I already install java and download NSG2 from https://sites.google.com/site/pengjungwu/nsg!!!
But I encounter the problem as follow!
So, How to solve this problem?
Please Help Me ,Sir!!!
kmw@ubuntu:~$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.10.04.1)
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
kmw@ubuntu:~$ java -jar NSG2.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
at java.awt.Window.<init>(Window.java:477)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:218)
at nsg.NSG2.<init>(NSG2.java:51)
at nsg.NSG2.main(NSG2.java:253)
kmw@ubuntu:~$
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196
Rep:
How do you execute your program? I think we need to create a script file to add that variable into the java...let me know I have a simple script my grandson uses to play a game but I have to swith to linux to retreive it.
Hello sir!
Thank you very much for your guide line!
But, still now , I'm not ok to run NSG2.
So,please help me ,sir!
I will never forget your kindness!
kmw@ubuntu:~$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.10.04.1)
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
kmw@ubuntu:~$ java -jar NSG2.1.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
at java.awt.Window.<init>(Window.java:477)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:218)
at nsg.NSG2.<init>(NSG2.java:57)
at nsg.NSG2.main(NSG2.java:297)
kmw@ubuntu:~$ java -Djava.awt.headless -jar NSG2.1.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1667)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1614)
at java.awt.Toolkit.<clinit>(Toolkit.java:1636)
at java.awt.Component.<clinit>(Component.java:582)
Could not find the main class: nsg.NSG2. Program will exit.
kmw@ubuntu:~$
The easy way : Cheating an rpm package install ..
1) sudo apt-get install rpm
2) sudo rpm -Uvh --nodeps jdk-1.6.0_35-fcs.i586.rpm --force-debian http://ftp.scientificlinux.org/linux...5-fcs.i586.rpm
3)
sudo update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_33/bin/java 2
4)
sudo update-alternatives --config java
... And then choose the "/usr/java/jdk1.6.0_35/bin/java" entry.
Ubuntu 10.04 : java -jar NSG2.1.jar : Opens OK with "jdk1.6.0_35"
NSG2.1 https://sites.google.com/site/pengjungwu/nsg
EDIT : Both versions NSG2.jar, NSG2.1.jar work OK here with OpenJDK and the "sun jdk".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.