Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java code doesn't work - 2 questions
Java code doesn't work - 2 questions [message #684689] Thu, 16 June 2011 04:02 Go to next message
arcticrealm is currently offline arcticrealmFriend
Messages: 4
Registered: June 2011
Junior Member
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 136 times)

[Updated on: Thu, 23 June 2011 04:13]

Report message to a moderator

Re: Java code doesn't work - 2 questions [message #684781 is a reply to message #684689] Thu, 16 June 2011 08:28 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
The zip seems to be corrupted. I couldn't see the projects.
Re: Java code doesn't work - 2 questions [message #687711 is a reply to message #684781] Thu, 23 June 2011 04:12 Go to previous messageGo to next message
arcticrealm is currently offline arcticrealmFriend
Messages: 4
Registered: June 2011
Junior Member
Strange, my zip doesn't have contents either, not sure how that happened. Here's a new one.
  • Attachment: eisbot.zip
    (Size: 94.65KB, Downloaded 165 times)
Re: Java code doesn't work - 2 questions [message #687738 is a reply to message #687711] Thu, 23 June 2011 05:48 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
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] Sun, 26 June 2011 03:49 Go to previous message
arcticrealm is currently offline arcticrealmFriend
Messages: 4
Registered: June 2011
Junior Member
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!
Previous Topic:how to udpdate eclipse 3.6 to 3.7
Next Topic:Writing Plugin for Rational Software Architect
Goto Forum:
  


Current Time: Thu Apr 25 19:31:38 GMT 2024

Powered by FUDForum. Page generated in 0.08691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top