Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 3, 2006, 08:47 AM   #1
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Make a new Folder with Java

Hey

I wondered how you created a new folder or directory with java, when in xcode with the code

File f=new File("/test");
if(f.exists()==false){
f.mkdirs();
}

it produces two cannot find symbol errors on the first line. Why is this? how do I create a directory with Java on Mac OS X?

Thanks

Matthew
Eraserhead is offline   0 Reply With Quote
Old Apr 3, 2006, 09:02 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Java 101: Have you imported java.io.File? If not then you will not be able to use it like that (you could replace File with java.io.File)...
robbieduncan is offline   0 Reply With Quote
Old Apr 3, 2006, 09:14 AM   #3
Eraserhead
Thread Starter
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Thanks, I knew it'd be something like that.
Eraserhead is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
New Folder with Selection keyboard shortcut Mightee Mac OS X 10.7 Lion 4 Dec 20, 2012 10:24 AM
Moving some Home folders with Symlinks!? Help! Fallinangel Mac OS X 10.7 Lion 0 Sep 27, 2011 07:01 AM
Which upgrades to make on new MBP? rsamo MacBook Pro 11 Nov 27, 2010 02:38 PM
how to make a new folder in mail? goobot iPhone 7 Apr 12, 2010 04:08 PM
Why Can't I Make a New Folder? Shake 'n' Bake OS X 8 Jul 3, 2009 07:21 PM


All times are GMT -5. The time now is 07:20 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC