下面是我的程序代码:
***** MobVectorTest.java *************************************************************
import com.recursionsw.ve.Factory;
import com.recursionsw.ve.StartupException;
import com.recursionsw.ve.Voyager;
import com.recursionsw.ve.mobility.IMobility;
import com.recursionsw.ve.mobility.Mobility;
public class MobVectorTest {
public static void main(String[] args) {
try {
Voyager.startup("6000");
IMyVector v = (IMyVector)Factory.create("MyVector");
IMobility mv = Mobility.of(v);
for (int i = 0; i < 4; i++) {
v.addElement(new Integer(i));
v.print();
if (i % 2 == 0)
mv.moveTo("//localhost/7000");
else
mv.moveTo("//localhost/6000");
}
} catch (StartupException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
Voyager.shutdown();
}
}
/***** IMyVector.java **********************************************************************/
public interface IMyVector extends com.recursionsw.java.util.IVector {
void print();
}
/***** MyVector.java ***********************************************************************/
import java.util.Vector;
public class MyVector extends Vector {
private static final long serialVersionUID = 1L;
public void print() {
System.out.println(this);
}
}
/***** IVector.java *************************************************************************/
/**
* IVector.java
* <p>
* @version 1.0
* @author generated by igen 6.0.5 at Wed Apr 18 09:41:49 CST 2007
*/
package com.recursionsw.java.util;
public interface IVector extends com.recursionsw.java.util.IAbstractList,
java.util.List, java.util.RandomAccess, java.lang.Cloneable,
java.io.Serializable {
void copyInto(java.lang.Object[] arg1);
void trimToSize();
void ensureCapacity(int arg1);
void setSize(int arg1);
int capacity();
java.util.Enumeration elements();
int indexOf(java.lang.Object arg1, int arg2);
int lastIndexOf(java.lang.Object arg1, int arg2);
java.lang.Object elementAt(int arg1);
java.lang.Object firstElement();
java.lang.Object lastElement();
void setElementAt(java.lang.Object arg1, int arg2);
void removeElementAt(int arg1);
void insertElementAt(java.lang.Object arg1, int arg2);
void addElement(java.lang.Object arg1);
boolean removeElement(java.lang.Object arg1);
void removeAllElements();
java.lang.Object clone();
}
/***** IAbstractList.java *****************************************************************/
/**
* IAbstractList.java
*
* @version 1.0
* @author generated by igen 6.0.5 at Wed Apr 18 09:41:49 CST 2007
*/
package com.recursionsw.java.util;
public interface IAbstractList extends
com.recursionsw.java.util.IAbstractCollection, java.util.List {
}
/***** IAbstractCollection.java *******************************************************************/
/**
* IAbstractCollection.java
* <p>
* @version 1.0
* @author generated by igen 6.0.5 at Wed Apr 18 09:41:49 CST 2007
*/
package com.recursionsw.java.util;
public interface IAbstractCollection extends java.util.Collection {
}
问题:启动一个新的命令行窗口:
启动VoyagerEdge
> voyageredge 7000
当运行程序后,在运行“voyageredge 6000“进程的窗口显示:
[0]
[0, 1]
[0, 1, 2]
[0, 1, 2, 3]
而运行voyageredge 7000的窗口中没有任何信息,这是为什么? 高手帮帮忙,我先在这谢谢各位了!!!