|Java code doesn't work - 2 questions [message #684689]
||Thu, 16 June 2011 04:02
Registered: June 2011
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:|
Gives the error: "The input eisbot cannot be resolved". 'eisbot' is the name of my project.
I have many errors of this type (replace unit with other class names):
"Unit cannot be resolved to a type"
"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
Zip file was empty, not sure what happened. Should be right now though.
(Size: 94.65KB, Downloaded 71 times)
[Updated on: Thu, 23 June 2011 04:13]
Report message to a moderator
|Re: Java code doesn't work - 2 questions [message #687738 is a reply to message #687711]
||Thu, 23 June 2011 05:48
| Satyam Kandula
Registered: July 2009
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.
Powered by FUDForum
. Page generated in 0.11582 seconds