Can compile but cannot run.

Dear Java Guru,
Wish to find out why I can compile but cannot run. I encounter the following error: 'Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/JAI
at saveasone.<init>(saveasone.java:29)
at saveasone.main(saveasone.java:21)'
This does not happen on one PC but happened on another PC.
The one can compile is XP, the other which cannot compile is Win2k Professional. Is there any other possible cause ?
Please advise.

The problem probably lies in the Classpath. I think you are using different environments for compiling and running. If you are using an IDE for developing your code, you might have set the classpath correctly there but not in the executing environment. As about the OS's you mentioned, I think the problem is still with your Environment Settings than OS settings.

Similar Messages

  • CAN COMPILE BUT CANNOT RUN PROGRAM

    I am finally able to compile my program, I have the extensions .class, when I try to run the program I get an error message "main"java.lang.noclassdef
    after message appears after I type java Saluton or whatever program I am trying to run.
    Any suggestions, someone justed I use textpad, but I don't think this has anything to do with not being able to run programs, I am using windows 98 second edition.

    This is a CLASSPATH problem.
    For example, if your .class file is in the directory C:\javaclasses then you would set the CLASSPATH environment variable to that using:
    set CLASSPATH=C:\javaclasses
    Add this to your autoexec.bat and reboot so you don't have to type this every time you open a DOS prompt.
    You may want to add the current directory, ., to the list of directories (use ; to separate directories).
    set CLASSPATH=.;C:\javaclasses
    If your class is part of a package, you have to use the directory that is the parent of the packages' directories.

  • I can compile but not run ...

    Exception in thread "main" java.lang.NoClassDefFoundError: VierOpEenRij
    I can Compile my file VierOpEenRij.java , then it creates his .class but when I try to open it ( java VierOpEenRij ) then it says this error.
    anyone has an Idea how come , cause I really need it for school !!
    Thx

    No it still doesn't work ..
    If using -cp . does not work (don't forget the spaces), then either VierOpEenRij.class file does not exist in the current directory or the class inside the VierOpEenRij.class file is not named VierOpEenRij
    I don't know how , It used to work but now it just
    fails :(
    is it possible that i Intalled something that
    interrupte the proces ?Anything is possible.

  • JavaService - can install java program into win2k service, but cannot run

    i have a JavaService problem: i can install java program into win2k service, but cannot run
    the version of javaservice is 2.0.7.0
    the following is the message:
    C:\DailyUpdate\dist>JavaService.exe -install DailyUpdate C:\Program Files\Java\j
    dk1.5.0_05\jre\bin\client\jvm.dll -Djava.class.path=C:\DailyUpdate\dist\ftpbean.
    jar;C:\DailyUpdate\dist\mysql-connector-java-3.0.10-stable-bin.jar;C:\DailyUpdat
    e\dist\DailyUpdater.jar -Xms16M -Xmx64M -start DailyUpdateHandler -params C:\Dai
    lyUpdate\dist -out C:\DailyUpdate\dist\logs\out.log -err C:\DailyUpdate\dist\lo
    gs\err.log
    The DailyUpdate automatic service was successfully installed
    The DailyUpdate service is starting.
    The DailyUpdate service could not be started.
    The service did not report an error.
    More help is available by typing NET HELPMSG 3534.

    I might be doing some programming for my company soon
    which will require a program to monitor a database
    and whenever there is a change to certain fields, it
    must copy certain fields into another database. When I see "whenever thiere is a change to certain fields" I tend to think "triggers" - but maybe this won't work for you 'cause of the "another database" part. And the fact that triggers are inherently evil.
    [snip]
    Is it possible to run a Java program as a windows
    service? And if so then how would you go about it? I'd hit Google - there're a couple ways to do this.
    [snip]
    Also,...if I were to use one of those programs which
    can make an .exe of a Java program, then do you still
    require the JRE to be on the machine? It depends on how you did the conversion. If you compile to native then no, if you just wrap up a JRE then yes.
    Why I ask is
    that I occasionally get asked to do small development
    projects for my company, but we are a microsoft
    partner and therefore do all the development in C#
    and the like. So I would like to just implement as
    many things in Java as I can, just to show everyone
    that Java can do exactly what C# can do. But its
    difficult to convince people of this since I always
    require the JRE and they dont. Of course, they require the .NET framework and you don't. And last I looked that thing was around 23 Meg.

  • My B+Tree can compile but have runtime error ... i can't tink why ...

    Sorry to bother anyone ... i have spent almost 3 weeks trying to debug the problem...
    My B+ Tree can compile but can't run as it throw invalid Null pointer Exception ..
    I suspected the error is in the split (int order ) method in the BTreeNode class but i can't remedy for it
    This my program code
    public class BTree {
    * The order of the B-Tree. All nodes of the B-Tree can store up to 2*order key values.
    private int order;
    * The number of key (with associated data values) stored in the B-Tree.
    private int count;
    * The root node of the B-Tree
    private BTreeNode root;
    * The first leaf node in the B-Tree. This field is used to give the starting point for sequential
    * access to the keys and data stored in the leaf nodes.
    private BTreeNode first;
    * The last leaf node in the B-Tree. This field is used to give the starting point for reverse
    * sequential access to the keys and data stored in the leaf nodes.
    private BTreeNode last;
    * A change count that can be used to invalidate iterators. This field is updated whenever a key plus data pair
    * is added to the B-Tree (or the data associated with a key is changed), or when a key plus data pair are
    * deleted from the B-Tree.
    private int changeCount = 0;
    // WHEN DOING ASSIGNMENT 5, DO NOT ADD ANY ADDITIONAL FIELDS TO THIS CLASS
    // You will loose marks if you add additional fields to this class. The fields above are all that
    // you need. If you need a variable in a method, use a local variable. I have seen too many
    // assignments where students add fields rather than create local variables. Hopefull the threat
    // of loosing (quite a few) marks will help reduce this habit.
    * A general exception class for errors when constructing or manipulating a B-Tree. Use the string
    * parameter to the constructor to say what the error really is.
    public class BTreeError extends RuntimeException {
    public BTreeError(String reason) {
    super(reason);
    * A constructor that creates an empty B-Tree of the given order.
    * <p/>This is the only constructor provided at the moment for this BTree class. Could consider
    * adding the equivalent of a 'copy constructor' that creates a new BTree object from an existing
    * BTree object.Constructor
    * creates the root of a btree
    * A constructor that creates an empty B-Tree of the given order.
    * <p/>This constructor need to copy the order parameter to the field of same name, and initialise the
    * root, cound, first and last fields of the BTree object.
    * @param order The order of the BTree.
    public BTree(int order) {
    count = 0;
    this.order = order;
    root = new BTreeNode(true, null, -1, null, null);
    first = root;
    last = root;
    * A method to return a SequentialIterator object that is positioned just before the first key
    * of the BTree object.
    * <p/>Do not modify this method.
    * @return A SequentialIterator object.
    public SequentialIterator iterator() {
    return new BTreeIterator();
    * A mehtod to return a SequentialIterator object that is positioned at a key found through a call
    * to the searchFor() method.
    * <p/>Do not modify this method.
    * @param position A SearchPosition() object that usually has been returne by a call to the searchFor() method.
    * @return A SequentialIterator object initialised to start at particular key in the BTree.
    public SequentialIterator iterator(SearchPosition position) {
    return new BTreeIterator(position);
    * A method to return a string representationo the BTree.
    * <p>The format of the string is:
    * <pre>BTree: Order=<digits>, size=<digits>, root=<BTreeNode string></pre>
    * <p/>Do not modify this method.
    * @return A string to represent the BTree
    public String toString() {
    StringBuffer s = new StringBuffer("BTree: Order=");
    s.append(order).append(", size=").append(size()).append(", root=").append(root.toString());
    return s.toString();
    * Method to determine the number of records stored in the B-Treee.
    * <p/>Do not modify this method
    * @return the number of records in the B-Tree.
    public int size() {
    return count;
    * method to return the order of the B-Tree.
    * <p/>
    * <p>This is the smallest number of key values for all nodes
    * except the root node. The maximum number of key values in a node is 2*order, and the maximum number
    * of child nodes for a node is 2*order+1.
    * <p/>Do not modify this method.
    * @return The order of the B-tree.
    public int order() {
    return order;
    * Insert a key plus data value into the BTree.
    * <p/>This method needs to locate the leaf node in which the key + data value should be
    * inserted, and then call the insertLeaf() method of BTreeNode to do the insertion.
    * <p/>This method will always result in a change to the BTree, so it should increment
    * the change count.
    * <p/>The method may result in only the data associated with an existing ke being changed,
    * so incrementing the count field should be done in the BTreeNode method (if needed).
    * <p/>This is one of the method you need to complete for assignment 5.
    * @param key The key associated with the data value to be added to the B-Tree
    * @param data The data value to be added (with it's associated key) to the B-Tree.
    public void add(Comparable key, Object data) {
    // you need to add the code for this method
    // i added
    BTreeNode btNode = root;
    while (!btNode.isLeaf) {
    int i=0;
    while(key.compareTo(btNode.keys) > 0) {
    i++;
    if (i == btNode.numberOfKeys) break;
    btNode = btNode.childNodes[i];
    btNode.insert(key,data);
    if (root.numberOfKeys == order*2-1) root.split(order);
    * insert a object with the given key into the tree
    //KeyNode keyNode = new KeyNode(key, data);
    // BTreeNode keyNode = new BTreeNode(key,data);
    BTreeNode btNode = root;
    while (!btNode.isLeaf) {
    int i=0;
    while(key.compareTo(btNode.key(i)) > 0) {
    i++;
    if (i == btNode.numberOfKeys())
    break;
    btNode = btNode.child(i); }
    System.out.println("hmm1");
    btNode.insert(key,data );
    System.out.println("hmm2");
    if (root.numberOfKeys == order*2-1)
    System.out.println("hmm3");
    root.split(order);
    System.out.println("hmm4");
    * This method searches the B-Tree for an occurence of the key in a leaf node and returns the result
    * of the search in a SearchPosition object.
    * <p/>Note that the key may occur in an interior node of the BTree without occuring in the leaf
    * nodes. This can be the result of a deletion operation. This method need to search down to the
    * leaf node that should contain the key if the key and associated data is in the B-Tree, and then
    * scan through the keys in the leaf node for the search key.
    * <p/>The result of the search is returned as a SearchPosition object, as this allow the return
    * of the success or failure of the search, as well as the data belonging to the key. It also
    * allows position information to be returned so that an interator can be initialised with the
    * key as the starting position for subsequent sequential access to adjacent keys.
    * <p/>This is one of the method you need to implement.
    * <p/>Implementation nodes:<br>
    * You need to find the leaf node that may contain the key (same code as for add()), then
    * scan the leaf BTreeNode for the search tree. You can do this within this method, as you
    * have total access to the fields and methods of BTreeNode (as BTreeNode is an inner class
    * of BTree). If you find the key, construct and return a SearchPosition object with the appropriate
    * details of the position, otherwise construct add return a SearchPosition object that indicates the
    * search failed.
    * @param key The key to search for in the BTree
    * @return A SearchPosition object returning the data and position information for the search
    public SearchPosition searchFor(Comparable key) {
    // You need to add the code for this method. The code below simply creates a
    // SearchPosition object which indicates an unsuccessful search.
    return new SearchPosition(false, null, -1);
    * A method to delete a node from the BTree.
    * <p/>The method should return the data object that was deleted when the key plus data object pair
    * are deleted from the B-tree.
    * <p/>The method should throw a BTreeError exception (with an appropriate reason string) if the
    * key is not found in the B-tree.
    * <p/>This is a method you can implement for bonus marks in Assignment 5.
    * <p/>Implementation notes:<br>
    * The easiest way to proceed is to use searchFor() to determine if they key is in the BTree, and
    * (if it is in the B-tree) to return position information about the key. Throw an exception if the
    * key is not in the B-tree, otherwise keep a copy of the data assocaited with the key (to return),
    * then for the leaf node containing the key (a BTreeNode object), call the deleteLeafNodeKey() method,
    * passing across the leaf key index of the key (so you don't have to find it again in the leaf node).
    * After this method deletes the key, return the data you saved as the method result.
    * @param key The key to delete (along with it's associated data) from the B-tree.
    * @return The data associated with the key that was deleted.
    public Object delete(Comparable key){
    // You need to add the code for this method.
    return null;
    * The inner class BTreeNode is used to represent the nodes in the B-Tree.
    * <p/>The nodes in the BTree are of two types:
    * <ol>
    * <li>Leaf nodes that contain the keys and associated data values, stored in ascending key order.<br>
    * These leaf nodes have next and previous pointers to adjacent leaf nodes to allow an easy
    * implementation of an iterator class to provide bi-directional sequential access to the keys stored
    * in the BTree nodes.
    * <li>Interior nodes that contain keys and links to child nodes (that are either all internal nodes
    * or all leaf nodes), organised as the node of a multi-way search tree. The interior nodes have
    * one more child node link than keys. The child node link at index k is to a node with keys that
    * are all less than the key at index k in this node. The link at index k+1 is to a child node
    * with keys that are all greater than or equal to the key at index k.
    * </ol>
    * The BTreeNode class allows you to create these two 'types' of nodes, depending on the parameters
    * passed to the constructor.
    * <p/>There are methods that should only be called for leaf nodes and methods that should only be
    * called for interior nodes. These methods should throw an exception if called by the wrong node
    * type. This class should really be designed using inheritance to mimic the pascal/C++ variant
    * record structure, but this design is relatively easy to understand and to implement.
    * <p/>Note that this class is an inner class of BTree, and so all objects will have an implict
    * reference to the BTree container object. This class has direct access to all the fields of the
    * BTree contaner object. In particular, the order of the BTree is available, hence this class
    * does not need to keep a copy of the order as a field.
    * <p/>Skeleton class provided for Objects and Algorithms Assignment 5
    * <p/>Only modify the methods where the JavaDoc indicates that you need to provide code.
    * @author a.sobey
    * @version 1.0
    * Date: 16/05/2005
    public class BTreeNode {
    * The actual number of key values stored in the BTreeNode. <br>Note that the BTree node has an implicit
    * reference to the containing BTree object, and the maximum number of nodes that can be stored in a
    * a BTreeNode (except temporarily during the split operation) is twice the <i>order</i> of the BTree.<br>
    * This field is valid for both internal and leaf nodes.
    private int numberOfKeys = 0;
    * The array of pointers to child nodes of this node. Only <i>(numberOfKeys+1)</i> are valid if <i>numberOfKeys</i>
    * is non-zero.<br>
    * This array is only valid and created for internal nodes - this array is not created for leaf nodes.<br>
    * There is space in the array created for one additional child node link - this makes the coding for
    * splitting of an internal node easier to implement.
    private BTreeNode[] childNodes;
    * A reference to the parent node of this node.<br>
    * This link is null if this node is the root node of the tree of BTreeNodes.<br>
    * This node is valid for both internal and leaf nodes.
    private BTreeNode parent;
    * The index in the parent node's array of links (the <i>childNodes</i> array) for the link to this node.<br>
    * This value should be set to -1 if this node is the root node (and so has no parent node).<br>
    * This field is valid for both internal and leaf nodes.
    private int parentIndex;
    * A link to the next leaf node in the B-tree, provided to allow easy sequential access of the keys
    * and values stored in the B-tree.<br>
    * This field is only valid if the node is a leaf node. For non-leaf nodes set the value to null.<br>
    * For leaf nodes, set the value to null if this node is the last leaf node in the B-tree.
    private BTreeNode next;
    * The link to the previous leaf node in the B-tree, provided ot allow easy reverse sequential access of the keys
    * and values stored in the B-Tree.<br>
    * This values should be set to null if this node is a leaf node but is the first leaf node in the B-Tree, or
    * if this node is not a leaf node.<br>
    * This field is only used in leaf nodes.
    private BTreeNode previous;
    * An array of comparable key objects that are stored in this node of the B-tree.<br>
    * Only the first <i>numberOfKey</i> values in the array are valid.<br>
    * The maximum number of keys in a node is 2*<i>order</i>, however there is space in this array
    * for one additional value to make the coding of the node splitting operation easier to implement.<br>
    * This field is valid for both internal and leaf nodes.
    private Comparable[] keys;
    * An array of data values associated with the keys stored in this leaf node of the B-tree.<br>
    * Only the first <i>numberOfKey</i> values are valid.<br>
    * The maximum number of data values in a node is 2*<i>order</i>, however there is space in this array
    * for one additional value to make the codingof the leaf node splitting operation easier to implement.<br>
    * This field is only valid for leaf nodes - for interior nodes this array is not created.
    private Object[] data;
    * A boolean value to indicate if the node is a leaf node or not. The structure of the remainder of the node
    * depends on this value (would be nice to have variant records in Java ...).<br>
    * This field is valid for both leaf and internal nodes.
    private boolean isLeaf;
    private int order;
    * The constructor for a BTreeNode.
    * <p/>The code for the constructor is provided - do not modify this constructor.
    * @param isLeaf True if this node is a leaf node.
    * @param parent A link to the parent node or null if this node is the root node of the B-Tree
    * @param parentIndex The index of the link in the array of child node linkes in the parent node that points to this node.
    * @param previous A link to the previous leaf node for sequentail access, or null if not a leaf node or no previous leaf nodes.
    * @param next A link to the next leaf node for sequential access, or null if not a leaf node or the last leaf node.
    public BTreeNode(boolean isLeaf, BTreeNode parent, int parentIndex, BTreeNode previous, BTreeNode next) {
    this.parent = parent;
    this.parentIndex = parentIndex;
    this.previous = previous;
    this.next = next;
    this.isLeaf = isLeaf;
    if (isLeaf)
    data = new Object[2 * order + 1];
    else
    childNodes = new BTreeNode[2 * order + 2];
    keys = new Comparable[2 * order + 1];
    public BTreeNode( int order, BTreeNode parent)
    this.order = order;
    this.parent=parent;
    this.keys = new Comparable[2*order-1];
    this.data = new Object[2*order-1];
    this.childNodes=new BTreeNode[2*order];
    this.isLeaf=true;
    * Returns the number of keys in this BTreeNode. Note that within the code in BTree you have access
    * to all the fields of BTreeNode, so this method is not strictly necessary.
    * @return The number of keys in this BTreeNode object.
    public int numberOfKeys() {
    return numberOfKeys;
    * Returns the container BTree object for this BTreeNode object. You may like to check that container objects
    * are the same when manipulating two BTreeNode objects.
    * @return the containing BTree object.
    public BTree container() {
    return BTree.this;
    * A private method to return a string representation of the array <i>keys</i>. This method is used in
    * the toString() method for this class.<br>
    * Do not modify the code provided for this method.
    * @return A string representation of this nodes array of keys.
    private String keyString() {
    StringBuffer s = new StringBuffer("{");
    for (int index = 0; index < numberOfKeys; index++)
    s.append(index > 0 ? "," + keys[index] : keys[index]);
    return s.append("}").toString();
    * A private method to return a string representation of the array of data values stored in a leaf node.<br>
    * This method is used in the toString() method of BTreeNode. The method does not check if this node is a
    * leaf node, as it is not intended to be called directly from outside of this class, and the toString()
    * method only calls this method if the node is a leaf node.<br>
    * Do not modify the provided code for this method.
    * @return a string representation of the data values array of a BTreeNode.
    private String dataString() {
    StringBuffer s = new StringBuffer("(");
    for (int index = 0; index < numberOfKeys; index++)
    s.append(index > 0 ? "," + data[index] : data[index]);
    return s.append(")").toString();
    * A private method to return a string prepresentation of the array of child node links in an interior node.<br>
    * This method is used in the toString() method. This method does not check if this node is an interior
    * node, so you must take care to only call this method for interior nodes.<br>
    * Do not modify the provided code for this method.
    * @return A string representation of the array of child nodes of this BTreeNode.
    private String childString() {
    StringBuffer s = new StringBuffer("<");
    for (int index = 0; index < numberOfKeys + 1; index++)
    s.append(childNodes[index] + (index == numberOfKeys ? "" : ","));
    return s.append(">").toString();
    * The toString method provides a string representation of a BTreeNode.<br> This particular method does not
    * include the details of all the fields of a BTreeNode. While debugging your code, you may like to include
    * more information (such as the parentIndex value), but in your final submission you must have the code
    * as provided in the skeleton BTreeNode class provided to you.
    * @return A string representation of a BTreeNode.
    public String toString() {
    if (isLeaf)
    return (new StringBuffer("[")).append(numberOfKeys)
    // .append(',').append(parentIndex) // uncomment this line if need to check parentIndex values
    .append(',').append(keyString()).append(',').append(dataString()).append(']').toString();
    else
    return (new StringBuffer("[")).append(numberOfKeys)
    //.append(',').append(parentIndex) // uncomment this line if need to check parentIndex values
    .append(',').append(keyString()).append(',').append(childString()).append(']').toString();
    * Returns the key with the given index in this node. Throws a BTreeError exception if the index is not valid.<br>
    * Do not modify this provided code.
    * @param index The index of the key.
    * @return The key value at the given index.
    public Comparable key(int index) {
    if (index < 0 || index >= numberOfKeys)
    throw new BTreeError("Key index out of range - value = " + index);
    return keys[index];
    * Returns the child node at the provided index into the childNodes array.<br>
    * A BTreeError exception is thrown if the node is not an internal
    * node or if the index is not valid.
    * <p/>Note that the child node returned will have keys that are all less than the key stored
    * in the <i>keys</i> array of this node at the given index value (except the last childNode
    * at index numberOfkeys, as this node has keys that are all greater than or equal to the last
    * key value stored in this node).<br>
    * Do not modify the provided code for this method.
    * @param index The index into the array of child nodes for this internal BTreeNode object.
    * @return The child node link.
    public BTreeNode child(int index) {
    if (isLeaf) throw new BTreeError("child() called for a leaf node");
    if (index < 0 || index > numberOfKeys)
    throw new BTreeError("Child node index out of range - value = " + index);
    return childNodes[index];
    * Returns the data value associated with the key at the given index. An BTreeError exception is thrown if the
    * node is not a leaf node or if the index is invalid.
    * <p/>Do not modify the provided code for this method.
    * @param index The index of the key assocaited with the data value.
    * @return The data value associated with the key with given index.
    public Object data(int index) {
    if (!isLeaf) throw new BTreeError("data() called for an internal node");
    if (index < 0 || index >= numberOfKeys)
    throw new BTreeError("Data index out of range - value = " + index);
    return data[index];
    * This method is used to determine if this node is a leaf node.
    * @return True if this node is a leaf node.
    public boolean isLeaf() {
    return isLeaf;
    * Inserts the (key, data) pair into this BTreeNode object.
    * <p/>You must supply the code for this method.
    * <p/>Implementation notes:<br>
    * <ol>
    * <li>Throw an exception if this node is not a leaf node.
    * <li>Scan the keys array for index of the key greater than or equal to the insertion key.
    * <li>If the key at the index is equal to the insertion key, update the data field and return - you are done.
    * <li>Otherwise shuffle the keys values from the insertion index along to make a hole for the insertion key,
    * and insert the insertion key into the keys array. Do the same for the data array values to insert the
    * new data value into the data array at the insertion index.
    * <li>increment the number of keys, and increment the container BTree object's count field.
    * <li>If the number of keys in the node is now no more than 2*order, you are done, so simply return.
    * <li>Otherwise the node has (2*order+1) key values, and need to split. The split operation leaves the first
    * <i>order</i> keys and data values in this node (and so the node's numberOfKeys value will become
    * <i>order</i>, and moves the remaining (order + 1) keys and data values to a new BTreeNode leaf node
    * that you need to create.<br>
    * You need to fix up the previous and next fields of this leaf node and the new leaf node you have created.<br>
    * Two sub-cases:
    * <ol>
    * <li>If this node is the root node (i.e., it does not have a parent node), the split of this node will create
    * a new root node, with a single key (the key at index (order+1)) and this node and the new BTreeNode as
    * the child nodes. In my solution I used a call to the method newRootNode to do this. The newRootNode()
    * method will also be used when a split of an interior node creates a new root node. See the JavaDoc for
    * details of what the newRootNode() method should do. Once the new root node has been created, and all
    * the fields updated due to the split, you are done.
    * <li>Otherwise we need to insert in this node's parent node the middle key (at index (order+1) and the
    * new node that we created. This is done by the method insertInterior(). The method is passed the
    * key to insert (at location this.parentIndex in the keys array of the parent node), the index to
    * to insert the key (this.parentIndex), and the new leaf node (that will be inserted at index
    * (this.parentIndex+1) in the parent node's child links array).
    * </ol>
    * </ol>
    * @param key The key to insert into the leaf node.
    * @param data The key's corresponding data value.
    public void insertLeaf(Comparable key, Object data) {
    // You need to provide the code for this method.
    // BTreeNode temp = new
    int size = this.data.length;
    int counter = 0;
    this.keys[size] = key;
    this.data[size] = data;
    sort(size);
    public int compareTo(Comparable o2) {
    // Integer o1 = (Integer) o2;
    return (((Integer)o2).compareTo(this));
    *split()
    *Splits a node into to nodes. This can only be done, if the node is full
    *The midlest key go up into the parent, the left ones of them rest in
    *this node, and the right ones go into a new node.
    private BTreeNode split(int order) {
    if (numberOfKeys == order*2-1) {
    BTreeNode right = null;
    if (parent == null) { // algo for the root-node
    BTreeNode left = new BTreeNode(order, this);
    right = new BTreeNode(order, this);
    for (int i=0; i<order-1; i++) {
    left.keys[i] = keys[i];
    left.data[i] = data[i];
    right.keys[i] = keys[order+i];
    right.data[i] = data[order+i];
    if (!isLeaf()) {
    for (int i=0; i<order; i++) {
    left.childNodes[i] = childNodes[i];
    left.childNodes[i].parent = left;
    right.childNodes[i] = childNodes[order+i];
    right.childNodes[i].parent = right;
    left.isLeaf = false;
    right.isLeaf = false;
    } else isLeaf = false;
    keys[0] = keys[order-1];
    numberOfKeys = 1;
    left.numberOfKeys = order-1;
    right.numberOfKeys = order-1;
    for (int i=1; i<order*2-1; i++) {
    keys[i] = null;
    data[i] = null;
    childNodes[i+1] = null;
    childNodes[0] = left;
    childNodes[1] = right;

    * Don't post that much code. There should never be a reason to. You should be able to break your code down into small enough pieces that you can post a small example that demonstrates your problem.
    * When you do post code, use [code] and [/code] tags to make it readable. You can use the code button on the message entry page.
    * The stack trace will tell you which line the NPE occurred on, where it was called from, where that was called from, etc. You can use that to help you find your error. Look at the line it's complaining about. What references are on that line followed by a dot, and what arrays do you try to access the elements of. One of those must be null.
    * Now that you know what[b] is null, put in a bunch of print statements to track [b]how it got to be null.

  • RTMT 8.91 I can highlight but cannot right click on alarms to expand, highlight disappears after 30 seconds.

    RTMT 8.91 I can highlight but cannot right click on alarms to expand, highlight disappears after 30 seconds.

    RTMT 8.91 I can highlight but cannot right click on alarms to expand, highlight disappears after 30 seconds.

  • Please help me about BBM can receive but cannot sent

    Hye alls.. Who know about this metter.. My BBM can receive but cannot reply or send to alls friend cntct in BBM,when i sent that BBM show the "X" red colour.. What i have to do if like that.. I already uninstall My BBM then i rebooting My set then i reinstall back.. Still same.. Can i have same help from u alls.. Thank you..

    Hello
    Is it your BIS activated?
    Without it you cannot use BBM, get emails or browse the internet.
    Try going to options and to host routing table and press menu key and click register to resend your service books. Now remove your battery and replace it.
    See if that helps.

  • ICloud mail not working. I can send but cannot receive. Is the system down?

    iCloud mail not working. I can send but cannot receive. Is the system down?

    Same here. I can send mails from iCloud.com Webmail, but cannot receive.
    A message that you sent could not be delivered to one or more of
    its recipients. This is a permanent error. The following address
    failed:
    "[email protected]":
    SMTP error from remote server after RCPT command:
    host: mx1.icloud.com.akadns.net
    5.1.1 unknown or illegal alias: [email protected]
    On iOS 6 device I can't receive, neither send mails.
    https://dl.dropbox.com/u/2234051/IMG_0001.PNG
    However, if I change to @me.com, everything works fine.

  • I can send but cannot receive my emails from gmail

    I can send but cannot receive my emails on my ipad from gmail

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this: Delete the account in Mail and then set it up again.
     Cheers, Tom

  • I have one contact that I can call but cannot text. A return text states it is an invalid number. How can I fix it?

    I have one contact that I can call but cannot text. A return text states it is an invalid number. I have erased and re-entered the contact, changed phone identification and tried resetting the network - none have worked. What else can I try?

    What kind of phone is this person using? If this is an iPhone, are you logged into iMessage. If this is not an iMessage, then I suggest you both contact AT&T. SMS which is what is used between non-iPhone devices or between an iPhone and non-iPhone device are a carrier function. There is no setting in iOS or on the iPhone that deals with SMS. If you are able to send iMessage and/or SMS to other people, then AT&T needs to either look into your account to ensure SMS is configured, or they need to look at this other person's phone to see what it is reporting as its number since it is coming back invalid for you.

  • Can compile but can't run....

    Last year I compiled and ran programs and applets with the Java SDK Version 1.4.0 on Windows XP. This year I am basically going thru the same motions, but now I can compile programs but not run them. The error that I get using the DOS prompt command is
    C:\VMBwork>java HelloWorld
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    I moved to a new Computer Lab over the summer, so the technicians loaded j2sdk1.4.2_04 with NetBeans IDE. I have set the path in XP to c:\j2sdk1.4.2_04\bin and the classpath to c:\Program Files\Java\j2re1.4.2_04\lib\ext. This appears to be the same set up as last year...but no java programs run.
    I even tried loading j2sdk1.4.2_05 new on my computer without Netbeans with the same path changes, but to no avail. Any suggestions? The students are really anxious to get into programming.

    C:\VMBwork>java HelloWorld
    Exception in thread "main"
    java.lang.NoClassDefFoundError: HelloWorldIs HelloWorld.class in C:\VMBwork?
    Is HelloWorld.java defined in a package?
    If answers are yes and no (respectively), you should be able to run using
    java -cp . HelloWorld>
    I moved to a new Computer Lab over the summer, so the
    technicians loaded j2sdk1.4.2_04 with NetBeans IDE. I
    have set the path in XP to c:\j2sdk1.4.2_04\bin and
    the classpath to c:\Program
    Files\Java\j2re1.4.2_04\lib\ext. ^^^^^^^^^^^^ doesn't help for classpath (it's already set this way and you can't change that).
    -Alexis
    This appears to be
    the same set up as last year...but no java programs
    run.
    I even tried loading j2sdk1.4.2_05 new on my computer
    without Netbeans with the same path changes, but to no
    avail. Any suggestions? The students are really
    anxious to get into programming.

  • Can compile, but cant execute

    Hi, I can compile my program but I can't run it. Any help? This is the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Spaceship
    Caused by: java.lang.ClassNotFoundException: Spaceship
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Press any key to continue . . .
    Here is my classpath value: C:\Program Files\Java\jdk1.6.0_07\lib;C:\apache-tomcat-5.5.26\common\lib\jsp-api.jar;C:\apache-tomcat-5.5.26\common\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_07\jre\bin;C:\Program Files\Java\jdk1.6.0_07\jre\lib;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Java\jre1.6.0_07\bin;C:\Program Files\Java\jre1.6.0_07\lib
    Here's my path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_01\bin;C:\apache-tomcat-5.5.26\common\lib;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Java\jdk1.6.0_07\bin
    and my JAVA_HOME: C:\Program Files\Java\jdk1.6.0_07

    [Javapedia: Classpath|http://wiki.java.net/bin/view/Javapedia/ClassPath]
    [How Classes are Found|http://java.sun.com/j2se/1.5.0/docs/tooldocs/findingclasses.html]
    [Setting the class path (Windows)|http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html]
    [Setting the class path (Solaris/Linux)|http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html]
    [Understanding the Java ClassLoader|http://www-106.ibm.com/developerworks/edu/j-dw-javaclass-i.html]
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • I can send, but cannot receive E-Mail, suddenly.

    I am a new convert to the entire world of Apple, aside from a longtime Safari proponent and user. A month and a half ago, I purchased a MacBook Pro 15" (you all know the specs, I went with 512 g flash drive upgrade) and am extremely happy with it. I have Windows 7 x64 installed on a 200g partition, solely so I can continue to use a few SONY apps that I need for video and audio editing for my business. These apps are NOT available for Apple machines and are essential to my photo restoration and video transfer and editing business. Ok, that's the environment.
    Yesterday, as I normally do, I woke up, coffee, check on all of my animals, Mac starts with scheduled start-up at 7:20am as per usual while I am busy with my 'wake up' duties. After the wife was off to work and I was ready to check E-Mails and check for any correspondence from clients, I open 'mail,' (I have it set to start at scheduled start-up) and notice there is no E-Mail in my two pop accounts. I have a Gmail account and the iCloud account. 'This is odd.' I invoke 'receive' a couple times. Nothing. I turn on my phone (Blackberry) and it starts making noise as it normally does when E-Mail comes in. This is weird. I reboot my lovely Mac. No joy. No E-Mail. So I start troubleshooting. I figure out that I can send from all four accounts but cannot receive on any of them.
    I reboot to the Windows partition. I open Live Mail. It fills up on my two pop accounts. Even more weirder. I have the Gmail account on this partition also, but it rarely receives E-Mail so it can wait. No iCloud on the Windows side. We all understand that.
    On the Apple side, I removed all accounts from mail and re-established them with no resulting solution being apparent.
    I have made no changes at my account on the server (webhero.com) so I am baffled. I looked for solutions here, but have found nothing, which is why this is being written.
    Because I have seen no solutions, I consider that something unique has occurred to my computer that is not a new issue with many other Mac users.
    My system is updated to all recent standards so there isn't much more to post
    Any ideas, anyone?
    Thanks for looking,
    Kelly J.

    Personally I will never leave Windows behind. Mac just doesn't cut it for me. For one it is to much of a closed system and the door is closing even more as I type this. MS isn't that much better with the release of Win 8 (which I will not be using at all except for Tech supporting others).
    Apple does not like to give the user options and if they do you have to know the command line to implement them, in some cases. In others there simply is no user choice, like sounds for events.
    With the advent of the newer Mac's with Non upgradeability, IE the retina models and the newest iMacs, this is certainly not the systems for me.
    The OS? Well IMHO OS X isn't any better then Windows and in most case I like Windows better. IMHO Windows is an easier system to use. Not sure about Win 8.
    Been running Windows for 20+ years and I can count on one hand the number of BSODs I've had. But then I run Clean system and the desktops I built myself. Notebooks are mostly Dell Business line models and my one MBP.
    BSODs happen from bad hardware or drivers for that hardware. OS X is slightly better but Apple is not immune from writing or using bad drivers and the hardware is no better built then most any Windows PC. It just comes in a different case.
    Apple Lived on the "It Just works" saying for a long time. That is not the case today, as you may see from all the posts in all the Apple hardware forums.
    I'm Fixento get back to work, Y'all. Ga day.

  • Trying to connect kodak c315 to macbook air downloaded driver but cannot run software why?

    just purchased new macook air and trying to connect to my Kodak C315 printer via WIFI
    I have downloaded driver from Kodak support but when I try  to install get error that cannot run software as it is from an unknown developer
    can anyone help please

    See how to open an app from an unidentified developer in http://support.apple.com/kb/HT5290  and http://support.apple.com/kb/PH14369

  • Ok in appletviewer, but cannot run in a brower, due to JLabel, why?

    hi, there,
    i pop up a window from my applet, using Jframe, and in it is a Jlabel showing some texts.
    now i can run it w/o problem when using appletviewer. but when i test it from a brower, like IE, it cannot run, the error message is like: cannot find javax.swing.JLabel class.
    what is wrong with it? thank you very much for your help.
    richard

    The problem is that the browser is compatible with java 1.1.x, not 1.2 or later with swing. So if you use any of the new classes, the browser doesn't know about them.
    With the latest browser version, you can use java 1.2 or later (by downloading and installing java runtime environment). To make it work in older browsers, you need to modify your html page so it uses jre as a plugin. That means ppl still need to download and install a jre (if not included in the latest browser versions) to run your applet.

Maybe you are looking for

  • Reg.Open and comleted PO

    Dear Experts How to take Open POs in Open orders and Open PO in completed orders. We are taking two reports and compare each order with PO list which is so difficult. Please help me. Note : If order is delivered(VL01N) the PO should be closed. How to

  • 1 Apple ID, 2 People, 6 Apple Products

    I will start off by apologizing if the answer to my question is located elsewhere.  I was unable to find a thread that addressed my entire question.  The general question I have will be what will be associated with the iCloud ID and what will be asso

  • How can i display Intaractive report ,

    Hi Experts, How can i display Intaractive report , In basic List i want to print EMP data on top. and infotype number and infotype text . In secondary list infotype data on which the user intactive with infotype no.. If user intaract the 0001 infotyp

  • Prime Infrastructure 2.1 Client Statistic Report Issues

    Hello Community, I hope you can help with a couple of issues I am seeing on Prime Infrastructure 2.1, running an evaluation 60 day license. My PI 2.1 build is currently managing a WLC 5508 running 7.4.121.0, which has been added successfully. No conf

  • Navigation Problem in OBIEE

    Hi, I have a strange navigation problem. I have the navigation setup from the 1st page of my dashboard to go to the second. When I first bring up the first page, and then click , nothing happens. Now if I refresh this page and then click again, I am