Java code doesn't work - 2 questions [message #684689] |
Thu, 16 June 2011 00:02  |
Eclipse User |
|
|
|
I've been trying to get some java code to work in eclipse, but I get these errors I can't solve and searching the internet hasn't turned up anything that worked yet. I'm using Eclipse 3.6.2, Windows Vista and Java jdk1.6.0_25 and jre6. My errors are:
1) Importing
"import java.awt.Point;"
Gives the error: "The input eisbot cannot be resolved". 'eisbot' is the name of my project.
2)Type problems
I have many errors of this type (replace unit with other class names):
"Unit cannot be resolved to a type"
and also;
"The method getEnemyUnits() from the type JNIWAPI refers to the missing type Unit"
Attached is my project.
I've modified the ini like the sticky said, I've added the workspace library, removed it, added it again, removed it and added it again, restarted eclipse and refreshed eclipse but I still get these errors. It's like it can't find the java files, even though the include package code doesn't give errors. I've also posted about this on brood war AI and sent emails to the author, but no luck so far.
The main method is in ExampleAIClient.java
Please help!
Edit:
Zip file was empty, not sure what happened. Should be right now though.
Attachment: eisbot.zip
(Size: 94.65KB, Downloaded 165 times)
[Updated on: Thu, 23 June 2011 00:13] by Moderator
|
|
|
|
|
Re: Java code doesn't work - 2 questions [message #687738 is a reply to message #687711] |
Thu, 23 June 2011 01:48   |
Eclipse User |
|
|
|
If you had expanded the + at import java.awt.Point, it would show all the imports in your file and you could have probably figured out the problem. To just complete, the error is coming from the lines import eisbot.proxy.model.xxxx, they should have been src.proxy.model.xxx.
You have made the project directory as the source folder, which is generally not an usual practice. Generally the src folder is the source folder. To change the source folder, right click on the project, select Properties and on the dialog box that opens, select Java Build path, go to the tab source and remove the entry which says the project as the source folder, add src as the source folder and remove all references to src as the package names from your classes.
|
|
|
Re: Java code doesn't work - 2 questions [message #688881 is a reply to message #684689] |
Sat, 25 June 2011 23:49  |
Eclipse User |
|
|
|
Ohh ok. I didn't realize there was a + there. I forgot you could hide code by + signs as well.
Now I have to figure out how to get the AI dlls and stuff so I can use this with chaos launcher and bwapi. But that's a tale for another forum.
Thanks everyone for your help!
|
|
|
Powered by
FUDForum. Page generated in 0.09888 seconds