Help Saving Picture to Certain Location

Joined
Aug 1, 2007
Messages
40
Reaction score
0
Points
6
Sorry that I dont know how to explain this any better, but I am writing a program in java, and need to save a picture.

I would know how to do this on a Windows machine, but I dont know the filepath on a Mac of where to save it.

For example on a Windows machine, I would write:
pictureObj.write(C:/picture.jpg);

And that would save the picture to my C drive. How can I save it to my desktop on a Mac?

Thanks.
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
Not sure of the Java part of it... but the path to your desktop is:

/Users/"USERNAME"/Desktop

"USERNAME" is replaced with YOUR actual home folder name (no quotes).

You can also use:

~/Desktop


The "~" symbolizes the User Home Folder within unix.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top