I need help on a java test

I'm just learning java and my teacer likes giving us tests on stuff he never taught us... I'm not asking for you to give me ther answers but just at least explain what this stuff means
he gave us a program then 16 questions about it
All I know is that the prgram is a class that takes students names and test scores and finds there averges and studd like that
ok heres the program
// Solution 5.1
/* Student.java
Manage a student's name and three test scores.
public class Student {
//Instance variables
//Each student object has a name and three test scores
private String name; //Student name
private int test1; //Score on test 1
private int test2; //Score on test 2
private int test3; //Score on test 3
// Default constructor -- initialize name to the empty string and
// the test scores to zero
public Student() {
name = "";
test1 = 0;
test2 = 0;
test3 = 0;
//Aditional constructor -- initialize the name and test scores
//to the values provided
public Student(String nm, int t1, int t2, int t3){
name = nm;
test1 = t1;
test2 = t2;
test3 = t3;
//Aditional constructor -- initialize the name and test scores
//to match those in perameter s.
public Student(Student s){
name = s.name;
test1 = s.test1;
test2 = s.test2;
test3 = s.test3;
//Other Methods
public void setName (String nm){
//Set a students name
name = nm;
public String getName(){
//Get a students name
return name;
public void setScore (int i, int score){
//Set test i to score
if (i == 1) test1 = score;
else if (i == 2) test2 = score;
else test3 = score;
public int getScore (int i){
//retrieve score i
if (i == 1) return test1;
else if (i == 2) return test2;
else return tes3;
public int getAverage(){
//compute and return the average
int average;
average = (int) Math.round((test1 + test2 + test3) / 3.0);
return average
public int getHighscore(){
//determine and return the highest score
int highScore;
highscore = test1;
if (test2 > highscore) highscore = test 2;
if (test3 > highscore) highscore = test 3;
return highscore;
public String toString(){
//Construct and return a string representation of the student
string str;
str = "Name: " + name + "\n" + // "\n" denotes a newline
"Test 1: " + test1 + "\n" +
"Test 2: " + test2 + "\n" +
"Test 3: " + test3 + "\n" +
"Average: " + getAverage();
return string;
Ok so theres the prgram the Questions are:
1. Identify the four structural elements of the student class prgram
2. Why did I omit the clause extends <some class> in my program
3. Explain Class hierarchy
4. Why are instance variables always declared to be private
5. What would happen if I declared them public
6. What happens if I omit it completely
7. Identify the instance variables in student class program
8. What does the constructor method do in the student class
9. Why didn't I declare and intalize my variables at the same time
10. Why do I use so many comments in this program
(I actually know the answer to this one)
11. Why do I need a default constructor
(what the crap is a constructor?)
12. Why did I provide additional constructors
13. In Additional constructor section, explain the following code:
name = "";
name = nm;
14. Explain Chaining and where did I place it in the student class program
15. List 2 visibility modifiers in this program
16 Rewrite the student class to exclude the "\n" in t the toString section
And that is it. I seriously don't know what any of those questions mean PLEASE HELP!

A duplicate of this is here http://forum.java.sun.com/thread.jspa?threadID=5141024

Similar Messages

  • Need help on Oracle Application Testing Suite

    Hi,
    I need help on accessing one script into another script in OATS like the way we access methods of one class into another class in Java. I have created 2 scripts (when i do recording they created as a projects in open script editor), now i want to use my first script in second script.
    Thanks,
    VaraPrasad

    I have a similar problem with the OATS v9.20 installation. I did manage to install it on our main load generator (running Windows 2003 Server) but when it came to installing OpenScript on my laptop (XP SP3) the install 'hangs' at 78%.
    I did raise a support call with Oracle about this (there was a bug report generated) but the case is still open.
    I've been waiting to hear when the next version was due (in the hope that this might have been resolved) but by the sounds of it there could still be an issue on WinXP with v9.21?
    For reference I originally logged this with the following in the description:
    The installation looks like it is failing because of a double backslash in a path ending "OATS920\\bin\copyOUI.bat". We then get an error in javaw.exe which when OK'ed then stops the installation at the stage "creating 'Uninstall Oracle Application Testing Suite' in folder 'Oracle Application Testing Suite' ".

  • Need help in solving java.io.NotSerializableException

    Hi,
    Weblogic 9.2
    I need help in solving the java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
    I dont know why ApplicationNamingNode has to be serialized.
    Full stack trace will be provided if needed.
    thank you

    Here is the stack trace
    Remote service [com.gfs.corp.component.price.customerbid.PCBMaint] threw exception
    weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:211)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
         at com.gfs.corp.component.price.maint.customerbid.ejb.PCBMaint_q9igfc_EOImpl_922_WLStub.createBid(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:107)
         at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:75)
         at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:119)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy47.createBid(Unknown Source)
         at com.gfs.corp.bid.price.controller.DefaultBidPriceUpdater.awardBid(DefaultBidPriceUpdater.java:83)
         at com.gfs.corp.bid.price.ejb.AwardQueueMessageHandler.onMessage(AwardQueueMessageHandler.java:98)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3962)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:441)
         at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
         at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:378)
         at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at weblogic.transaction.internal.PropagationContext.readRollbackReason(PropagationContext.java:804)
         at weblogic.transaction.internal.PropagationContext.readExternal(PropagationContext.java:376)
         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at weblogic.rmi.provider.BasicServiceContext.readExternal(BasicServiceContext.java:56)
         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
         at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
         at weblogic.rjvm.MsgAbbrevInputStream.readExtendedContexts(MsgAbbrevInputStream.java:224)
         at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:188)
         at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:435)
         ... 7 more
    Caused by: java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.jndi.internal.WLContextImpl.writeExternal(WLContextImpl.java:453)
         at weblogic.jndi.internal.WLEventContextImpl.writeExternal(WLEventContextImpl.java:422)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.transaction.internal.PropagationContext.convertRollbackReasonToBytes(PropagationContext.java:735)
         at weblogic.transaction.internal.PropagationContext.writeRollbackReason(PropagationContext.java:819)
         at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:183)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.rmi.provider.BasicServiceContext.writeExternal(BasicServiceContext.java:48)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:614)
         at weblogic.rjvm.MsgAbbrevOutputStream.marshalCustomCallData(MsgAbbrevOutputStream.java:319)
         at weblogic.rjvm.MsgAbbrevOutputStream.transferThreadLocalContext(MsgAbbrevOutputStream.java:149)
         at weblogic.rmi.internal.BasicServerRef.postInvoke(BasicServerRef.java:606)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:455)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:58)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:975)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    2007-10-18 08:38:04,931 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean - Could not invoke 'remove' on remote EJB proxy
    weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:211)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
         at com.gfs.corp.component.price.maint.customerbid.ejb.PCBMaint_q9igfc_EOImpl_922_WLStub.remove(Unknown Source)
         at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.removeSessionBeanInstance(AbstractRemoteSlsbInvokerInterceptor.java:227)
         at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.releaseSessionBeanInstance(SimpleRemoteSlsbInvokerInterceptor.java:118)
         at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:95)
         at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:119)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy47.createBid(Unknown Source)
         at com.gfs.corp.bid.price.controller.DefaultBidPriceUpdater.awardBid(DefaultBidPriceUpdater.java:83)
         at com.gfs.corp.bid.price.ejb.AwardQueueMessageHandler.onMessage(AwardQueueMessageHandler.java:98)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3962)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:441)
         at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
         at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:378)
         at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at weblogic.transaction.internal.PropagationContext.readRollbackReason(PropagationContext.java:804)
         at weblogic.transaction.internal.PropagationContext.readExternal(PropagationContext.java:376)
         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at weblogic.rmi.provider.BasicServiceContext.readExternal(BasicServiceContext.java:56)
         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
         at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
         at weblogic.rjvm.MsgAbbrevInputStream.readExtendedContexts(MsgAbbrevInputStream.java:224)
         at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:188)
         at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:435)
         ... 7 more
    Caused by: java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.jndi.internal.WLContextImpl.writeExternal(WLContextImpl.java:453)
         at weblogic.jndi.internal.WLEventContextImpl.writeExternal(WLEventContextImpl.java:422)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.transaction.internal.PropagationContext.convertRollbackReasonToBytes(PropagationContext.java:735)
         at weblogic.transaction.internal.PropagationContext.writeRollbackReason(PropagationContext.java:819)
         at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:183)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.rmi.provider.BasicServiceContext.writeExternal(BasicServiceContext.java:48)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:614)
         at weblogic.rjvm.MsgAbbrevOutputStream.marshalCustomCallData(MsgAbbrevOutputStream.java:319)
         at weblogic.rjvm.MsgAbbrevOutputStream.transferThreadLocalContext(MsgAbbrevOutputStream.java:149)
         at weblogic.rmi.internal.ReplyOnError.run(ReplyOnError.java:54)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    2007-10-18 08:38:05,244 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean - Could not connect to remote EJB [com.gfs.corp.component.price.customerbid.PCBMaint] - retrying
    org.springframework.remoting.RemoteConnectFailureException: Could not connect to remote service [com.gfs.corp.component.price.customerbid.PCBMaint]; nested exception is weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode
    thank you

  • Need help to handle java FX stuffs...........??

    i am very much new to Java FX i want to do a login acceptance and rejection operation.like ::
    client will click on the button it will open up the window of created by java FX which will give the login screen*(in this case i would like to mention one thing i all ready have a page like usercheck.jsp which is checking if the user is already loged in or not so need to call this JAVA FX window from that page.)*.This java FX window should have a text field and a password field to match with database.it will show a progressber while it is matching the user name password with database.If the login is correct it will give the user the session stuff and allow him to access**(ie.it will be forworded to the page say,cart.jsp)** otherwise it will give a alert message "login faild".any idea about it..............what should i do now???my database is in access and it connected to my program by DA.java.please guide me what should i do,step by step?and consulting with [http://jfx.wikia.com/wiki/SwingComponents]
    now guide me.............
    i have just created a swing button say "click me to login" on a UNDECORATED window............so what next.........
    Edited by: coolsayan.2009 on May 7, 2009 3:35 PM

    my DA.java is like::
    package shop;
    import java.sql.*;
    public class DAClass {
         private static Connection conn;
         private static ResultSet rs;
         private static PreparedStatement ps;
         public static void connect(String dsn, String un, String pwd) {
              try {
                   //access
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   conn=DriverManager.getConnection("jdbc:odbc:"+dsn,un,pwd);
              catch(Exception e) {
         public static boolean chkPwd(String un, String pwd) {
              try {
                   boolean b=false;
                   ps=conn.prepareStatement("select * from cust_info where cust_name=? and cust_pwd=?");               
                   ps.setString(1,un);
                   ps.setString(2,pwd);
                   rs=ps.executeQuery();
                   while(rs.next()) {
                        b=true;
                   return b;
              catch(Exception e) {
                   return false;
         public static ResultSet getCat(){
              try {
                   ps=conn.prepareStatement("select * from item_category where cat_parent=0 order by cat_name");               
                   rs=ps.executeQuery();
                   return rs;
              catch(Exception e) {
                   return null;
         public static ResultSet getSubCat(int cat_id){
              try {
                   ps=conn.prepareStatement("select * from item_category where cat_parent=? order by cat_name");               
                   ps.setInt(1,cat_id);
                   rs=ps.executeQuery();
                   return rs;
              catch(Exception e) {
                   return null;
         public static ResultSet getItems(int cat_id){
              try {
                   ps=conn.prepareStatement("select * from item_info where cat_id=? order by title");               
                   ps.setInt(1,cat_id);
                   rs=ps.executeQuery();
                   return rs;
              catch(Exception e) {
                   return null;
         public static boolean insertOd(int order_id,String cust_id, String dt, String st, double amt,String pro)
              try{
                   ps=conn.prepareStatement("insert into cust_order values (?,?,?,?,?,?)");
                   ps.setInt(1,order_id);
                   ps.setString(2,cust_id);
                   ps.setString(3,dt);
                   ps.setString(4,st);
                   ps.setDouble(5,amt);
                   ps.setString(6,pro);
                   ps.executeUpdate();
                   return true;
                   catch(Exception e)
                        return false;
         public static boolean draft_det(int order_id,String bank_name,String draft_no,String draft_date,String branch,double amount)
              try{
                   ps=conn.prepareStatement("insert into draft_det values (?,?,?,?,?,?)");
                   ps.setInt(1,order_id);
                   ps.setString(2,bank_name);
                   ps.setString(3,draft_no);
                   ps.setString(4,draft_date);
                   ps.setString(5,branch);
                  ps.setDouble(6,amount);
                   ps.executeUpdate();
                   return true;
                   catch(Exception e)
                        return false;
         public static int getOrderId()
              try{
                   int id=0;
                   ps=conn.prepareStatement("select Max(order_id) from cust_order");
                   rs=ps.executeQuery();
                   while(rs.next()){
                        id= rs.getInt(1);
                   return id;
              catch(Exception e)
                   return 0;
    public static boolean credit_det(int order_id,String credit_no,String credit_type,String pin_no)
              try{
                   ps=conn.prepareStatement("insert into credit_det values (?,?,?,?)");
                   ps.setInt(1,order_id);
                   ps.setString(2,credit_no);
                   ps.setString(3,credit_type);
                   ps.setString(4,pin_no);
                   ps.executeUpdate();
                   return true;
                   catch(Exception e)
                        return false;
         public static boolean detailOrder(int order_id,int item_id,int item_number,double item_price)
              try{
                   ps=conn.prepareStatement("insert into order_det values (?,?,?,?)");
                   ps.setInt(1,order_id);
                   ps.setInt(2,item_id);
                   ps.setInt(3,item_number);
                   ps.setDouble(4,item_price);
                   ps.executeUpdate();
                   return true;
                   catch(Exception e)
                        return false;
         public static UserInfo getUserDet(String un) {
              try {
                   ps=conn.prepareStatement("select * from cust_info where cust_name=?");
                   ps.setString(1,un);
                   rs=ps.executeQuery();
                   UserInfo user=null;
                   while(rs.next()) {
                        String uname=rs.getString(1);
                        String pass=rs.getString(2);
                        String fname=rs.getString(3);
                        String lname=rs.getString(4);
                        String addr=rs.getString(5);
                        String city=rs.getString(6);
                        String state=rs.getString(7);
                        String country=rs.getString(8);
                        String contact=rs.getString(9);
                        String question=rs.getString(10);
                        String answer=rs.getString(11);
                        String email=rs.getString(12);
                        String mobile=rs.getString(13);
                        user=new UserInfo(0,fname,lname,addr,city,state,country,contact,question,answer,email,mobile,uname,pass);
                        return user;
              catch(Exception e) {
                   return null;
         public static boolean userInsert(String fname,String lname,String addr,String city,String state,String country,String contact,String question,String answer,String email,String mobile,String uname,String pass ){
              try{
                   ps=conn.prepareStatement("insert into cust_info  values (?,?,?,?,?,?,?,?,?,?,?,?,?)");
                   ps.setString(1,uname);
                   ps.setString(2,pass);
                   ps.setString(3,fname);
                   ps.setString(4,lname);
                   ps.setString(5,addr);
                   ps.setString(6,city);
                   ps.setString(7,state);
                   ps.setString(8,country);
                   ps.setString(9,contact);
                   ps.setString(10,question);
                   ps.setString(11,answer);
                   ps.setString(12,email);     
                   ps.setString(13,mobile);
                   ps.executeUpdate();     
                   return true;               
              catch(Exception e)
                   return false;
         public static boolean chackuname(String un) {
              try {
                   boolean b=false;
                   ps=conn.prepareStatement("select * from cust_info where cust_name=?");
                   ps.setString(1,un);
                   rs=ps.executeQuery();
                   while(rs.next()) {
                        b=true;
                   return b;               
              catch(Exception e) {
                   return false;
         public static boolean adminChk(String un,String pass){
         try{
              boolean b=false;
              ps=conn.prepareStatement("select * from admin where username=? and password=?");
                   ps.setString(1,un);
                   ps.setString(2,pass);
                   rs=ps.executeQuery();
                   while(rs.next())
                        b=true;
                   return b;
         catch(Exception e){
              return false;
         public static String getStatus(int cust_id)
              try{
                   String status=null;
                   ps=conn.prepareStatement("select order_status from cust_order where cust_id=?");
                   ps.setInt(1,cust_id);
                   rs=ps.executeQuery();
                   while(rs.next()){
                        status= rs.getString(1);
                   return status;
              catch(Exception e)
                   return null;
         public static boolean chkCatagory(String cat)
              boolean b=false;
              try{
                   ps=conn.prepareStatement("select * from item_category where cat_name=? ");
                   ps.setString(1,cat);
                   rs=ps.executeQuery();
                   while(rs.next())
                        b=true;
                   return b;     
              catch(Exception e)
                   return false;
         public static int getMaxCatId(){
              try{
                   int id=0;
                   ps=conn.prepareStatement("select MAX(cat_id) from item_category");
                   rs=ps.executeQuery();
                   while(rs.next())
                        id=rs.getInt(1);
                   return id;     
              catch(Exception e)
                   return -1;
         public static boolean catInsert(int catId, String cat, int par)
              boolean flag=false;
              try{
                        ps=conn.prepareStatement("insert into item_category values(?,?,?)");
                        ps.setInt(1,catId);
                        ps.setString(2,cat);
                        ps.setInt(3,par);
                        ps.executeUpdate();
                        flag=true;
                        return flag;
              catch(Exception e)
                   return false;

  • Need Help on Real Application Testing (RAT) installation and configarations

    Hi Folks,
    We are expecting an opportunity across RAT implementation in near future and our team is trying explore on RAT and need help in installation and configurations .Am looking for some RAT
    contacts ,please help me..
    Thanks,
    Jay.

    Q1
    I have not had a space issue in the RAT capture files that caused a database issue when space ran out.
    Q2
    You will miss anything you filtered the capture on, anything that errored during the capture
    Capture will also not get and to be aware of
    Direct Path Load (SQL Loader)
    Shared server (Oracle MTS)
    Oracle Streams & Advanced Replication Streams
    Non-PL/SQL based Advanced Queuing (AQ)
    Flashback queries
    OCI-based Object Navigation
    Non SQL-Based Object Access
    Distributed transactions, remote describe/commit operations (will be replayed as local transactions)
    Q3
    I typically use DB Replay for an overall work load perspective, SPA for SQL Level.
    For example I will to a DB replay find from my reports SQL that needs a further look see and use SPA from there.
    or potentially use SPA to focus on the SQL itself and not concern myself the the whole workload until I am ready.
    Q4
    Set the SCN for when capture is started, have the replay database be recovered to that SCN prior to any replay operation. No real need to shutdown, done this many times with success.
    Q5
    Typically I will filer any grid control agent or other agent software activities from the capture for sure.
    Q6
    Your Capture Report does not show anything?
    Q7
    You can extract and load AWR with the following packed procedures
    sys.dbms_swrf_internal.awr_extract
    sys.dbms_swrf_internal.awr_load

  • Need help writing a Java rule in PDF Forms

    I have created an invoice for my contractors via "forms", and in turn made each cell either a drop down list or "read only" field so they cannot change the rate of pay, etc.  Here is my issue...My first drop down cell is titled "Job Description".  When the contractor selects one of the 8 dropdown options within the Job Description field, I would like it to automatically fill in the hourly rate that is associated with that particular job description (or skill).  I currently have my "rate" cell as a drop down, and I want to make that a read only, and when you select the A1 position from Job Description, it will populate the "rate" field with the appropriate amount for that A1 rate.  I believe this can be done with writing some Java script, but I have never played with Java and I don't really have the time to teach myself.  If anyone can help with me a quick tutorial, or even the formula I should use, so that I can just plug and play, that would be super helpful.  If this is a time consuming issue, I would be interested in paying someone to do it for me. Thank you!

    Hi George,
    I was able to copy my data over to a fresh document, and now it works just fine....thank you so much for your insight and help!
    I have another question if you have a moment. 
    I am trying to do a simple calculation of start time and end time for my employees.  Do I need to do this via a javascript, and if so, what area in properties of the result field should I copy it to?  for the purpose of the script, the fields are as follows:
    DataField1 = start time
    DataField2 = end time
    DataField3 = total time
    I would like to use the h:MM tt format for my time fields if possible.
    I've attached a link to the file through my dropbox account, and you'll notice that I created three new fields at the top of the invoice just to test the time calculations before i mock up the whole document.
    Dropbox - Contractor Invoice Template (1).pdf
    Any help you can give me would awesome! 
    Thank you!!

  • I need help getting my local testing server to work - PHP/MySQL

    Hello,
    I am using DW CS5 and have installed XAMPP for my Server/PHP/DB package (which is the same as my live site).
    I have gone thru every tuitorial and all information on this subject, and unfortunately I can't get the server set up correct. Other than my page not showing in a browser (or live view) when I try to view it, DW just says: "Dynamically-related files could not be resolved because the site definition is not correct for this server" when I have index.php open and try to find the files.
    One major question is I am unsure of what folder to have as the root folder of the site, which has a public_htlm directory and www directory - or do I just use the main folder they are both located in as the root folder?
    (Not to get too deep with this first question, but I also looked at the error log file in Apache c:\xampp\apache\logs\error.log and it is not finding the following:
    [Tue Oct 09 14:26:38.573504 2012] [:error] [pid 3100:tid 1488] [client ::1:56261] script 'C:/xampp/htdocs/BusinessTube/index_e5pebna8e.php' not found or unable to stat]
    I'm guessing that the file "index_e5pebna8e.php" is a cached version of the file generated by index.php - but I'm unsure why it is not being 'found'.)
    Second question is about having to set the php.ini file to listen to port 88 as this computer also has IIS installed. I have done this, and it works with a local project directly from NetBeans (which I have to use for a PHP development class). How will this change my DW site definitions? I'm assuming that anywhere I would have localhost I will now need to have localhost:88 but once again I'm not sure.
    I am eager to get this site working locally so I can start using the new PHP skills I'm learning - any help will be GREATLY appreciated.
    Kirk

    You're getting mixed up over the meaning of public_html.
    Most hosting companies that offer PHP use the Apache web server, which has a single server root folder called htdocs. XAMPP also uses Apache, so c:/xampp/htdocs is the XAMPP server root, and its URL is http://localhost/.
    Although Apache has only one server root, virtual hosts make it possible to run multiple websites on the same server. Each virtual host is located in a separate folder that acts as the site root. It's common for this folder to be called public_html. What bregent was describing was the location of the site root on your remote server. The name of the site root in your local testing setup can be whatever you decide to call it.
    When learning to use PHP, most people use a subfolder of the Apache server root because it doesn't require further configuration. However, once you're working with real sites, it's normal to set up a virtual host for each one. I create all my virtual hosts in a folder called C:/vhosts. So for example, I might have one in C:/vhosts/site1. In the virtual hosts configuration file, I designate C:/vhosts/site1 as the root folder for a virtual host called site1, which can then be accessed as http://site1/.
    The only reason I might have a folder called public_html is if I designated C:/vhosts/site1/public_html as the site root.
    I hope that's clear. Once you understand the principle of virtual hosts, the concept of the site (or server) root becomes obvious, but it can be difficult to explain. I remember it took me a while before the concept sank in.

  • I'm writing a mazerace game...I need help from a Java Pro regarding GUI

    I've tested my code using a textUI, but not successful with GUI.
    Following are the files I have at present but are incomplete...someone please assist me, let me know what I'm missing to run the program successfully in a window.
    All I need to do is to bring the maze (2D array) onto a window, and listen to the keys (A,S,D,W & J,K,L,I) and make the move accordingly (using the move method in the MazeRace Class)
    This is my class - MazeRace
    import javax.swing.*;
    import java.io.*;
    * This class is responsible for:
    * -Initializes instance variables used to store the current state of the game
    * -When a player moves it checks if the move is legal
    * and updates the state of the game if move is allowable and made
    * -Reports information about current state of the game when asked:
    * o whether game has been won
    * o how many moves have been made by a given player
    * o what is the current configuration of the maze, etc.
    public class MazeRace {
    /** The Maze Race layout */
    private static char[][] mazeLayout;
    /** Dimensions of the maze */
    //private static final int rowLength = mazeLayout.length;
    //private static final int columnLength = mazeLayout[0].length;
    /** space in the grid is a wall */
    private static final char wall = 'X';
    /** space in the grid has been used */
    private static final char spaceUsed = '.';
    /** space in the grid is available */
    private static final char spaceAvailable = ' ';
    /** Character for Charles, Ada & Goal*/
    private static final char CHARLES = 'C';
    private static final char ADA = 'A';
    private static final char GOAL = 'G';
    /** Location of Goal in the Maze */
    private static int rowGoal = 0;
    private static int columnGoal = 0;
    /** Location of Ada in the Maze */
    private static int rowAda = 0;
    private static int columnAda = 0;
    /** Location of Charles in the Maze */
    private static int rowCharles = 0;
    private static int columnCharles = 0;
    /** Number of Ada's moves */
    private static int countAdasMoves = 0;
    /** Number of Charles's moves */
    private static int countCharlesMoves = 0;
    * Constructor for MazeRace
    * &param mazeGrid - 2D array of characters
    public MazeRace(char[][] mazeGrid){
    this.mazeLayout = mazeGrid;
    for (int row = 0; row < mazeLayout.length; row++){
    for (int column = 0; column < mazeLayout[0].length; column++){
    if (mazeLayout[row][column] == GOAL){
    this.rowGoal = row;
    this.columnGoal = column;
    if (mazeLayout[row][column] == ADA){
    this.rowAda = row;
    this.columnAda = column;
    if (mazeLayout[row][column] == CHARLES){
    this.rowCharles = row;
    this.columnCharles = column;
    public boolean canMoveLeft(){
    int rowA = this.rowAda;
    int columnA = this.columnAda;
    int rowC = this.rowCharles;
    int columnC = this.rowCharles;
    boolean canMove = false;
    if (mazeLayout[rowA][columnA - 1] == spaceAvailable
    || mazeLayout[rowA][columnA - 1] == GOAL) {
    canMove = true;
    return canMove;
    * This method takes in a single character value that indicates
    * both the player making the move, and which direction the move is in.
    * If move is legal, the player's position will be updated. Move is legal
    * if player can move one space in that direction i.e. the player isn't
    * moving out of the maze, into a wall or a space has already been used.
    * @param moveDirection: indicates the player making the move and direction
    * @return moveMade: boolean value true if move was made, false otherwise
    public boolean move(char move){
    boolean validMove = false;
    /** store Ada's current row location in a temp variable */
    int rowA = this.rowAda;
    /** store Ada's current column location in a temp variable */
    int columnA = this.columnAda;
    /** store Charles current row location in a temp variable */
    int rowC = this.rowCharles;
    /** store Charles current column location in a temp variable */
    int columnC = this.columnCharles;
    /** if Ada is moving left, check if she can make a move */
    if (move == 'A' && (mazeLayout[rowA][columnA - 1] == spaceAvailable
    || mazeLayout[rowA][columnA - 1] == GOAL)) {
    /** if move is legal, then update old space to spaceUsed '.' */
    mazeLayout[rowA][columnA] = spaceUsed;
    /** update Ada's new position */
    mazeLayout[rowA][columnA - 1] = ADA;
    this.rowAda = rowA; //update new row location of Ada
    this.columnAda = columnA - 1; //update new column location of Ada
    validMove = true; //valid move has been made
    countAdasMoves++; //increment Ada's legal move
    /** if Ada is moving down, then check if she can make the move */
    if (move == 'S'&& (mazeLayout[rowA + 1][columnA] == spaceAvailable
    || mazeLayout[rowA + 1][columnA] == GOAL)) {
    mazeLayout[rowA][columnA] = spaceUsed;
    mazeLayout[rowA + 1][columnA] = ADA;
    this.rowAda = rowA + 1;
    this.columnAda = columnA;
    validMove = true;
    countAdasMoves++;
    /** if Ada is moving right, then check if she can make the move */
    if (move == 'D'&& (mazeLayout[rowA][columnA + 1] == spaceAvailable
    || mazeLayout[rowA][columnA + 1] == GOAL)) {
    mazeLayout[rowA][columnA] = spaceUsed;
    mazeLayout[rowA][columnA + 1] = ADA;
    this.rowAda = rowA;
    this.columnAda = columnA + 1;
    validMove = true;
    countAdasMoves++;
    /** if Ada is moving up, then check if she can make the move */
    if (move == 'W'&& (mazeLayout[rowA - 1][columnA] == spaceAvailable
    || mazeLayout[rowA - 1][columnA] == GOAL)) {
    mazeLayout[rowA][columnA] = spaceUsed;
    mazeLayout[rowA - 1][columnA] = ADA;
    this.rowAda = rowA - 1;
    this.columnAda = columnA;
    validMove = true;
    countAdasMoves++;
    /** if Charles is moving left, then check if he can make the move */
    if (move == 'J'&& (mazeLayout[rowC][columnC - 1] == spaceAvailable
    || mazeLayout[rowC][columnC - 1] == GOAL)) {
    mazeLayout[rowC][columnC] = spaceUsed;
    mazeLayout[rowC][columnC -1] = CHARLES;
    this.rowCharles = rowC;
    this.columnCharles = columnC - 1;
    validMove = true;
    countCharlesMoves++;
    /** if Charles is moving down, then check if he can make the move */
    if (move == 'K'&& (mazeLayout[rowC + 1][columnC] == spaceAvailable
    || mazeLayout[rowC + 1][columnC] == GOAL)) {
    mazeLayout[rowC][columnC] = spaceUsed;
    mazeLayout[rowC + 1][columnC] = CHARLES;
    this.rowCharles = rowC + 1;
    this.columnCharles = columnC;
    validMove = true;
    countCharlesMoves++;
    /** if Charles is moving right, then check if he can make the move */
    if (move == 'L'&& (mazeLayout[rowC][columnC + 1] == spaceAvailable
    || mazeLayout[rowC][columnC + 1] == GOAL)) {
    mazeLayout[rowC][columnC] = spaceUsed;
    mazeLayout[rowC][columnC + 1] = CHARLES;
    this.rowCharles = rowC;
    this.columnCharles = columnC + 1;
    validMove = true;
    countCharlesMoves++;
    /** if Charles is moving up, then check if he can make the move */
    if (move == 'I'&& (mazeLayout[rowC - 1][columnC] == spaceAvailable
    || mazeLayout[rowC - 1][columnC] == GOAL)){
    mazeLayout[rowC][columnC] = spaceUsed;
    mazeLayout[rowC - 1][columnC] = CHARLES;
    this.rowCharles = rowC - 1;
    this.columnCharles = columnC;
    validMove = true;
    countCharlesMoves++;
    return validMove;
    * This method indicates whether the current maze configuration is a winning
    * configuration for either player or not.
    * Return 1 if Ada won
    * Return 2 if Charles won
    * Return 0 if neither won
    * @return int won: Indicates who won the game (1 or 2) or no one won the
    * game (0)
    public static int hasWon() {
    int won = 0;
    /** if location of Goal's row and column equals Ada's then she won */
    if (rowGoal == rowAda && columnGoal == columnAda){
    won = 1;
    /** if location of Goal's row and column equals Charles's then he won */
    if (rowGoal == rowCharles && columnGoal == columnCharles){
    won = 2;
    /** if both players are away from the Goal then no one won */
    if ((rowGoal != rowAda && columnGoal != columnAda) &&
    (rowGoal != rowCharles && columnGoal != columnCharles)) {
    won = 0;
    return won;
    * This method indicates whether in the current maze configuration both
    * players are caught in dead ends.
    * @return deadEnd: boolean value true if both players can't make a valid
    * move, false otherwise
    public static boolean isBlocked(){
    boolean deadEnd = false;
    /** Check if Ada & Charles are blocked */
    if (((mazeLayout[rowAda][columnAda - 1] == wall
    || mazeLayout[rowAda][columnAda - 1] == spaceUsed
    || mazeLayout[rowAda][columnAda - 1] == CHARLES)
    && (mazeLayout[rowAda][columnAda + 1] == wall
    || mazeLayout[rowAda][columnAda + 1] == spaceUsed
    || mazeLayout[rowAda][columnAda + 1] == CHARLES)
    && (mazeLayout[rowAda + 1][columnAda] == wall
    || mazeLayout[rowAda + 1][columnAda] == spaceUsed
    || mazeLayout[rowAda + 1][columnAda] == CHARLES)
    && (mazeLayout[rowAda - 1][columnAda] == wall
    || mazeLayout[rowAda - 1][columnAda] == spaceUsed
    || mazeLayout[rowAda - 1][columnAda] == CHARLES))
    && ((mazeLayout[rowCharles][columnCharles - 1] == wall
    || mazeLayout[rowCharles][columnCharles - 1] == spaceUsed
    || mazeLayout[rowCharles][columnCharles - 1] == ADA)
    && (mazeLayout[rowCharles][columnCharles + 1] == wall
    || mazeLayout[rowCharles][columnCharles + 1] == spaceUsed
    || mazeLayout[rowCharles][columnCharles + 1] == ADA)
    && (mazeLayout[rowCharles + 1][columnCharles] == wall
    || mazeLayout[rowCharles + 1][columnCharles] == spaceUsed
    || mazeLayout[rowCharles + 1][columnCharles] == ADA)
    && (mazeLayout[rowCharles - 1][columnCharles] == wall
    || mazeLayout[rowCharles - 1][columnCharles] == spaceUsed
    || mazeLayout[rowCharles - 1][columnCharles] == ADA))) {
    deadEnd = true;
    return deadEnd;
    * This method returns an integer that represents the number of moves Ada
    * has made so far. Only legal moves are counted.
    * @return int numberOfAdasMoves: number of moves Ada has made so far
    public static int numAdaMoves() {
    return countAdasMoves;
    * This method returns an integer that represents the number of moves Charles
    * has made so far. Only legal moves are counted.
    * @return int numberOfCharlesMoves: number of moves Charles has made so far
    public static int numCharlesMoves() {
    return countCharlesMoves;
    * This method returns a 2D array of characters that represents the current
    * configuration of the maze
    * @return mazeLayout: 2D array that represents the current configuration
    * of the maze
    public static char[][] getGrid() {
    return mazeLayout;
    * This method compares contents of this MazeRace object to given MazeRace.
    * The two will not match if:
    * o the two grids have different dimensions
    * o the two grids have the same dimensios but positions of walls, players or
    * goal differs.
    * @param MazeRace: MazeRace object is passed in and compared with the given
    * MazeRace grid
    * @return boolean mazeEqual: true if both grids are same, false otherwise
    public static boolean equals(char[][] mr) {
    boolean mazeEqual = true;
    /** If the length of the arrays differs, then they are not equal */
    if (mr.length != mazeLayout.length || mr[0].length != mazeLayout[0].length){
    mazeEqual = false;
    } else {
    /** If lengths are same, then compare every element of the array to other */
    int count = 0;
    int row = 0;
    int column = 0;
    while( count < mr.length && mazeEqual) {
    if( mr[row][column] != mazeLayout[row][column]) {
    mazeEqual = false;
    count = count + 1;
    row = row + 1;
    column = column + 1;
    return mazeEqual;
    * This method represents the current state of the maze in a string form
    * @return string mazeString: string representation of the maze configuration
    public String toString() {
    String mazeString = "";
    for (int row = 0; row < mazeLayout.length; row++){
    for (int column = 0; column < mazeLayout[0].length; column++){
    mazeString = mazeString + mazeLayout[row][column];
    mazeString = mazeString + "\n";
    return mazeString.trim();
    The following is the Driver class: MazeRaceDriver
    import javax.swing.*;
    import java.io.*;
    * This class is the starting point for the maze race game. It is invoked
    * from the command line, along with the location of the layout file and
    * the desired interface type. Its main purpose is to initialize the
    * components needed for the game and the specified interface.
    public class MazeRaceDriver {
    * A method that takes a text file representation of the maze and
    * produces a 2D array of characters to represent the same maze.
    * @param layoutFileName location of the file with the maze layout
    * @return The maze layout.
    public static char[][] getLayoutFromFile( String layoutFileName )
    throws IOException {
    BufferedReader br = new BufferedReader(new FileReader(layoutFileName));
    String s = br.readLine();
    int r = 0; // start at row 1
    int c = s.length(); // initialize column to the length of the string
    while(s != null){
    r++;
    s = br.readLine();
    char[][]grid = new char[r][c];
    // this part, gets the text file into a char array
    BufferedReader brr = new BufferedReader(new FileReader(layoutFileName));
    String ss = brr.readLine();
    int row = 0;
    while(ss != null){
    for(int col = 0; col < c; col++){
    grid[row][col] = ss.charAt(col);
    row++;
    ss = brr.readLine();
    return grid;
    * The main method of your program.
    * @param args command-line arguments provided by the user
    public static void main( String[] args ) throws IOException {
    // check for too few or too many command line arguments
    if ( args.length != 2 ) {
    System.out.println( "Usage: " +
    "java MazeRaceDriver <location> <interface type>" );
    return;
    if ( args[1].toLowerCase().equals( "text" ) ) {
    char[][] layout = getLayoutFromFile( args[0] );
    MazeRace maze = new MazeRace( layout );
    MazeRaceTextUI game = new MazeRaceTextUI( maze );
    game.startGame();
    else if ( args[1].toLowerCase().equals( "gui" ) ) {
    // Get the filename using a JFileChooser
    // read the layout from the file
    // starting the window-based maze game
    JFileChooser chooser = new JFileChooser("");
    int returnVal = chooser.showOpenDialog(null);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    BufferedReader br =
    new BufferedReader(new FileReader(chooser.getSelectedFile()));
    String inputLine = br.readLine();
    while (inputLine != null) {
    System.out.println(inputLine);
    inputLine = br.readLine();
    char[][] layout = getLayoutFromFile( args[0] );
    MazeRace maze = new MazeRace( layout );
    MazeRaceWindow game = new MazeRaceWindow( maze );
    game.startGame();
    } else {
    System.out.println("Cancel was selected");
    } else {
    System.out.println( "Invalid interface for game." +
    " Please use either TEXT or GUI." );
    return;
    The following is the MazeRaceWindow class
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    * This class is responsible for displaying the maze race game. It should
    * set up the maze window when the game is started and update the display
    * with each move.
    public class MazeRaceWindow extends JFrame {
    private JLabel[][] mazeLabel;
    private JFrame mazeFrame;
    * Reference to the underlying MazeRace object which needs to be
    * updated when either player moves
    private MazeRace maze;
    * Class constructor for the GUI object
    * @param maze the underlying MazeRace object
    public MazeRaceWindow( MazeRace maze ) {
    this.maze = maze;
    System.out.println(maze);
    mazeFrame = new JFrame();
    mazeFrame.setSize(200,200);
    Container content = mazeFrame.getContentPane();
    System.out.println(content);
    content.setLayout(new GridLayout(.length, mazeLayout[0].Length));
    for (int i = 0; i < MazeRace.length; i++ ) {
    for (int j = 0; j < MazeRace[0].length; j++ ) {
    mazeLabel = new JLabel[MazeRace.rowLength][MazeRace.columnLength];
    content.add(mazeLabel[i][j]);
    System.out.println(mazeLabel[i][j]);
    mazeFrame.pack();
    mazeFrame.setVisible(true);
    //content.add(mazeLabel);
    //mazeFrame.addKeyListener(this);
    * A method to be called to get the game running.
    public void startGame() throws IOException {
    System.out.println();
    /* loop to continue to accept moves as long as there is at least one
    * player able to move and no one has won yet
    while ( !maze.isBlocked() && maze.hasWon() == 0 ) {
    // prints out current state of maze
    System.out.println( maze.toString() );
    System.out.println();
    // gets next move from players
    System.out.println("Next move?");
    System.out.print("> ");
    BufferedReader buffer =
    new BufferedReader( new InputStreamReader( System.in ) );
    String moveText = "";
    moveText = buffer.readLine();
    System.out.println();
    // note that even if a string of more than one character is entered,
    // only the first character is used
    if ( moveText.length() >= 1 ) {
    char move = moveText.charAt( 0 );
    boolean validMove = maze.move( move );
    // The game has finished, so we output the final state of the maze, and
    // a message describing the outcome.
    System.out.println( maze );
    int status = maze.hasWon();
    if ( status == 1 ) {
    System.out.println( "Congratulations Ada! You won the maze in "
    + maze.numAdaMoves() + " moves!" );
    } else if ( status == 2 ) {
    System.out.println( "Congratulations Charles! You won the maze in "
    + maze.numCharlesMoves() + " moves!" );
    } else {
    System.out.println( "Stalemate! Both players are stuck. "
    + "Better luck next time." );
    The following is the Listener class: MazeRaceListener
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    /** Listens for keystrokes from the GUI interface to the MazeRace game. */
    public class MazeRaceListener extends KeyAdapter {
    * Reference to the underlying MazeRace object which needs to be updated
    * when either player moves
    private MazeRace maze;
    * Reference to the MazeRaceWindow object that displays the state of
    * the game
    private MazeRaceWindow mazeWindow;
    * Class constructor for the key listener object
    * @param maze the underlying MazeRace object
    public MazeRaceListener( MazeRace maze ) {
    this.maze = maze;
    * A method that sets which JFrame will display the game and need to be
    * updated with each move.
    * @param window the JFrame object that displays the state of the game
    public void setMazeRaceWindow( MazeRaceWindow window ) {
    mazeWindow = window;
    * A method that will be called each time a key is pressed on the active
    * game display JFrame.
    * @param event contains the pertinent information about the keyboard
    * event
    public void keyTyped( KeyEvent event ) {
    char move = event.getKeyChar();
    // TODO: complete method so that the appropriate action is taken
    // in the game
    //mazeLabel.setText(String.valueOf(move).toUpperCase());
    }

    and listen to the keys (A,S,D,W & J,K,L,I) and make the move accordingly [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html]How to Use Key Bindings

  • Need Help with a JAVA programming assignment

    How do I write a JAVA program that could be used as the start of an MS-DOS/Windows simulation of the IEEE 802.3 protocol? I am to only code the parts necessary to build the 802.3 frame. For the initial implementation, the Checksum function need not be a CRC function, and the Destination and Source addresses wil be in input, stored, and output, and in dotted-decimal format.
    I need:
    1. A record to describe the frame, with each field being a (byte-) string of the required size, except that the Data field is of variable size. Although the "Source address" and "Destination address" would be 6 bytes for a real implementation, for this first implementation you can either assume they'll be text strings in the usual "dotted decimal" form (e.g. "14.04.05.18.01.25" as a typical example--from Tanenbaum, p. 429), or 6 hex digits.
    2. Suitable constant declarations for values such as the standard "Preamble" and "Start of Frame" values.
    3. Suitable functions to Get the three variable values "Destination address", "Source address", and "Data" from the standard input device.
    4. A suitable function to display each of the fields of a given frame in a format such as:
    Preamble: ...
    StartofFrame: ...
    Destination: ...
    etc.
    5. A suitable function to generate a "Pad" field if necessary.
    6. A "dummy" Checksum-generating function which just takes the first 32 bits (4 bytes) of the Data (or Data+Pad, if necessary) rather than an actual CRC algorithm.
    I have no experience with Java. Can you help me or start me in the right direction?
    Thanks...........TK

    If you have no experience with Java, then it seems to me your first step should be to start learning the language. But it's difficult to advise how, since we don't know anything about your background. There are many good books available on Java, some are for beginners and some are for advanced programmers, so I'd suggest you go somewhere that has a large selection and start looking for something that doesn't seem completely over your head.

  • Need Help with a Java programming exercise.

    I have to Write a program that reads two times in military format (0900, 1730) and prints the number of hours and minutes between two times. Supply your own test program. Here are two sample runs. User inputs are the numbers.
    Please enter the first time: 0900
    Please enter the second time: 1730
    8 hours 30 minutes
    Please enter the first time: 1730
    Please enter the second time: 0900
    15 hours 30 minutes
    Test Program I can write up myself. But the entire constructor I have no idea how to start. This is basic Java Coding. no C++ no importing anything.
    So far this is what I got and I'm sure it's wrong:
    public class TimeInterval
    private double hours;
    private double minutes;
    public TimeInterval(double Time1, double Time2)
    hours =
    minutes =
    }

    tad2382 wrote:
    Jverd,
    I'm guessing that in your early days on this forum you must have spent a lot of time explaining constructors, object creation, etc. Now, after some 40K posts to the forum, you figure newbies should just go and read the documentation. Is that what a lot of veteran posters feel?Perhaps the OP is not aware of the fact the Sun has a good deal of high quality study material published on their website. What's wrong with posting it in a thread? Why should one copy the same thing over and over again? If after reading that tutorial, the OP still has some questions about it, s/he is free to post a follow up question. I am sure that many of the regulars here are more than happy to answer them.
    Also note that the OP's problem description is rather vague. A "I don't know where to start" is IMO best answered by a link to a comprehensive tutorial or a beginners book.
    Being one of the (relatively) novice posters on the forum, I still feel the need to customize posts,Well, by all means: do so.
    trying to see things from the poster's side. Maybe after a few thousand posts, I'll just keep throwing the same documentation at newbies, instead of detailed customized responses, heh.IMO, that's a load of cr@p.

  • Need Help with a Java Question Plz

    Hi
    Could someone help me out with this please?
    I need to know the difference between the two String methods equals and equalsIgnoreCase
    Thanks

    The former tests if the Strings are equal, the latter tests if they're equal, but ignores case...
    I.e. "A".equalsIgnoreCase("a") returns true, among other things...

  • Need help for downloading java at mac book retina

    i want to download java at my mac book pro retina but everytime we downloaded its not working..i need this because im going to use it to open my bank account...everytime i gonna check my bank account i need to use another computer not this my mac.why?? can you help me please.

    Banks do NOT use Java-in-a-Browser for anything, at all. If you have received a suggestion to conduct banking with JAVA enabled in your Browser, someone is attempting to commit a crime, with you as the intended victim.  You are being scammed and should report it to the Police.

  • Need help! Vrml&Java&Java3D

    I want to control a Vrml Model through Java applet or Java 3D,I try some methods,but none of them work well.
    I edited my source code in UltraEdit,and compiled it under command line,in my classpath,I had added the vrml97.jar,so I compiled it successful,but when I run it,it cause a exception"NoClassDefException",what should I do?
    So I changed my method,I used another "jar" file provided by cosmoplayer,a Vrml Browser,to control my model,as example in the web,I complied it successful,but when I run it through IE,it still cause some exceptions,even when I try the example provided by cosmoplayer itself,it also give me some wrong information just like this:
    Loading Script Node class http://foo.co.jp/Example1.class
    # Could not load the script class http://foo.co.jp/Example1.class.
    # Please make sure the class is declared PUBLIC or the class file exists.
    but this class file is on that path properly! I was puzzled
    with this for a long time.by the way,all the document in the web only write the source file like this:
    import vrml.*;but I can't found this package,so I renamed the nocosmop21.jar into vrml.jar.and put it in the classpath,but I think this is not the correct way,it must cause a lot of trouble.So if I want use the jar provided with cosmoplayer,what should I do?

    Did you install Vrml97.jar in your JRE's ext folder (so it will be used in running your applet) as well as you SDK's folder (so that it can be used in the compile)?
    Check out the link shown below where I've worked with another person who had similar problem -- while I was able to finally helped that person, it turned out that I wasn't too succesful myself simply because I was using SDK1.3.1.
    http://forum.java.sun.com/thread.jsp?forum=37&thread=231662
    The problem with using vrml in an applet is that if you need to read a .wrl file from the local disk with the vrml class loader, you run into two security violations: runtime permission to use the class loader and i/o permission to read the local disk file. The URL that I posted in the link shown above is still active and you can try to run this self-signed applet to see if it works for you.
    V.V.

  • Need help in interfacing Java and MSMQ.

    Dear Java Guru,
    I am migrating my application from Microsoft Visual Basic to Sun's Java. All the presentation, logic and data layers are already done in Java but we need to retain MSMQ feature as our application server and browsers are using Microsoft OS.
    I have check with Microsoft newsgroups and the sample program and libraries they provide requires the use of VJ++. But I do not want to use VJ++ as I am using pure Java. I would be grateful if you can provide me some sample program and the libraries that I need to include in my classpath. Please advise how to interface Sun's Java to MSMQ in this context and any documentation will be helpful.
    URGENT !
    Regards,
    yckok.

    Hi,
    to use MSMQ in java you should embed MSMQ ActiveX in your java application, which gets messages from one queue type and transfer to another type. If you get my freeware API njawin (njawin11.zip) at http://www.simtel.net/pub/winnt/java/ you will find there an example with MSMQ COM control.
    Vitally

  • Need help getting this Java app to work on Mac OS X

    Aloha all,
    I am testing this new Java app that was built that is based on th Axis and Allies strategy gaming engine. On the PC the author wrote a .bat file to launch the app and the JVM. But when I try and enter the arguments on the Mac OS X via the terminal window I get the Usage/Options argument options back. The ,bat file goes as follows:
    java -Xincgc -classpath ../classes;../lib/crimson.jar;../lib/jaxp.jar games.strategy.engine.framework.GameRunner
    It looks to me as if OS X if having problems with -Xincgc argument. I checked to see if I needed to download the JVM, but according to Apple it is already built in. Is there another way to enter the arguments to get this app to launch?
    Maui Duck

    Does OS X use ';' as a separator like windows, or does it use ':' like UNIX. that might be the problem.

Maybe you are looking for