| | |
Netbeans:Importing existing code conundrum...
Thread Solved
![]() |
Hi,
I am kinda new to java netbeans...i have downloaded some java code which is n implementation of the algorithms in the book AI:A Modern Approach.
After extraction, the folder has bin, build, doc and src folders which hold various .class and .java files.
Now my problem is that i want to access these classes in another netbeans project. I tried using the template "project with exisiting sources", but i ended up with an "incorrect package" error all over.
Plss help....
Suvir
I am kinda new to java netbeans...i have downloaded some java code which is n implementation of the algorithms in the book AI:A Modern Approach.
After extraction, the folder has bin, build, doc and src folders which hold various .class and .java files.
Now my problem is that i want to access these classes in another netbeans project. I tried using the template "project with exisiting sources", but i ended up with an "incorrect package" error all over.
Plss help....
Suvir
There is a second possibility that suvirj uses a book that from chapter section to another chapter section change code little and he would like to keep original code, but on other hand he also want to apply changes as suggested in new exercises.
In this case create new project as the book ask you, then in Windows Explorer go to location of your original/previous project, copy files from src (source) folder to src folder of your newly created project directory.
In doing so you will have copy of previous exercise and you can continue with new one.
PS: You just posted reply, but this still does not make sense. Can you clarify issue with consideration of what I wrote above?
In this case create new project as the book ask you, then in Windows Explorer go to location of your original/previous project, copy files from src (source) folder to src folder of your newly created project directory.
In doing so you will have copy of previous exercise and you can continue with new one.
PS: You just posted reply, but this still does not make sense. Can you clarify issue with consideration of what I wrote above?
Last edited by peter_budo; Dec 15th, 2008 at 1:00 pm. Reason: Adding PS
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
I am only trying to add the files that i downloaded into a blank project in NB.
Step 1) I created a new project in NB
Step 2) I right clicked project name->project properties->Libraries, and i added the directory which contains the class files.
But this doesnt do it. In the "project" window ( to the left by default) I see the names of all the classes that i want to add. BUT next to each one, I see a small red exclamation mark which says "Incorrect package" when i hover my pointer over it.
????
Step 1) I created a new project in NB
Step 2) I right clicked project name->project properties->Libraries, and i added the directory which contains the class files.
But this doesnt do it. In the "project" window ( to the left by default) I see the names of all the classes that i want to add. BUT next to each one, I see a small red exclamation mark which says "Incorrect package" when i hover my pointer over it.
????
Well, if you had read the instructions for that project (which I found here in just a couple of clicks), you might have seen this part: Which means you should just add that folder to your Libraries under the Project Properties.
•
•
•
•
If you just want to use the classes, all you need to do is put the aima-java/build directory on your CLASSPATH.
Do as per may previous post.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Other Threads in the Java Forum
- Previous Thread: Need help with max/min'ing multiply
- Next Thread: Loading Images
| Thread Tools | Search this Thread |
911 actionlistener addball addressbook android applet application apps array automation binary bluetooth businessintelligence button card character class client code collision component consumer crashcourse css csv database desktop eclipse ee error fractal free ftp game givemetehcodez graphics gui html image integration j2me j2seprojects japplet java javaarraylist javac javadoc javaee javafx javaprojects jni jpanel julia jvm lego linked linux loan mac method migrate mobile netbeans objects online oriented phone physics printf problem program project projects radio recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server service set sms software sort sql swing test textfield threads time tree trolltech ubuntu update utility windows






