• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

How to copy MAC file (with both resource and data forks) in Java ?

Hi,

I would like to find out how to copy MAC files that have both resource and data forks in Java ?
- Have tried using JConfig but doesn't work well - keeps hanging.
- Have also tried executing an applescript from within the Java codes, it works but performance is quite bad.

Thank you in advance.

Rgds,
Sze Ling
0
szelingon
Asked:
szelingon
  • 2
1 Solution
 
Tommy BraasCommented:
Are you trying to do this on Mac OS X, or on an earlier version of Mac OS? Does it have to work on both versions?
0
 
szelingonAuthor Commented:
I am doing this on MAC OS X.

BTW, I found another workaround. Using Java's Runtime.exec to run the "ditto" command. It's working thus far with one limitation though. Src file and destination file supplied to the ditto command cannot exceed more than 50 chars.
0
 
Tommy BraasCommented:
You can also use the CpMac command available as a part of the developer tools distribution. I am assuming that you're looking to distribute this app to machines that don't necessarily have the dev tools installed?

Good that you found a solution!
0
 
CetusMODCommented:
PAQed, with points refunded (125)

CetusMOD
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now