Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa-java related.



Hi All,

I am developing a GUI based Cocoa-Java application.

I need to invoke some functionalities present in a jar file.This particular
jar file is not built using Cocoa framework.

When I tried to execute the application i got the following error -

  2004-12-29 23:18:57.068 CocoaClient[2937] Unknown class `MyAppDelegate' in
nib file, using `NSObject' instead.
  2004-12-29 23:18:57.128 CocoaClient[2937] Could not connect the action
onConnect: to target of class NSObject.

Following is the source code of the two files that I have used-

/* MyAppDelegate.java */

import com.apple.cocoa.foundation.*;
import com.apple.cocoa.application.*;

public class MyAppDelegate {  // This class is a subclass of
java.lang.Object


    public void onConnect(Object sender) 
	{
	      try
	     {
	          Middle midObj = new Middle();	
	          midObj.establishConnection();
	     }
		 catch(Exception e)
		 {
		     System.out.println(e);
		 }
    }



/*Middle.java*/


import com.apple.cocoa.foundation.*;
import com.apple.cocoa.application.*;
import ipc.hello.ipp.*;
import ipc.hello.ipp.request.*;
import ipc.hello.hook.*;
import ipc.hello.ipp.response.*;

public class Middle implements MessageReceiver
{
     public void establishConnection()throws Exception
	 {
	    		  
	     ServerConnection serv=new
ServerConnection("10.91.194.86",3456,null,0,null);
		 serv.addMessageReceiver(this);
		 
	     ReqClientConnect con=new ReqClientConnect(0,0, 3, 0, 3,0);
		 serv.send(con);                                  
		
	 }
     public synchronized boolean receive(InMessage message)
     {
          return true;
	 } 

}


But when I don't create the object of Middle class in onConnect(), the
application runs successfully.

Now is it possible to use the classes present in the jar file from this
Cocoa -java based application.

If yes ,how to go about it .



-Regards,
Hemanta.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.