R
Ravikumar
Hi,
I am writing a java aglet application to do snmp operation. I tried
with Aglet2.0.2 with windows XP OS. My application will load a text
file(MIB file) from the path which I have specified and parse the
file. Also load the content in memory interms of MIB objects.
What I done is, I have copied the RFC1213-MIB file to the directory
C:\Ravikumar\SoftWare\Aglets\Aglets2.0.2\public and load the same.
The below method call will do as
tablepanel.loadMibs("C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/public/
RFC1213-MIB");
It loads RFC1213-MIB file from "C:/Ravikumar/SoftWare/Aglets/
Aglets2.0.2/public and parse the content. But while loading this file,
I have got the following exception
Exception : java.io.FileNotFoundException: Could not find the file :
C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/public/RFC1213-MIB
ERROR
I can't able to load this file. But when I try with as stand alone
java application it works fine.
My question is, how to load a text file to a java application in
Aglets.
Please help to resolve this problem.
Thanks in Advance.
Cheers
Ravikumar
My code snippet is
import com.ibm.aglet.*;
import com.ibm.aglets.*;
import com.ibm.aglet.event.*;
import com.ibm.aglet.util.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;
import java.lang.*;
import com.adventnet.snmp.ui.*;
import com.adventnet.snmp.mibs.*;
import com.adventnet.snmp.beans.*;
import java.io.*;
import java.net.*;
public class largetable extends Aglet
{
JFrame f = new JFrame("SNMP Table");
SnmpTablePanel tablepanel ;
JScrollPane scrollpane;
public void run()
{
tablepanel = new SnmpTablePanel();
tablepanel.setTargetHost("proto-test3");
tablepanel.setCommunity("public");
try{
tablepanel.loadMibs("C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/public/
RFC1213-MIB");
tablepanel.setTableOID("ifTable");
}catch(Exception e)
{
System.out.println("ERROR");
}
scrollpane = new JScrollPane(tablepanel);
f.add(scrollpane);
f.setSize(500,500);
f.show();
}
}
I am writing a java aglet application to do snmp operation. I tried
with Aglet2.0.2 with windows XP OS. My application will load a text
file(MIB file) from the path which I have specified and parse the
file. Also load the content in memory interms of MIB objects.
What I done is, I have copied the RFC1213-MIB file to the directory
C:\Ravikumar\SoftWare\Aglets\Aglets2.0.2\public and load the same.
The below method call will do as
tablepanel.loadMibs("C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/public/
RFC1213-MIB");
It loads RFC1213-MIB file from "C:/Ravikumar/SoftWare/Aglets/
Aglets2.0.2/public and parse the content. But while loading this file,
I have got the following exception
Exception : java.io.FileNotFoundException: Could not find the file :
C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/public/RFC1213-MIB
ERROR
I can't able to load this file. But when I try with as stand alone
java application it works fine.
My question is, how to load a text file to a java application in
Aglets.
Please help to resolve this problem.
Thanks in Advance.
Cheers
Ravikumar
My code snippet is
import com.ibm.aglet.*;
import com.ibm.aglets.*;
import com.ibm.aglet.event.*;
import com.ibm.aglet.util.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;
import java.lang.*;
import com.adventnet.snmp.ui.*;
import com.adventnet.snmp.mibs.*;
import com.adventnet.snmp.beans.*;
import java.io.*;
import java.net.*;
public class largetable extends Aglet
{
JFrame f = new JFrame("SNMP Table");
SnmpTablePanel tablepanel ;
JScrollPane scrollpane;
public void run()
{
tablepanel = new SnmpTablePanel();
tablepanel.setTargetHost("proto-test3");
tablepanel.setCommunity("public");
try{
tablepanel.loadMibs("C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/public/
RFC1213-MIB");
tablepanel.setTableOID("ifTable");
}catch(Exception e)
{
System.out.println("ERROR");
}
scrollpane = new JScrollPane(tablepanel);
f.add(scrollpane);
f.setSize(500,500);
f.show();
}
}