|
Author |
Topic: question about java 'import' statements (Read 388 times) |
|
nluken
|
question about java 'import' statements
« on: Oct 1st, 2002, 6:34am » |
|
Hi p5 gang, I'm just starting out and so have all kinds of probably silly questions, so please bear with me.. What is the procedure for importing, say, java.util.*? in previous versions you could just put the statement at the top of the file and be done with it, but now I get an error that p5 doesn't recognize the keyword 'import'. Second question: Can I use external classes or p5 files from elsewhere? By the way, this website (and processing in general) is a fantastic resource, and I'm very pleased to have the opportunity to play with it. thanks in advance, noah.
|
|
|
|
fry
|
Re: question about java 'import' statements
« Reply #1 on: Oct 2nd, 2002, 11:34pm » |
|
most of the standard java.* are imported by default, so no need to include java.util or others. this is the case for all the jdk 1.1 packages (exported code is all 1.1 friendly for applet purposes, even though some platforms have 1.3). as for including other classes or jar files.. well.. support for that isn't complete. there are ways to hack around it but i wouldn't recommend it. it's planned for a future version, where one of the subdirectories for your project in the sketchbook will be something like 'classes' and all those goodies will be added automatically.
|
|
|
|
mbritton72
|
Re: question about java 'import' statements
« Reply #2 on: Jul 22nd, 2003, 8:23pm » |
|
Does this mean there are plans to support swing?
|
|
|
|
fry
|
Re: question about java 'import' statements
« Reply #3 on: Jul 22nd, 2003, 10:46pm » |
|
probably only in the full 'java' mode once that's available.
|
|
|
|
|