| | |
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 |
-xlint actionlistener android api applet application array arrays automation bi binary blackberry block bluetooth character class client code compile compiler component consumer database desktop developmenthelp eclipse error fractal freeze ftp game gameprogramming givemetehcodez graphics gui health html ide image integer j2me j2seprojects java javac javaee javaprojects jetbrains jni jpanel jtable julia learningresources lego linked linux list login loops mac main map method methods mobile netbeans notdisplaying number online printf problem program project properties qt recursion researchinmotion rotatetext rsa scanner screen server set singleton sms sort sql string swing system textfields threads time title tree tutorial-sample update variablebinding windows working xor






