Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 3, 2006, 09: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, 10: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, 10: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

Similar Threads
thread Thread Starter Forum Replies Last Post
Does anyone know how to make this folder normal? lmw0612 OS X 10.8 Mountain Lion 0 Jul 25, 2013 12:38 PM
Chrome on OS X -- Java plugin / Java 7 vs Java 6 Issue booyahbooyah Mac Applications and Mac App Store 4 May 31, 2013 10:13 AM
I want to make AppleScript Create Folder DavidBlack Mac Programming 27 Mar 15, 2013 07:18 PM
How to make a Folder mrmember iPad Apps 0 Nov 15, 2012 11:25 AM
Unable to make changes to Documents folder in my User Folder spacedesign911 OS X 1 Jul 5, 2012 11:44 PM

Forum Jump

All times are GMT -5. The time now is 10:21 PM.

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

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