Has private access in mudclient

Alright, i've been getting on this error on every int I try to pull from the mudclient:
.\Script.java:19: dgf has private access in mudclient
                rs.dfm[0] = rs.dgf[idx].gmi;
                              ^
.\Script.java:20: djk has private access in mudclient
                rs.djk[0] = rs.dgf[idx].gmf;
                  ^
.\Script.java:20: dgf has private access in mudclient
                rs.djk[0] = rs.dgf[idx].gmf;
                              ^
.\Script.java:21: emg(int) has private access in mudclient
                rs.emg(0);
etc.here is what I have in script.java
public void AN(int idx) {
public abstract class Script
    protected mudclient rs;
    public Script(mudclient rs)
        this.rs = rs;
    public void start(String command, String parameters[])
    public String[] getCommands()
        return new String[0];
     public void AN(int idx) {
                  rs.dga[0] = 715;
                 rs.dfl[0] = rs.dgf[idx].gmh;
                 rs.dfm[0] = rs.dgf[idx].gmi;
                 rs.djk[0] = rs.dgf[idx].gmf;
            rs.emg(0);
}Not quite sure wich wich java version I have, but I've tryed to compile with an online compilier that uses 1.5.0, and i still got the same errors... any help is appreciated :)

This means the arrays inside mudclient are private and cannot be access inside Script.
rs can be accessed but not the variables inside it.
You should not be trying to do this in any case. Try to write your code so that variables are only accessed by methods in the same class.

Similar Messages

  • Trying to access an object's field but it has private access ! !

    Dear People,
    I am trying to access the highestBid, a data member of the Bid class
    in an Auction program.
    If I try to set the highestBid:
    bicycle.setHighestBid(steveBicycleBid);
    The error message says:
    "TryAuction.java": Error #: 306 : method setHighestBid(stan_bluej_ch4p90.Bid) has private access in class stan_bluej_ch4p90.Lot at line 58, column 15
    IF I try to get the highest bid by saying:
    System.out.println("The highest bid for this item is " + bicycle.getHighestBid() );
    I get an object hex address as seen below instead of an integer value:
    The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    ^^^
    Below are the classes
    Thank you in advance
    stan
    package stan_bluej_ch4p90;
    //Purpose of project: To demonstrate collections of objects
    //Version: 2001.05.31
    //How to start this project:
    // Create an Auction object.
    // Enter a few lots via its enterLot method. Only String
    // descriptions of the lots are required.
    // Create one or more Person objects to represent bidders.
    // Show the lots and select one to bid for.
    // Get the required Lot onto the object bench.
    // Enter a bid for the lot, passing the Person who is
    // bidding to the bidFor method.
    public class TryAuction
    public static void main(String[] args)
    //create the auction
    Auction cityAuction = new Auction();
    //create the lots for sale
    Lot bicycle = new Lot(1,"bicycle");
    Lot lamp = new Lot(2, "lamp");
    Lot trailer = new Lot(3, "trailer");
    //enter the lots into the city Auction
    cityAuction.enterLot("A bicycle in so so condition");
    cityAuction.enterLot("A brand new lamp");
    cityAuction.enterLot("A trailer built in 2001");
    //show the lots
    System.out.println();
    System.out.println("The first lot for sale: " + bicycle.getDescription());
    System.out.println("The second lot for sale: " + lamp.getDescription());
    System.out.println("The third lot for sale: " + trailer.getDescription());
    //create the people who will bid for the lots
    Person Steve = new Person("Steve");
    Person Maria = new Person("Maria");
    //create the people's bids
    Bid mariaLampBid = new Bid(Maria, 460);
    Bid steveLampBid = new Bid(Steve, 510);
    //create the people's bids
    Bid mariaBicycleBid = new Bid(Maria, 1460);
    Bid steveBicycleBid = new Bid(Steve, 1510);
    //create the people's bids
    Bid steveTrailerBid = new Bid(Steve, 700510);
    Bid mariaTrailerBid = new Bid(Maria, 900460);
    //give the bids
    bicycle.bidFor(Maria,1460);
    bicycle.bidFor(Steve, 1510);
    //bicycle.setHighestBid(steveBicycleBid);
    System.out.println("The highest bid for this item is " + bicycle.getHighestBid() );
    lamp.bidFor(Maria,460);
    lamp.bidFor(Steve,510);
    trailer.bidFor(Steve, 700510);
    trailer.bidFor(Maria,900460);
    System.out.println(" \nMaria's bicycle bid is : " + mariaBicycleBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveBicycleBid.getValue() );
    System.out.println(" \nMaria's lamp bid is : " + mariaLampBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveLampBid.getValue() );
    System.out.println("\nSteve's trailer bid is : " + steveTrailerBid.getValue() );
    System.out.println(" Maria's trailer bid is : " + mariaTrailerBid.getValue() );
    System.out.println();
    cityAuction.showLots();
    //cityAuction.close();
    //The output I get is:
    //The first lot for sale: bicycle
    //The second lot for sale: lamp
    //The third lot for sale: trailer
    //The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    //Maria's bicycle bid is : 1460
    //Steve's lamp bid is : 1510
    //Maria's lamp bid is : 460
    //Steve's lamp bid is : 510
    //Steve's trailer bid is : 700510
    // Maria's trailer bid is : 900460
    //1: A bicycle in so so condition
    // (No bid)
    //2: A brand new lamp
    // (No bid)
    //3: A trailer built in 2001
    // (No bid)
    package stan_bluej_ch4p90;
    import java.util.*;
    //Ex4.14
    * A simple model of an auction.
    * The auction maintains a list of lots of arbitrary length.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Auction
    // The list of Lots in this auction.
    private ArrayList lots;
    // The number that will be given to the next lot entered
    // into this auction.
    private int nextLotNumber;
    * Create a new auction.
    public Auction()
         lots = new ArrayList();
         nextLotNumber = 1;
    * Enter a new lot into the auction.
    * Lots can only by entered into the auction by an
    * Auction object.
    * @param description A description of the lot.
    public void enterLot(String description)
         lots.add(new Lot(nextLotNumber, description));
         nextLotNumber++;
    * Show the full list of lot numbers and lot descriptions in
    * this auction. Include any details of the highest bids.
    public void showLots()
         Iterator it = lots.iterator();
         while(it.hasNext()) {
         Lot lot = (Lot) it.next();
         System.out.println(lot.getNumber() + ": " +
                   lot.getDescription());
         // Include any details of a highest bid.
         Bid highestBid = lot.getHighestBid();
         if(highestBid != null) {
              System.out.println(" Bid: " +
                        highestBid.getValue());
         else {
              System.out.println(" (No bid)");
    * Return the lot with the given number. Return null
    * if a lot with this number does not exist.
    * @param number The number of the lot to return.
    public Lot getLot(int number)
         if((number >= 1) && (number < nextLotNumber)) {
         // The number seems to be reasonable.
         Lot selectedLot = (Lot) lots.get(number-1);
         // Include a confidence check to be sure we have the
         // right lot.
         if(selectedLot.getNumber() != number) {
              System.out.println("Internal error: " +
                        "Wrong lot returned. " +
                        "Number: " + number);
         return selectedLot;
         else {
         System.out.println("Lot number: " + number + " does not exist.");
         return null;
    // public void close()
    // Iterator i = lots.iterator();
    // while(i.hasNext())
    //     System.out.println("The winning amount for the " + bicycle.getDescription()
    //     + " is " + bicycle.getHighestBid());
    //     System.out.println("The winning amount for the " + lamp.getDescription()
    //     + " is " + lamp.getHighestBid());
    //     System.out.println("The winning amount for the " + trailer.getDescription()
    //     + " is " + trailer.getHighestBid());
    package stan_bluej_ch4p90;
    * A class to model an item (or set of items) in an
    * auction: a lot.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Lot
    // A unique identifying number.
    private final int number;
    // A description of the lot.
    private String description;
    // The current highest bid for this lot.
    private Bid highestBid;
    * Construct a Lot, setting its number and description.
    * @param number The lot number.
    * @param description A description of this lot.
    public Lot(int number, String description)
         this.number = number;
         this.description = description;
    * Attempt to bid for this lot. A successful bid
    * must have a value higher than any existing bid.
    * @param bidder Who is bidding.
    * @param value The value of the bid.
    public void bidFor(Person bidder, long value)
         // We trust that lot is genuine. There is nothing to
         // prevent a spurious lot from being bid for, but it
         // would not appear in the auction list.
         if((highestBid == null) ||
         (highestBid.getValue() < value)) {
         // This bid is the best so far.
         setHighestBid(new Bid(bidder, value));
         else {
         System.out.println("\nLot number: " + getNumber() +
                   " (" + getDescription() + ")" +
                   " has a bid of: " +
                   highestBid.getValue());
    * @return The lot's number.
    public int getNumber()
         return number;
    * @return The lot's description.
    public String getDescription()
         return description;
    * @return The highest bid for this lot. This could be null if
    * there are no current bids.
    public Bid getHighestBid()
         return highestBid;
    * @param highestBid The new highest bid.
    private void setHighestBid(Bid highestBid)
         this.highestBid = highestBid;
    package stan_bluej_ch4p90;
    * A class that models an auction bid. The bid contains a reference
    * to the Lot bid for and the user making the bid.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Bid
    // The user making the bid.
    private final Person bidder;
    // The value of the bid. This could be a large number so
    // the long type has been used.
    private final long value;
    * Create a bid.
    * @param bidder Who is bidding for the lot.
    * @param value The value of the bid.
    public Bid(Person bidder, long value)
         this.bidder = bidder;
         this.value = value;
    * @return The bidder.
    public Person getBidder()
         return bidder;
    * @return The value of the bid.
    public long getValue()
         return value;
    package stan_bluej_ch4p90;
    * Maintain details of someone who participates in an auction.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Person
    // The name of this user.
    private final String name;
    * Create a new user with the given name.
    * @param name The user's name.
    public Person(String name)
         this.name = name;
    * @return The user's name.
    public String getName()
         return name;
    if I try to say
    LotObjectName.getHighestBid, I get a

    Dear EsoralTrebor,
    Thank you very much for an enlightening explanation.
    I had never tried to chain methods together before but it works !
    anObject.methodOfTheObjectClassThatReturnsAnObjectOfAnotherClass.
    methodOfTheObjectClassThatWasReturned();
    my output correctly states:
    The highest bid for the bicycle is 1510
    The highest bid for the lamp is 510
    The highest bid for the trailer is 900460
    Thank you !
    Stan
    ps tomorrow I need to study the showLots() method in the Auction class
    to figure out why that method is saying "No Bid" to everything
    Have a Good Thanksgiving !

  • EntrySet has private access in java.util.Hashtable

    Hi friends,
    While i try to retrieve the data from the hashtable through a JSP page, i'm getting the error saying "E:\Tomcat 5.0\work\Catalina\localhost\dd\org\apache\jsp\disp_jsp.java:55: entrySet has private access in java.util.Hashtable
    Iterator i = h.entrySet.iterator();
    For your reference the code goes like this,
    <% Hashtable h = (Hashtable) session.getAttribute("hash");
    Iterator i = h.entrySet.iterator();
    while(i.hasNext())
    %>
    <tr><td>
    <% String st = i.next().toString();
    String k[] = st.split("=");     
    out.println(k[0]); %>
    </td><td><%
    out.println(k[1]); %></td></tr><% } %>
    can anyone tell me how to get rid of this error quickly please.. Thanks in advance...
    Regards,
    Prakash.

    Iterator i = h.entrySet.iterator();Iterator i = h.entrySet().iterator();

  • HOW TO SET  VARIABLE WHEN METHOD HAS PRIVATE ACCESS ? ?

    Dear People,
    When I try to use an if then else statement the if part is not executed
    only the else
    if(highestBid != null)
    System.out.println( Bid is: + highestBid.getValue());
    else
    System.out.println(" (no bid) )";
    which can only mean that "highestBid is not being set
    but since "Class Lot" has a private method
    private void setHighestBid(Bid highestBid)
    this.highestBid = highestBid;
    the error message says:
    "TryAuction.java": Error method setHighestBid()
    has private access in class
    so how do I get a value to "highestBid" so the "if" statement
    will have a vaule for "highestBid ?
    the showLots() method in the Class "Auction" doesn't print out the bids !
    below are the classes
    thank you in advance
    Stan
    package stan_bluej_ch4p90;
    //Purpose of project: To demonstrate collections of objects
    //Version: 2001.05.31
    //How to start this project:
    // Create an Auction object.
    // Enter a few lots via its enterLot method. Only String
    // descriptions of the lots are required.
    // Create one or more Person objects to represent bidders.
    // Show the lots and select one to bid for.
    // Get the required Lot onto the object bench.
    // Enter a bid for the lot, passing the Person who is
    // bidding to the bidFor method.
    public class TryAuction
    public static void main(String[] args)
    //create the auction
    Auction cityAuction = new Auction();
    //create the lots for sale
    Lot bicycle = new Lot(1,"bicycle");
    Lot lamp = new Lot(2, "lamp");
    Lot trailer = new Lot(3, "trailer");
    //enter the lots into the city Auction
    cityAuction.enterLot("A bicycle in so so condition");
    cityAuction.enterLot("A brand new lamp");
    cityAuction.enterLot("A trailer built in 2001");
    //show the lots
    System.out.println();
    System.out.println("The first lot for sale: " + bicycle.getDescription());
    System.out.println("The second lot for sale: " + lamp.getDescription());
    System.out.println("The third lot for sale: " + trailer.getDescription());
    //create the people who will bid for the lots
    Person Steve = new Person("Steve");
    Person Maria = new Person("Maria");
    //create the people's bids
    Bid mariaLampBid = new Bid(Maria, 460);
    lamp.setHighestBid(mariaLampBid);
    Bid steveLampBid = new Bid(Steve, 510);
    //create the people's bids
    Bid mariaBicycleBid = new Bid(Maria, 1460);
    //bicycle.setHighestBid(mariaBicycleBid);
    Bid steveBicycleBid = new Bid(Steve, 1510);
    //create the people's bids
    Bid steveTrailerBid = new Bid(Steve, 700510);
    //trailer.setHighestBid(steveTrailerBid);
    Bid mariaTrailerBid = new Bid(Maria, 900460);
    //give the bids
    bicycle.bidFor(Maria,1460);
    bicycle.bidFor(Steve, 1510);
    System.out.println("The highest bid for the bicycle is " + bicycle.getHighestBid().getValue() );
    lamp.bidFor(Maria,460);
    lamp.bidFor(Steve,510);
    System.out.println("The highest bid for the lamp is " + lamp.getHighestBid().getValue() );
    trailer.bidFor(Steve, 700510);
    trailer.bidFor(Maria,900460);
    System.out.println("The highest bid for the trailer is " + trailer.getHighestBid().getValue() );
    System.out.println(" \nMaria's bicycle bid is : " + mariaBicycleBid.getValue() );
    System.out.println("Steve's bicycle bid is : " + steveBicycleBid.getValue() );
    System.out.println(" \nMaria's lamp bid is : " + mariaLampBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveLampBid.getValue() );
    System.out.println("\nSteve's trailer bid is : " + steveTrailerBid.getValue() );
    System.out.println(" Maria's trailer bid is : " + mariaTrailerBid.getValue() );
    System.out.println();
    cityAuction.showLots();
    //cityAuction.close();
    //The output I get is:
    //The first lot for sale: bicycle
    //The second lot for sale: lamp
    //The third lot for sale: trailer
    //The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    //Maria's bicycle bid is : 1460
    //Steve's lamp bid is : 1510
    //Maria's lamp bid is : 460
    //Steve's lamp bid is : 510
    //Steve's trailer bid is : 700510
    // Maria's trailer bid is : 900460
    //1: A bicycle in so so condition
    // (No bid)
    //2: A brand new lamp
    // (No bid)
    //3: A trailer built in 2001
    // (No bid)
    package stan_bluej_ch4p90;
    import java.util.*;
    //Ex4.14
    * A simple model of an auction.
    * The auction maintains a list of lots of arbitrary length.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Auction
    // The list of Lots in this auction.
    private ArrayList lots;
    // The number that will be given to the next lot entered
    // into this auction.
    private int nextLotNumber;
    * Create a new auction.
    public Auction()
         lots = new ArrayList();
         nextLotNumber = 1;
    * Enter a new lot into the auction.
    * Lots can only by entered into the auction by an
    * Auction object.
    * @param description A description of the lot.
    public void enterLot(String description)
         lots.add(new Lot(nextLotNumber, description));
         nextLotNumber++;
    * Show the full list of lot numbers and lot descriptions in
    * this auction. Include any details of the highest bids.
    public void showLots()
         Iterator it = lots.iterator();
         while(it.hasNext()) {
         Lot lot = (Lot) it.next();
         System.out.println(lot.getNumber() + ": " +
                   lot.getDescription());
         // Include any details of a highest bid.
         Bid highestBid = lot.getHighestBid();
         if(highestBid != null) {
              System.out.println(" Highest Bid: " +
                        highestBid.getValue());
         else {
              System.out.println(" (No bid)");
    * Return the lot with the given number. Return null
    * if a lot with this number does not exist.
    * @param number The number of the lot to return.
    public Lot getLot(int number)
         if((number >= 1) && (number < nextLotNumber)) {
         // The number seems to be reasonable.
         Lot selectedLot = (Lot) lots.get(number-1);
         // Include a confidence check to be sure we have the
         // right lot.
         if(selectedLot.getNumber() != number) {
              System.out.println("Internal error: " +
                        "Wrong lot returned. " +
                        "Number: " + number);
         return selectedLot;
         else {
         System.out.println("Lot number: " + number + " does not exist.");
         return null;
    // public void close()
    // Iterator i = lots.iterator();
    // while(i.hasNext())
    //     System.out.println("The winning amount for the " + bicycle.getDescription()
    //     + " is " + bicycle.getHighestBid());
    //     System.out.println("The winning amount for the " + lamp.getDescription()
    //     + " is " + lamp.getHighestBid());
    //     System.out.println("The winning amount for the " + trailer.getDescription()
    //     + " is " + trailer.getHighestBid());
    package stan_bluej_ch4p90;
    * A class that models an auction bid. The bid contains a reference
    * to the Lot bid for and the user making the bid.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Bid
    // The user making the bid.
    private final Person bidder;
    // The value of the bid. This could be a large number so
    // the long type has been used.
    private final long value;
    * Create a bid.
    * @param bidder Who is bidding for the lot.
    * @param value The value of the bid.
    public Bid(Person bidder, long value)
         this.bidder = bidder;
         this.value = value;
    * @return The bidder.
    public Person getBidder()
         return bidder;
    * @return The value of the bid.
    public long getValue()
         return value;
    package stan_bluej_ch4p90;
    * A class to model an item (or set of items) in an
    * auction: a lot.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Lot
    // A unique identifying number.
    private final int number;
    // A description of the lot.
    private String description;
    // The current highest bid for this lot.
    private Bid highestBid;
    * Construct a Lot, setting its number and description.
    * @param number The lot number.
    * @param description A description of this lot.
    public Lot(int number, String description)
         this.number = number;
         this.description = description;
    * Attempt to bid for this lot. A successful bid
    * must have a value higher than any existing bid.
    * @param bidder Who is bidding.
    * @param value The value of the bid.
    public void bidFor(Person bidder, long value)
         // We trust that lot is genuine. There is nothing to
         // prevent a spurious lot from being bid for, but it
         // would not appear in the auction list.
         if((highestBid == null) ||
         (highestBid.getValue() < value)) {
         // This bid is the best so far.
         setHighestBid(new Bid(bidder, value));
         else {
         System.out.println("\nLot number: " + getNumber() +
                   " (" + getDescription() + ")" +
                   " has a bid of: " +
                   highestBid.getValue());
    * @return The lot's number.
    public int getNumber()
         return number;
    * @return The lot's description.
    public String getDescription()
         return description;
    * @return The highest bid for this lot. This could be null if
    * there are no current bids.
    public Bid getHighestBid()
         return highestBid;
    * @param highestBid The new highest bid.
    private void setHighestBid(Bid highestBid)
         this.highestBid = highestBid;
    package stan_bluej_ch4p90;
    * Maintain details of someone who participates in an auction.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Person
    // The name of this user.
    private final String name;
    * Create a new user with the given name.
    * @param name The user's name.
    public Person(String name)
         this.name = name;
    * @return The user's name.
    public String getName()
         return name;

    Are you ready to kick yourself? The problem lies in the class Auction. You are using showLots() to print the lots, which you are trying to show the lot number, the description and the highest bid. But no there is no where in the class where you set the highest bid. In enterLot() you pass the description of the lot and it creates a new lot with the lot number and the description, but you don't give a bid. Then after the bids are done you do not update Auction to reflect the bids. Let the kicking commence. :-)

  • Don't understand private access error message.

    I am calling createAndShowGui from another file and am getting an error message from the compiler that says:
    createAndShowGUI has private access in masterfilemaint.MasterFileMaint.
    I don't understand because the method is public. Here is the call.
    thanks.
        public void actionPerformed(ActionEvent e) {
            if ("Fil".equals(e.getActionCommand())) {   ///  The Call......
                   callItemMaint.createAndShowGUI();
                if ("Tab".equals(e.getActionCommand()))  {
                   callSimpleTableDemo.createAndShowGUI();   
                if ("Quit".equals(e.getActionCommand())) {
                   quit();
                /*else {
                  quit();
        }       ..............And here is the method.
           public void createAndShowGUI() {// was static
            // set decor
            JFrame.setDefaultLookAndFeelDecorated(true);
            // create/set-up window
            JFrame frame = new JFrame("Guide");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // set up content pane.
            addComponentsToPane(frame.getContentPane());
            // Display window
            frame.pack();
            frame.setVisible(true);
    }

    Is the createAndShowGUI in a public class?
    Yes here is the first few lines of the class:
    package masterfilemaint;
    import java.awt.*;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JLabel;
    import javax.swing.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class MasterFileMaint {                //   Class is public .........
        final static boolean shouldFill = true;
        final static boolean shouldWeightX = true;
        final static boolean RIGHT_TO_LEFT = false;
        final static boolean DEBUG = false;
        public JTextField textFieldOne, textFieldTwo,
                             textFieldThree, textFieldFour, textFieldFive;
        public JLabel label;
        public JButton button;
        public String one, two, three, four, five, six;
        Is callItemMaint an instance of that class or an instance of a base class or interface?
    callitemMaint is an instance of MasterFileMaint instantiated in the calling class. Here is the first few lines of MaterFileMaint.
    package probuyermain;
    import CalculatorOne.*;
    import simpletabledemo.*;
    import masterfilemaint.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JMenu;
    import javax.swing.JMenuItem;
    import javax.swing.JCheckBoxMenuItem;
    import javax.swing.JRadioButtonMenuItem;
    import javax.swing.ButtonGroup;
    import javax.swing.JMenuBar;
    import javax.swing.KeyStroke;
    import javax.swing.ImageIcon;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    import javax.swing.JScrollPane;
    import javax.swing.JFrame;
    public class ProBuyerMain implements ActionListener {
        JTextArea output;
        JScrollPane scrollPane;
        MasterFileMaint callItemMaint = new MasterFileMaint();        // The instance
        CalculatorOne callCalculator = new CalculatorOne();
        SimpleTableDemo callSimpleTableDemo = new SimpleTableDemo();
        public JMenuBar createMenuBar() {
            JMenuBar menuBar;
            JMenu fileMenu, submenu;
            JMenuItem menuItemOne, menuItemTwo,
                        menuItemThree, menuItemFour, menuItemFive;
            //Create the menu bar.
            menuBar = new JMenuBar();

  • Private access

    I have a abstract class Point with one field : xValue declared as private.
    I defined a getXvalue() method
    then I made a subclass of point with a new field yValue
    my getXvalue() methaod looks as follows:
    public double getXvalue() {
    return this.xValue;
    I get following error:
    TwoDimPoint.java [28:1] xValue has private access in Point
    return this.xValue;
    ^
    1 error
    Errors compiling.
    please help
    thx

    So how can I guarantee that my xValue is safe against
    against outside access and keep my Class hierarchy
    abstract class Point{private xValue }
    class D2Point extends Point{ private yValue}
    class D3Point extends D2Point{ private zValue}
    For exemple I want a to access the xValue from a D2Point
    so I need to call super.getXvalue()
    but it is abstract
    How can I solve the Problem ?
    should I make a fourth class which is th super class of all others
    and declare Point as public?
    thx

  • Cisco SB RV110W has Dual Access(Russian PPPOE) or not?

    Hello community.
    My English is not good, but I need your help.
    Not long ago I bought Cisco SB RV100W(firmware v.1.1.0.9) and have some problem with his maintenance.
    When router connected in router mode, it does not define a local network on the Wan port.
    In gateway mode router connected to the Web, but not defined local network.
    So, I want to ask, this router has Dual Access(Russian PPPOE) or not ?
    Maybe, newer firmware(1.2.0.9) have this opportunity ?
    Thanks in advance for all possible answers to this question.

    Hi Alex,
    Not sure that I understand the question.
    But this router has only Single WAN interface.  If you want a dual WAN then RV016,  RV042, VR082 or SA500 should work for you.  Those models support dual WAN capabilities.
    Russian PPPoE or any other country should not be matter as long as the model of the device is supported by country.  By model I mean SKU.  Basically, if you got it in Russia, that that device should work just fine and it seems it is.
    Now, if you connecting this router to your ISP (Internet Service Provider) modem then this router should be in the gateway mode.  Router will separate WAN domain (Public IP) from LAN (private IP)
    If you want Public IP(s) for your LAN devices, you can get a switch and put between ISP modem and router.  But be sure to get a Public Static IPs from your ISP.  This way your router will use one public IP and devices that connected to the switch can also have static IP(s)
    Hope that helps.
    Alena
    Cisco SB Engineer
    CCNA, CCNA Wireless

  • User has contribute access but he is not able to access the site collection...

    User has contribute access but he is not able to access the site collection...

    What error does he get.
    Can you share fiddler trace(check if any 404 error)
    what error do we see in ULS Logs
    Create disableloopback
    registry on server
    http://support.microsoft.com/kb/926642/en-us

  • How to find from the data dict if a user has read access on a directory

    How to find "dynamically" if a user has READ access to a directory object.
    I want to know if there is a data dictionary table that holds if a user/schema has read access to a directory object.
    I know there is an dba_directories table and an all_directories table but they dont give information as to which user has read access granted to the directory.

    Not so difficult.
    select  'YES'
       from all_tab_privs A, all_directories B
       where a.grantee = 'USERNAME'
           and a.table_name = b.directory_name
           and b.directory_path = 'PATH YOU ARE LOOKING FOR'
    How to find "dynamically" if a user has READ access to a directory object.
    I want to know if there is a data dictionary table that holds if a user/schema has read access to a directory object.
    I know there is an dba_directories table and an all_directories table but they dont give information as to which user has read access granted to the directory.

  • Am I able to find out how many times my ICloud account has been accessed?

    Am I able to find out how many times my ICloud account has been accessed?

    I'm afraid iCloud doesn't provide access logs.

  • SQL Server Agent running SSIS package fails Unable to determine if the owner of job has server access

    I have a web application developed through VS 2012 which has a button on a form that when operated starts a SQL Server agent job on the server that runs an SSIS package.  The website and the instance of SQL Server with the agent and SSIS package are
    on the same windows 2008 r2 server.  When the button is operated no exceptions are raised but the SSIS package did not execute.
    When I look in the logfileviewer at the job history of the sql server agent job I see that the job failed with message...
    The job failed.  Unable to determine if the owner (DOMAINNAME\userid) of job runWebDevSmall has server access (reason: Could not obtain information about Windows NT group/user 'DOMAINNAME\userid'<c/> error code 0x6e. [SQLSTATE 42000] (Error 15404)).,00:00:00,0,0,,,,0
    ...even though DOMAINNAME\userid is in the logins for the sql server and has admin authorities.
    Could someone show me what I need to do to get this to run?  Thanks tonnes in advance for any help, Roscoe

    This can happen when the network is too slow to allow a timely completion of the verification. Or the account running has no such right.
    I suggest you try using the SA account for the job as it does not require to poll the AD.
    Arthur My Blog

  • My ipod has been accessed from another ipod and now it won't let me download anything what do i do

    my ipod account has been accessed from another ipod and now it won't let me download anything...What Do I do?

    Not sure what you are talking about.
    Your ITUNES account can be accessed from any device or computer that has itunes, as long as you have your username and password.  Using your itunes account from another device does not affect your ability to use the account from your device.
    What is the issue?
    You tried to do what?
    And what was the result?
    Error message?
    What did it say?
    What have you tried?

  • Error on upload file (User has no access to upload files) [jdev 11.1.1.3]

    Hello to all,
    I wrote this simple servlet:
    import weblogic.management.servlet.MultipartRequest;
    public class SaveImage extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
    String rtempfile = File.createTempFile("temp","1").getParent();
    MultipartRequest mpr = new MultipartRequest(request,rtempfile);
    Enumeration files= mpr.getFileNames();
    while (files.hasMoreElements()){
    String fileName = (String)files.nextElement();
    File file = mpr.getFile(fileName);
    When I try to upload the image I receive this error:
    java.lang.RuntimeException: User has no access to upload files
    at weblogic.management.servlet.MultipartRequest.(MultipartRequest.java:169)
    at weblogic.management.servlet.MultipartRequest.(MultipartRequest.java:119)
    at edu.uniud.ai.servlet.SaveImage.doGet(SaveImage.java:59)
    at edu.uniud.ai.servlet.SaveImage.doPost(SaveImage.java:112)
    Any idea where I make the mistake?
    Cristian

    The column types are correct. I double checked, but also I used the Business Components from Tables wizard to generate the EOs.
    I think the problem might be because JDev is set to use UTF8
    All of our tables are defined like:
    create table junk (col1 varchar2(10 BYTE));
    Notice the BYTE in the Varchar2. In all tables, ADF seems to throw the above error on ALL updates.
    Any ideas?

  • Is the instance fields have private accessibility in String class?

    Is the instance fields have private accessibility in an immutable class, such as the String class?
    also Could any one answer the following question,
    (This is the question I got in written exam for job recruitment)
    "Invoking a method can represent a significant amount of overhead in a program; as such, some compilers will perform an optimization called "method inlining." This optimization will remove a method call by copying the code inside the method into the calling method."
    Referring to the text above, which one of these statements is true?
    Choice 1 The performance benefits should be balanced against the increased chance of a RuntimeException.
    Choice 2 It allows the use of getter and setter methods to execute nearly as fast as direct access to member variables.
    Choice 3 This optimization will only occur if the relevant methods are declared volatile.
    Choice 4 The developer of inlined methods must copy and paste the code that is to be inlined into another method.
    Choice 5 It prevents code from executing in a way that follows object-oriented encapsulation.

    Sarwan_Gres wrote:
    Is the instance fields have private accessibility in an immutable class, such as the String class?Usually, but not always.
    "Invoking a method can represent a significant amount of overhead in a program; as such, some compilers will perform an optimization called "method inlining." This optimization will remove a method call by copying the code inside the method into the calling method."The java compiler does not inline methods so this is not relevant to Java. (The JVM does inline methods) The java compiler does inline constants known at compile time but it is a feature causes more trouble than good IMHO.

  • FTP_CONNECT: User ------- has no access authorization for computer -------.

    Hi, could anyone please help me resolve the following issue:
    When i run the code below, it comes back saying "could not connect to "host". When tried to run in debug or test the FM "ftp_connect" it says "user ..... has no access authorization for computer .....
    REPORT  ZALB_FTP_TEST.
    types: begin of t_ftp_data,
             line(132) type c,
           end of t_ftp_data.
    data: lv_ftp_user(64)                value 'branch'.     "change this
    data: lv_ftp_pwd(64)                 value 'careful'. "change this
    data: lv_ftp_host(50)                value '10.50.1.199'.     "change this
    data: lv_rfc_dest like rscat-rfcdest value 'SAPFTP'.
    data: lv_hdl    type i.
    data: lv_key    type i               value 26101957.
    data: lv_dstlen type i.
    data: lt_ftp_data type table of t_ftp_data.
    field-symbols: <ls_ftp_data> like line of lt_ftp_data.
    *describe field lv_ftp_pwd length lv_dstlen.
    lv_dstlen = strlen( lv_ftp_pwd ).
    call 'AB_RFC_X_SCRAMBLE_STRING'
      id 'SOURCE'      field lv_ftp_pwd
      id 'KEY'         field lv_key
      id 'SCR'         field 'X'
      id 'DESTINATION' field lv_ftp_pwd
      id 'DSTLEN'      field lv_dstlen.
    call function 'FTP_CONNECT'
      exporting
        user            = lv_ftp_user
        password        = lv_ftp_pwd
        host            = lv_ftp_host
        rfc_destination = lv_rfc_dest
      importing
        handle          = lv_hdl
      exceptions
        not_connected   = 1
        others          = 2.
    if sy-subrc ne 0.
      write:/ 'could not connect to', lv_ftp_host.
    else.
      write:/ 'connected successfully. session handle is', lv_hdl.
      call function 'FTP_CONNECT'
        exporting
          handle        = lv_hdl
          command       = 'dir'
        tables
          data          = lt_ftp_data
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          others        = 4.
      if sy-subrc ne 0.
        write:/ 'could not execute ftp command'.
      else.
        loop at lt_ftp_data assigning <ls_ftp_data>.
          write: / <ls_ftp_data>.
        endloop.
        call function 'FTP_DISCONNECT'
          exporting
            handle = lv_hdl
          exceptions
            others = 1.
        if sy-subrc ne 0.
          write:/ 'could not disconnect from ftp server'.
        else.
          write:/ 'disconnected from ftp server'.
        endif.
      endif.
    endif.
    Thanks in advance for the help.

    It doesn't work for me if I just maintain * entry.
    But it works after I maintained specific IP address into the table,
    ref notes:2072995 - User has no access authorization for computer
    Cause
    The message comes after the implementation of note '1605054 - Restriction in access to FTP Servers & usage of test reports' or upgrading to a
    support package that contains this note. This note was created to prevent malicious users from accessing remote FTP servers.
    Resolution
    1. Please ensure that all manual steps from note 1605054 are implemented in your system along with the code corrections
    2. Then please enter the allowed FTP servers into the table SAPFTP_SERVERS or enter ‘*’ to allow all FTP servers.

Maybe you are looking for