• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Calling a helper tool from Java code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a helper tool from Java code


  • Subject: Re: Calling a helper tool from Java code
  • From: Peter Sichel <email@hidden>
  • Date: Fri, 30 Apr 2004 09:09:30 -0400

On Apr 29, 2004, at 8:30 PM, OL&L Lists wrote:

I need to call a setuid privileged helper tool from a Java applet on Mac OS X 10.3.x.
...
The problem that I have is that the Java code cannot reference the CFDictionary data type (remember Java code is cross-platform and thus does not have knowledge of any platform's data types).

Is there some way I can call Mac-specific C code from Java code and pass Mac-specific data types? Or is this an impossibility?

I'm familiar with Cocoa rather than Java, but a simple solution might be to
translate your CFDictionary to an XML string (property list), pass the string,
and then convert it back to an NSDictionary as needed.

In Cocoa, converting between an NSDictionary and NSString property list is
one line of code. If you make your calling layer or helper tool be a
"Foundation" tool, you can use the same trick to convert it back again.

From a cross platform standpoint, passing around XML plists would seem like
a much cleaner interface.

- Peter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


References: 
 >Calling a helper tool from Java code (From: OL&L Lists <email@hidden>)

  • Prev by Date: CFNetwork and 404
  • Next by Date: Re: Temporarily setting DNS servers
  • Previous by thread: Calling a helper tool from Java code
  • Next by thread: CFNetwork and 404
  • Index(es):
    • Date
    • Thread