Programing in java using snmp

hi
i am new to snmp so plz bear with me actually i am trying to build a network monitoring system using snmp.how do i go abt it.how do i start?my application will be running on the server and i have made a database in sql which i hav connected using jdbc and now i want to retrieve data from the managed computers i want the object ids of the managed computers and i want to use snmp commands like get() but i am unable to do so as i dont know the required packages which i need to import i would appreciate if someone can provide with some code snippets or any other related information
thanks

STOP CROSS POSTING THIS QUESTION
http://forum.java.sun.com/thread.jspa?threadID=703014

Similar Messages

  • How Hard is it to program in Java.Swing

    Hi
    I wanted to program using java.swing component but i don't have any idea where i should start.
    I have been programming in java using java.Awt
    and i can do simple array programing.
    So how hard is it, and Where should i start learning java.swing. Ps I don't know anything about Swing, I don't even know what it is.
    Thanks you

    Hi
    As the previous guy said it is quite easy, and that link should teach you the basics. What I want to remind you of is that Swing uses up more memory when run. But it also have a few nicer extra goodies that make coding a little bit easier. Have fun with it.
    Here are a few more sites
    <http://manning.spindoczine.com/sbe/>
    <http://java.sun.com/docs/books/tutorial/uiswing/>
    Ciao

  • How to compile and run package programs in Java

    Hi,
    I want to know how to compile and run the package programs in Java using -d. instead of creating the package folder manually.
    eg:
    package Test;
    class test1
    public void disp()
    //Any code;
    I want to compile this without creating the folder ' Test ' manually. that is if we use -d with javac the Test folder will be created automatically. I need the format of -d
    could anyone please help me.
    Thanks in Advance ,
    Ambika

    My program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
    I've given my pgm and the thing I've got when I compiled it.
    Test.java
    package com.cert;
    public class Test
         public void display()
              System.out.println("Hai");
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
    javac: no source files
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files
    -cp <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
    Plz help me.
    thanks in advance
    Ambika

  • Ore program makes my Java Program crash, which uses lots of memory (Urgent

    I use a very huge HashMap to calculate something, and the HashMap size
    may be increased dynamically.
    And I start the program with -Xms300M -Xmx300M (The OS is Win2000).
    When I start some programs which may use more memory , My program shows
    that the free memory is absolutely enough , but suddenly, The thread to
    handle the HashMap seems to be hanged, and the free memory is shown to be
    reduced continuously.
    At this time, I can't stop the program, Sometimes I can't kill it by the
    Task Management Manager.
    It seems that my java program is robbed with physical memory, and
    encounter memory problem, and can't restore from it?
    Would you please tell me how to fix this problem?
    Thank you very much!
    Sincerely,
    Fang Jing
    [email protected]

    Looks more like an endless loop to me.
    Can you post the code where the problem occurs?

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • Which Java program do I use for this game?

    Okay, I'm programming a video game for my High School grad project.
    Now, I'm just wondering, which Java program do I use for it? It will be 2-d, I'd like it to have SNES like graphics, and it will be a platformer, but kind of like Metroid. You will be able to change forms, from ice to water to a gaseous state, and you have different powers according to which form you're in, like forming an ice bridge in ice form, slipping through cracks in water form, and rising higher in a gaseous form.
    Thank you for your help.

    no, not if you did not code java before.
    There are IDEs like Eclipse arround but that are not good at beginning because they are quite complex and don't take away the coding.
    lg Clemens

  • How to do a SET using SNMP ?

    Hi,
    I already ask in the forum Advanced Language Topics
    http://forum.java.sun.com/thread.jsp?forum=4&thread=320674
    but I din't receive any answer so I try here maybe some one could help me on this ... ;-)
    I find a nice piece of code on Internet to do SNMP request �
    http://membres.lycos.fr/ysoun/index.html
    http://membres.lycos.fr/ysoun/sck.zip
    It works find to do some GET operations like doing a GET sysDescr (oid 1.3.6.1.2.1.1.1.0).
    But I would like to do a SET operation but I could'nt succeed.
    First I do a get on an oid 1.3.6.1.2.1.1.4.0 (sysContact) and I get the value "hello" which is find and I would like to set this value to "good bye".
    Well I have to say that I don�t know very well the SNMP protocol and I couldn�t figure out where to put the value in order to set "Good bye". Off course I have the right community to do that but I just can't figure out how can I do that ...
    Any comment ... help ... ideas ... are more than welcome !!!! Or maybe some better SNMP package to do that???
    thanks,
    Emmanuel
    Here is the code:
    the function to set using SNMP ...
      public static setSnmpRequest(int snmpPort, int snmpTimeout, String community, String host, String strValue){
          String oid = new String("1.3.6.1.2.1.1.4.0");
          D_SNMP.Message request;
          try {
              InetAddress snmpHost = InetAddress.getByName(host);
              DatagramSocket sock = new DatagramSocket();
              sock.setSoTimeout(snmpTimeout);
              // create pdu.
              //somewhere here I should include my variable "good bye" but I don't really know how
              Var var = new Var(oid);
              OctetString c = new OctetString(community);
              D_SNMP.Integer requestId = new D_SNMP.Integer(0);
              D_SNMP.Integer errorIndex = new D_SNMP.Integer(0);
              D_SNMP.Integer errorStatus = new D_SNMP.Integer(0);
              //For the GET:
              //PduCmd pdu = new PduCmd(Pdu.GET,requestId,errorStatus,errorIndex,new VarList(var));
              //What I would like to do:
              PduCmd pdu = new PduCmd(Pdu.SET,requestId,errorStatus,errorIndex,new VarList(var));
              D_SNMP.Message m = new D_SNMP.Message(c,pdu);
              // send
              byte[] b = m.codeBer();
              DatagramPacket packet = new DatagramPacket(b,b.length,snmpHost,snmpPort);
              byte[] b2 = new byte[1024];
              DatagramPacket p2 = new DatagramPacket(b2,b2.length);
              long startTime = System.currentTimeMillis();
              sock.send(packet);
              sock.receive(p2); // block or ... timeout.
              long time = (System.currentTimeMillis() - startTime);
              // display
              ByteArrayInputStream ber = new ByteArrayInputStream(b2,1,p2.getLength()-1); // without tag !
              D_SNMP.Message m2 = new D_SNMP.Message(ber);
              System.out.println("snmpPing " + host + " :");
              System.out.println(m2.getPdu().getVarList().elementAt(0) + " / time = " + time + "ms" );
              if (debug){
                  StringBuffer buf = new StringBuffer();
                  m2.println("",buf);
                  System.out.println(buf);
          } catch (UnknownHostException ex){
              System.out.println(host + ": unknown host." );
          } catch (InterruptedIOException ex){
              System.out.println("snmpPing "+ host + " : Time-out." );
          } catch ( Exception ex) {
              System.out.println("Error in : ");
              System.out.println(ex);
      } the class Var... where somewhere I should be able to set the variable "Good bye" ...
    import java.io.*;
    import java.util.Vector;
    /** ASN.1 grammar for Var:
    * Var ::=
    * SEQUENCE
    *        { name Oid
    *          value CHOICE {Null, Integer, Counter, gauge, Timeticks, IpAddress, OctetString}
    final public class Var extends construct implements Serializable {
      public Var(Oid o, smi s){
        this();
        valeur.addElement(o);
        valeur.addElement(s);
      /** Same as Var(new Oid(oid), new Null()).
      public Var(String oid) throws IOException{
        this(new Oid(oid), new D_SNMP.Null());
      /** Builds a Var from a ByteArrayInputStream holding a Var Ber coding.
       *  <BR>Bytes read are removed from the stream.
       *  <P><B>Note:</B> The ByteArrayInputStream must not contain the Var Tag.
       *  @exception IOException is thrown if a problem occurs while trying to decode the stream.
      public Var(ByteArrayInputStream inBer) throws IOException{
        this();
        decodeBer(inBer);
      /** Used only by VarList.
      Var(){
        super(smi.SEQUENCE_tag);
        valeur = new Vector(2);
      /** Returns the name of this Var.
      public Oid getName(){
        return (Oid) valeur.elementAt(0);
      /** Returns the value of this Var.
      public smi getValue(){
        return (smi) valeur.elementAt(1);
      /** Returns the value of this Var as a String.
      public String toString() {
        try{
        return ((smi)valeur.elementAt(0)).toString() + " = " + ((smi)valeur.elementAt(1)).toString();
        }catch (IndexOutOfBoundsException e) { // ne doit pas se produire.
          System.out.println("Erreur codage interne type Var.");
          System.exit(1);
        return null;
      /** Used smi.decodeBer().
      void decodeValeur(ByteArrayInputStream bufferBer, int lgBerValeur) throws IOException {
        int tag = bufferBer.read();
        if ( tag != smi.OID_tag )
          throw new IOException ("erreur decodage tag Oid de Var: byte " + java.lang.Integer.toHexString(tag) +" recu.");
        Oid name = new Oid(bufferBer);
        this.valeur.addElement(name);
        // lis l'objet suivant.
        tag = bufferBer.read();
        try{
        smi _valeur = smiFactory.create(tag,bufferBer);
        this.valeur.addElement(_valeur);
        } catch (IOException e){
          throw new IOException ("erreur decodage champ Valeur : " + e);
      /** Custom serialization: Ber coding is written in ObjectOutputStream.
      private void writeObject(ObjectOutputStream out) throws IOException{
        byte b[] = this.codeBer();
        out.writeInt(b.length);
        out.write(b);
        out.flush();
      private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        this._tag = smi.SEQUENCE_tag;
        this.valeur = new Vector();
        int len = in.readInt();
        byte b[] = new byte[len];
        in.readFully(b);
        this.decodeBer(new ByteArrayInputStream(b,1,b.length-1));
    } the class VarList ...
    import java.io.*;
    import java.util.Vector;
    /** ASN.1 grammar for VarList:
    * VarList ::=
    * SEQUENCE OF Var
    final public class VarList extends construct {
      /** Constructs a VarList holding a single Var.
       *  @param Var to be held by Varlist
       public VarList(Var v){
         super(smi.SEQUENCE_tag);
         valeur = new Vector(1);
         valeur.addElement(v);
      /** Constructs a VarList holding Vars.
       *  @param v Vector of Vars.
       public VarList(Vector v){
         super(smi.SEQUENCE_tag);
         valeur = (Vector) v.clone();
       /** Constructs a VarList holding Vars.
       *  @param tab array of Vars.
       public VarList(Var[] tab){
         super(smi.SEQUENCE_tag);
         int taille = tab.length;
         valeur = new Vector(taille);
         for (int i=0; i<taille; i++)
           valeur.addElement(tab);
    /** Builds a VarList from a ByteArrayInputStream holding a VarList Ber coding.
    * <BR>Bytes read are removed from the stream.
    * <P><B>Note:</B> The ByteArrayInputStream must not contain the Var Tag.
    * @exception IOException is thrown if a problem occurs while trying to decode the stream.
    public VarList(ByteArrayInputStream inBer) throws IOException{
    super(smi.SEQUENCE_tag);
    valeur = new Vector();
    decodeBer(inBer);
    /** Returns the Var at the specified index.
    public Var elementAt(int i) throws IndexOutOfBoundsException {
    return (Var)valeur.elementAt(i); // Sans soucis: Var est immutable
    /** Returns the number of Var held this VarList.
    public int getSize(){
    return valeur.size();
    /** Used by smi.decodeBer().
    * A VarList is in fact an array of Vars.
    void decodeValeur(ByteArrayInputStream bufferBer, int lgBerValeur) throws IOException {
    Var v;
    int lg;
    try{
    while (lgBerValeur >0){
    int tag = bufferBer.read();
    lgBerValeur --;
    if ( tag != smi.SEQUENCE_tag )
    throw new IOException ("error decoding tag Var in VarList: byte " +
    java.lang.Integer.toHexString(tag) +" read.");
    v =new Var();
    lg = v.decodeBer(bufferBer);
    this.valeur.addElement(v);
    lgBerValeur -= lg;
    } catch (IOException e){
    throw new IOException ("error decoding Value : " + e);

    I read the documentation it does not help me much, (it's generated by javadoc and there is not enought comment to understand the whole thing ... in fact it just miss a sample of SET request and it would be perfect ...
    thanks,
    emmanuel
    PS: I'm going to try the author again
    PS: Still ... any help or pakage to do SET request using SNMP are more than welcome ...

  • I need help with this program ( Calculating Pi using random numbers)

    hi
    please understand that I am not trying to ask anymore to do this hw for me. I am new to java and working on the assignment. below is the specification of this program:
    Calculate PI using Random Numbers
    In geometry the ratio of the circumference of a circle to its diameter is known as �. The value of � can be estimated from an infinite series of the form:
    � / 4 = 1 - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) + ...
    There is another novel approach to calculate �. Imagine that you have a dart board that is 2 units square. It inscribes a circle of unit radius. The center of the circle coincides with the center of the square. Now imagine that you throw darts at that dart board randomly. Then the ratio of the number of darts that fall within the circle to the total number of darts thrown is the same as the ratio of the area of the circle to the area of the square dart board. The area of a circle with unit radius is just � square unit. The area of the dart board is 4 square units. The ratio of the area of the circle to the area of the square is � / 4.
    To simuluate the throwing of darts we will use a random number generator. The Math class has a random() method that can be used. This method returns random numbers between 0.0 (inclusive) to 1.0 (exclusive). There is an even better random number generator that is provided the Random class. We will first create a Random object called randomGen. This random number generator needs a seed to get started. We will read the time from the System clock and use that as our seed.
    Random randomGen = new Random ( System.currentTimeMillis() );
    Imagine that the square dart board has a coordinate system attached to it. The upper right corner has coordinates ( 1.0, 1.0) and the lower left corner has coordinates ( -1.0, -1.0 ). It has sides that are 2 units long and its center (as well as the center of the inscribed circle) is at the origin.
    A random point inside the dart board can be specified by its x and y coordinates. These values are generated using the random number generator. There is a method nextDouble() that will return a double between 0.0 (inclusive) and 1.0 (exclusive). But we need random numbers between -1.0 and +1.0. The way we achieve that is:
    double xPos = (randomGen.nextDouble()) * 2 - 1.0;
    double yPos = (randomGen.nextDouble()) * 2 - 1.0;
    To determine if a point is inside the circle its distance from the center of the circle must be less than the radius of the circle. The distance of a point with coordinates ( xPos, yPos ) from the center is Math.sqrt ( xPos * xPos + yPos * yPos ). The radius of the circle is 1 unit.
    The class that you will be writing will be called CalculatePI. It will have the following structure:
    import java.util.*;
    public class CalculatePI
    public static boolean isInside ( double xPos, double yPos )
    public static double computePI ( int numThrows )
    public static void main ( String[] args )
    In your method main() you want to experiment and see if the accuracy of PI increases with the number of throws on the dartboard. You will compare your result with the value given by Math.PI. The quantity Difference in the output is your calculated value of PI minus Math.PI. Use the following number of throws to run your experiment - 100, 1000, 10,000, and 100,000. You will call the method computePI() with these numbers as input parameters. Your output will be of the following form:
    Computation of PI using Random Numbers
    Number of throws = 100, Computed PI = ..., Difference = ...
    Number of throws = 1000, Computed PI = ..., Difference = ...
    Number of throws = 10000, Computed PI = ..., Difference = ...
    Number of throws = 100000, Computed PI = ..., Difference = ...
    * Difference = Computed PI - Math.PI
    In the method computePI() you will simulate the throw of a dart by generating random numbers for the x and y coordinates. You will call the method isInside() to determine if the point is inside the circle or not. This you will do as many times as specified by the number of throws. You will keep a count of the number of times a dart landed inside the circle. That figure divided by the total number of throws is the ratio � / 4. The method computePI() will return the computed value of PI.
    and below is what i have so far:
    import java.util.*;
    public class CalculatePI
      public static boolean isInside ( double xPos, double yPos )
         double distance = Math.sqrt( xPos * xPos + yPos * yPos );        
      public static double computePI ( int numThrows )
        Random randomGen = new Random ( System.currentTimeMillis() );
        double xPos = (randomGen.nextDouble()) * 2 - 1.0;
        double yPos = (randomGen.nextDouble()) * 2 - 1.0;
        int hits = 0;
        int darts = 0;
        int i = 0;
        int areaSquare = 4 ;
        while (i <= numThrows)
            if (distance< 1)
                hits = hits + 1;
            if (distance <= areaSquare)
                darts = darts + 1;
            double PI = 4 * ( hits / darts );       
            i = i+1;
      public static void main ( String[] args )
        Scanner sc = new Scanner (System.in);
        System.out.print ("Enter number of throws:");
        int numThrows = sc.nextInt();
        double Difference = PI - Math.PI;
        System.out.println ("Number of throws = " + numThrows + ", Computed PI = " + PI + ", Difference = " + difference );       
    }when I tried to compile it says "cannot find variable 'distance' " in the while loop. but i thought i already declare that variable in the above method. Please give me some ideas to solve this problem and please check my program to see if there is any other mistakes.
    Thanks a lot.

    You've declared a local variable, distance, in the method isInside(). The scope of this variable is limited to the method in which it is declared. There is no declaration for distance in computePI() and that is why the compiler gives you an error.
    I won't check your entire program but I did notice that isInside() is declared to be a boolean method but doesn't return anything, let alone a boolean value. In fact, it doesn't even compute a boolean value.

  • Set IP address of L3 switch using SNMP

    HI,
     I am using cisco catalust 3560-x series swtiches. And I am new to SNMP. I want to assign IP address to interfaces of this switch, using SNMP.  Kindly help me. Any help, any sugession, is most welcome.
    Thanks in advance
    Jeni A

    hi,
    Thanks for your response.
    Our requirement is as follows.
    I want to assign IP address to Switch fro my Java Application. I have implemented  a Telnet Client Code in Java, by which i can configure IP address in switch from my java application.
    But my boss said, Telnet is not secure and try using SNMP to do the same.
    When I was searching in Internet, I got this page https://supportforums.cisco.com/discussion/12090896/snmp-how-get-list-ip-addresses-and-corresponding-interface-names
    The above thread gives object ID to GET IP address of Switch interface. This Object is Read-only.
    In the similar way, is there any object, using which I can SET / assign IP address to switch interfaces.
    waiting for your response.
    Thanks in advance :)

  • Ever since the systyem upgraded me to 3.6.6. I can not even run one eight hour day without firefoc either crashing or locking up which requires me use C/A/Deleate to close the program. I used to be able to run 8 to 12 windows at a time and NEVER lock up

    Ever since the systyem upgraded me to 3.6.6. I can not even run one eight hour day without firefoc either crashing or locking up which requires me use C/A/Deleate to close the program. I used to be able to run 8 to 12 windows at a time and NEVER lock up or crash with the older version. Is this problem being looked into and or being corrected. I use Firefox with Google and my system is XP Pro 32 bit. THIS IS REALLY making me MAD. My email is [email protected] and would appreciate a response to this ASAP. I have tried a couple of items from your help section and nothing works.

    <u>'''Anonymous'''</u>
    Please post a separate question. Thank you. https://support.mozilla.com/tiki-ask_a_question.php?locale=en-US&forumId=1
    <u>'''chris'''</u>
    <u>'''''Crashing'''''</u>
    See:
    http://support.mozilla.com/en-US/kb/Firefox+crashes
    http://kb.mozillazine.org/Firefox_crashes
    http://support.mozilla.com/en-US/kb/Firefox+crashes+when+loading+certain+pages
    http://support.mozilla.com/en-US/kb/Firefox+crashes+when+you+open+it
    http://support.mozilla.com/en-US/kb/Firefox+will+not+start
    http://kb.mozillazine.org/Browser_will_not_start_up
    ''<u>'''Hanging'''</u>''
    See: http://support.mozilla.com/en-US/kb/Firefox+hangs
    <u>'''''Hanging at exit'''''</u>
    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    ''<u>'''Safe Mode'''</u>''
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    <u>'''chris'''</u>
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Update Java'''</u>: your ver. 1.6.0.~~red:17~~; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    (Firefox 3.6 and above requires Java 1.6.0.10 or higher; see: http://support.mozilla.com/en-US/kb/Java-related+issues#Java_does_not_work_in_Firefox_3_6 )
    ''(Windows users: Do the manual update; very easy.)''
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''NOTE:'''</u> Java version 1.6.0.21 has been released. It is mainly an update for developers of Java applications and most users do not need to be concerned about downloading version 1.6.0.21. <u>'''''At this time'''''</u>, the update option in existing installations of Java 1.6.0.20 are not updating to version 1.6.0.21; <u>'''''at this time'''''</u>, it must be manually downloaded and installed. According to the Java release notes:
    ''"'''Bug Fixes'''''
    ''Java SE 6 Update 21 does not contain any additional fixes for security vulnerabilities to its previous release, Java SE 6 Update 20. Users who have Java SE 6 Update 20 have the latest security fixes and do not need to upgrade to this release to be current on security fixes."'' Source: http://java.sun.com/javase/6/webnotes/6u21.html
    <u>'''Install/Update Adobe Flash Player for Firefox (aka Shockwave Flash)'''</u>: your ver. 10.0 r~~red:45~~; current ver. 10.1 r53 ('''important security update 2010-06-10'''; see: http://www.adobe.com/support/security/bulletins/apsb10-14.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -''<u>In Windows,</u>'' check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -''<u>In Windows,</u>'' double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer. See: [[ActiveX]]
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]
    <u>'''Update Shockwave for Director (aka Shockwave Player)'''</u>: your ver. ~~red:10.1 (very old)~~; current ver. 11.5.7.609 (<u>important security update released 2010-05-11</u>; see http://www.adobe.com/support/security/bulletins/apsb10-12.html)
    NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    SAVE the installer to your hard drive (Desktop is a good place so you can find it). When the download is complete, exit Firefox (File > Exit), locate and double-click in the installer you just downloaded, let the install complete.
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox#_Installing_Shockwave Installing Shockwave]'''
    <u>'''You '''</u>~~red:<u>'''MAY'''</u>~~<u>''' need to Update Adobe Reader for Firefox (aka Adobe PDF Plug-In For Firefox)'''</u>: your ver. N/A; current ver. 9.3.3 (important security update release 06-29-2010; see: http://www.adobe.com/support/security/bulletins/apsb10-15.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: http://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox#Installing_and_updating_Adobe_Reader
    ''<u>You may be able to update from the Adobe Reader installed on your system</u>'' instead of going to the Adobe site and downloading. Open the Adobe Reader installed on your system (''in Windows, Start > Program Files, find and click Adobe Reader to open''), click Help, click Check for Updates.
    ''<u>If you go to the Adobe site to download the current Adobe Reader:</u>''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    ~~red:-See the images at the bottom left of this post to see the steps to take on the Adobe site~~
    -exit Firefox (File > Exit)
    -In Windows: check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -In Windows: double-click on the Adobe Reader installer you just downloaded to install/update Adobe Reader
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version. To install/update the IE ActiveX version, same instructions as above, except use IE to download the ActiveX installer. See: [[ActiveX]]
    *Also see: http://kb.mozillazine.org/Adobe_Reader ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • When i click on the Firefox icon I get an error message, C:\Program Files\Java\jre6\lib\deploy\jqs\ff\..\..\..\..\bin\jqsnotify\.exe cannot be found. What is it? and how do i fix it? in English

    When i click on the icon to open Firefox an error message box appears with the following message, C:\Program Files\Java\jre6\lib\deploy\jqs\ff\..\..\..\..\bin\jqsnotify\.exe cannot be found. It then advises me to use the Search function, but the search function says it is unavailable.
    What is it? and how do I fix it? in English

    See:
    http://www.java.com/en/download/help/quickstarter.xml - What is Java Quick Starter (JQS)? What is the benefit of running JQS? - 6.0

  • How to create a program in J2EE using eclipse

    Hello
    I am planning to start with J2EE. i have downloaded glassfish v3, maven, derby and JUnit and eclipse. But i am not getting how to start with it.
    please guide me.i am following apress publication's Antonio Goncalves. How to write a program , how to deploy with glassfish then.
    really confused..
    thanking in advance

    abhinav291988 wrote:
    Hello
    I am planning to start with J2EE. i have downloaded glassfish v3, maven, derby and JUnit and eclipse. But i am not getting how to start with it.
    please guide me.i am following apress publication's Antonio Goncalves. How to write a program , how to deploy with glassfish then.
    really confused..
    thanking in advanceIn terms of learning how to use Eclipse [http://eclipsetutorial.sourceforge.net/]
    In terms of learning how to use Java EE [http://java.sun.com/javaee/5/docs/tutorial/doc/]
    In terms of how to write a program [http://java.sun.com/docs/books/tutorial/]
    If you have a specific question to ask, then please repost. My suggestion would be to take the Eclipse tutorial to familiarize yourself, and then follow along in your book. If the book is too advanced, buy one aimed more at beginners. Online tutorials should also help you out.
    - Saish

  • Asynchronous socket programming in Java?

    I am a C++ programmer, I just wonder how do I do asynchronous programming in Java?
    In VC++, you can hook an event handler to the socket and the system will fire an event whenever there is data coming in to the socket. The event handler can then spawn a thread and handle the network message.
    In Unix, you can use the select() function. This function will return whenever the indicated socket fires events. If nothing happens within the timeout period, the function simply returns.
    What about in Java? I don't see any methods that allows you to hook an event handler to it. Is there anything like select() function in Unix?
    Thanks so much.

    There is something very much like C's select: selectors. I don't immediately know where to read more about them but google for things like "java selector example", "java nio tutorial", etc (NIO = new I/O, the library where selectors live.)
    Another way to do async sockets in Java is by threading. That is the traditional way before New I/O. It's still a perfectly good and easy way, thanks to Java's easy threading. Downside is that it scales to only maybe 100-200 simultaneous connections per server (will depend on your operating system). For thread-based sockets check Sun's Java socket tutorial (first item when you google "java socket tutorial").

  • Java6: How to compile java using JavaCompiler class

    Hi all,
    Using JavaCompiler, we can run the java program thru programmaticaly using run() method.
    Could anyone please tell me how to compile a java program using JavaCompailer class? Or calling run() itself will compile java file?
    Thanks
    Shagil

    import spoon.support.input.SpoonInputStream;
    import com.sun.tools.javac.code.Symbol.ClassSymbol;
    import com.sun.tools.javac.comp.Attr;
    import com.sun.tools.javac.comp.AttrContext;
    import com.sun.tools.javac.comp.Enter;
    import com.sun.tools.javac.comp.Env;
    import com.sun.tools.javac.comp.Todo;
    import com.sun.tools.javac.tree.Tree;
    import com.sun.tools.javac.tree.Tree.ClassDef;
    import com.sun.tools.javac.tree.Tree.TopLevel;
    import com.sun.tools.javac.util.Abort;
    import com.sun.tools.javac.util.Context;
    import com.sun.tools.javac.util.List;
    import com.sun.tools.javac.util.ListBuffer;
    import com.sun.tools.javac.util.Log;
    import com.sun.tools.javac.util.Name;
    * The Spoon compiler (uses javac).
    public class SpoonCompiler extends com.sun.tools.javac.main.JavaCompiler {
         Attr attr;
         Enter enter;
         boolean hasBeenUsed = false;
         Log log;
         Todo todo;
         public SpoonCompiler(Context arg0) {
              super(arg0);
              enter = Enter.instance(arg0);
              todo = Todo.instance(arg0);
              log = Log.instance(arg0);
              attr = Attr.instance(arg0);
              sourceOutput=true;
          * Main method: compile a list of files, return all compiled classes
          * @param filenames
          *            The names of all files to be compiled.
         @SuppressWarnings("unused")
         public List<Tree> parseAndAttribute(List<SpoonInputStream> filenames)
                   throws Throwable {
              // as a JavaCompiler can only be used once, throw an exception if
              // it has been used before.
              assert !hasBeenUsed : "attempt to reuse JavaCompiler";
              hasBeenUsed = true;
              long msec = System.currentTimeMillis();
              ListBuffer<ClassSymbol> classes = new ListBuffer<ClassSymbol>();
              try {
                   // parse all files
                   ListBuffer<Tree> trees = new ListBuffer<Tree>();
                   for (List<SpoonInputStream> l = filenames; l.nonEmpty(); l = l.tail) {
                        trees.append(parse(l.head.getFileName(),l.head.getStream()));
                   // enter symbols for all files
                   List<Tree> roots = trees.toList();
                   if (errorCount() == 0)
                        enter.main(roots);
                   // If generating source, remember the classes declared in
                   // the original compilation units listed on the command line.
                   List<ClassDef> rootClasses = null;
                   if (sourceOutput || stubOutput) {
                        ListBuffer<ClassDef> cdefs = new ListBuffer<ClassDef>();
                        for (List<Tree> l = roots; l.nonEmpty(); l = l.tail) {
                             for (List<Tree> defs = ((TopLevel) l.head).defs; defs
                                       .nonEmpty(); defs = defs.tail) {
                                  if (defs.head instanceof ClassDef)
                                       cdefs.append((ClassDef) defs.head);
                        rootClasses = cdefs.toList();
                   while (todo.nonEmpty()) {
                        Env<AttrContext> env = todo.next();
                        // save tree prior to rewriting
                        Tree untranslated = env.tree;
                        // attribution phase
                        if (verbose)
                             printVerbose("checking.attribution", env.enclClass.sym);
                        Name prev = log.useSource(env.enclClass.sym.sourcefile);
                        attr.attribClass(env.tree.pos, env.enclClass.sym);
                   return trees.toList();
              } catch (Abort ex) {
                   ex.printStackTrace();
              if (verbose)
                   printVerbose("total", Long.toString(System.currentTimeMillis()
                             - msec));
              int errCount = errorCount();
              if (errCount == 1)
                   printerCount("error", errCount);
              else
                   printerCount("error.plural", errCount);
              if (log.nwarnings == 1)
                   printerCount("warn", log.nwarnings);
              else
                   printerCount("warn.plural", log.nwarnings);
              return null;
         private void printerCount(String str, int val) {
              System.err.println(str + " - " + val);
         private void printVerbose(String arg0, Object obj) {
              System.out.println(arg0 + " - " + obj.toString());
    --- NEW FILE: CtBuilder.java ---
    package spoon.support.builder;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Stack;
    import java.util.TreeSet;
    import spoon.query.Query;
    import spoon.query.TypeFilter;
    import spoon.reflect.CtFactory;
    import spoon.reflect.code.BinaryOperatorKind;
    import spoon.reflect.code.CtAbstractInvocation;
    import spoon.reflect.code.CtArrayAccess;
    import spoon.reflect.code.CtAssert;
    import spoon.reflect.code.CtAssignment;
    import spoon.reflect.code.CtBinaryOperator;
    [...1760 lines suppressed...]
                var.setSimpleName(tree.sym.name.toString());
                var.setModifiers(getModifiers(tree.mods.flags));
                enter(var, tree);
                scan(tree.init);
                exit(var, tree);
        @Override
        public void visitWhileLoop(WhileLoop tree) {
            CtWhile whileLoop = new CtWhileImpl();
            enter(whileLoop, tree);
            builderContext.loopParameter = 1;
            scan(tree.cond);
            builderContext.loopParameter = 0;
            scan(tree.body);
            exit(whileLoop, tree);
    }

  • Can i create an exetutable (.exe) program with java???????

    I would like to learn how i can create an exetutable (.exe) program with java.
    Is there any additional package which i should download or buy it?
    Also i would like to write files into CD's direct from my application.
    Is there any library which i must download or buy?
    Thanks!

    check out the free open source GNU gcj native compiler for Java to see if it will do what you want.
    http://gcc.gnu.org/java/
    for writing data files you could use java.io.BufferedWriter. For sound files, look in the javax.sound package

Maybe you are looking for