NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
shadders
Joined: 17 May 2012 Posts: 3
|
Posted: Thu May 17, 2012 11:04 pm Post subject: Basic Question - IDE and Package/Import |
|
|
Hi,
Apologies for this very basic question.
I am working through the java book for v6, and the book supplies netbeans IDE but only uses the jdk from Sun at the command line.
I have created a class in a file with the java extension.
I wish to use the class in an application.
How do i reference this class or file, to use the class in the application ?
1. I have copied the java file to the src directory in the IDE but this does not work.
2. I added the java class file to the library in the IDE and this did not work.
3. i have checked the help file - could not find the relevant section.
4. i used the library manager - added as a library and source - still did not work.
5. (Note added 18/5/2012) - i have followed the tutorial on this web site - added the JAR to the project in the library - and this does not work - so i am missing something basic or obvious ?.
I suppose i do not know if i use "import" or "package" keyword - since i am new to java.
I know how to accomplish in C/C++/C#, but no java.
If anyone can provide guidance on this basic issue - i would be most grateful.
Thanks and regards,
Richard. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|