NetBeans and IControl
Good morning all
I am trying to get IControl to run with my Java Environment. I am using
NetBeans IDE 7.3 (Build 201302132200)
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
I downloaded the binary distribution of the IControl files from here:
https://devcentral.f5.com/LinkClick.aspx?link=https%3a%2f%2fdevcentral.f5.com%2flabs%2fiControlAssembly%2fiControlAssembly_11_3_0-Java.zip&tabid=73&mid=433
I unzipped the file into a folder: C:\iControl\javalib
Then I downloaded the script that Joe Pruitt provided in his Java Tutorial, but he shows how to do this using Eclipse.
Has anyone used IControl with NetBeans and could you give guidance on how to get the libraries properly installed for a project there?
I am not sure I am adding the libraries correctly. When I unzipped the files above there were two folders, one called 3rdParty and one called lib
ERROR I AM GETTING:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/client/Stub
at systeminfo.SystemInfo.(SystemInfo.java:8)
at systeminfo.SystemInfo.main(SystemInfo.java:64)
Caused by: java.lang.ClassNotFoundException: org.apache.axis.client.Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 2 more
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
CODE FROM JOE(Didn't see how to paste it in pretty and couldn't find instructions)
public class SystemInfo {
public iControl.Interfaces m_interfaces = new iControl.Interfaces();
public void usage()
{
System.out.println("Usage: SystemInfo hostname username password");
}
public void Run(String [] args) throws Exception
{
if ( args.length < 3 )
{
usage();
}
else
{
String host = args[0];
String user = args[1];
String pass = args[2];
boolean bInit = m_interfaces.initialize(host, user, pass);
if ( bInit )
{
getSystemInformation();
}
}
}
public void getSystemInformation() throws Exception
{
iControl.SystemSystemInformation sysInfo =
m_interfaces.getSystemSystemInfo().get_system_information();
System.out.println("======================================================");
System.out.println(" System Information");
System.out.println("------------------------------------------------------");
System.out.println("System Name : " + sysInfo.getSystem_name());
System.out.println("Host name : " + sysInfo.getHost_name());
System.out.println("OS Release : " + sysInfo.getOs_release());
System.out.println("OS Machine : " + sysInfo.getOs_machine());
System.out.println("OS Version : " + sysInfo.getOs_version());
System.out.println("Platform : " + sysInfo.getPlatform());
System.out.println("Product Category : " + sysInfo.getProduct_category());
System.out.println("Chassis Serial : " + sysInfo.getChassis_serial());
System.out.println("Switch Board Serial : " + sysInfo.getSwitch_board_serial());
System.out.println("Switch Board Part Revision : " + sysInfo.getSwitch_board_part_revision());
System.out.println("Host Board Serial : " + sysInfo.getHost_board_serial());
System.out.println("host Board Part Revision : " + sysInfo.getHost_board_part_revision());
System.out.println("Annunciator Board Serial : " + sysInfo.getAnnunciator_board_serial());
System.out.println("Annunciator Board Part Revision : " + sysInfo.getAnnunciator_board_part_revision());
}
/**
* @param args
*/
public static void main(String[] args) {
try
{
SystemInfo sysInfo = new SystemInfo();
sysInfo.Run(args);
}
catch(Exception ex)
{
ex.printStackTrace(System.out);
}
}
}