• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to compile this project which has no main function?  RSS feed

 
Paul Ho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new at this.It's very nice to have a chance talking with you guys

I try to compile a project with eclipse.But eclipse doesn't recognize it.

This project comprises several .java files which are the sub-class functions.
And I'm confused because there is no 'main' functions at the project.

How to build this project,guys?

I have uploaded the project and this is a BinNavi5 plugin which use to find a path between two functions' blocks.
Attachment:
I can't find upload button.
I upload here.http://pan.baidu.com/share/link?shareid=2781046543&uk=2637616466
Let me know if you can't find it.

Thanks!


--------------------------------------------------------------------
second post:

The truth is,I face many questions and I don't even know where to start to ask.
So I thought it would be less difficult to understand where the main problem is if I upload the project here and let someone do it in his own way.

Well,I was wrong.And I might want to post the questions one by one.
It may be a long and boring.Just don't give up on me.Is that ok?

I have trid compile it from the command line before.
And since I still haven't found the upload button after I choose the uploading files, I just type the errors and expections below.

Goal: build this java project.
OS & jdk: XP + jdk 1.6.0_45

A.compile with javac.exe
a)ERROR
CMD:
D:\..\javac_path>javac -sourcepath D:\this_project_path\ D:\this_project_path\PathFinder.java

Echo:
D:\this_project_path\PathFinder.java:15: SoftwarePackage com.google.common.base doesn't exist import com.google.common.base.Preconditions;

D:\this_project_path\PathFinder.java:17: couldn't find symbol
symbol: class CUtilityFunctions
address: SoftwarPackage com.google.security.zynamics.binnavi
import com.google.security.zynamics.binnavi.CUtilityFunctions;

Code:


b)
I read the zynamics user manual and it doesn't specific where to get this google java libs.
And there are some .jar files in a folder named 'BIN'.I trid to conclude it(cmd>javac -classpath d:\BIN ..).But it got the same error.So these may not be the java libs I need.

I tried to download 'guava-libraries' from 'code.google.com' and add to the -classpath.It got the same error.So the 'guava' may not be the java libs I need,either.

c)questions
Where can I find these particular 'common.base' and 'zynamics.binnavi' libs?

Hope you guys will see it.Thanks!



 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather than posting a link to an external site which we can't trust or know, why don't you tell us specifically what you are having trouble with? What have you tried? What errors were given? How did it not work?

Not all Java projects need a main method or main class. They can be used as libraries in other applications or used to run internal to some other framework (such as Servlets or drop-ins). So having no main is not an issue, not a surprise, and a red herring if you think that is a reason for not being able to import the project.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surely Eclipse is giving you some kind of error or notification. And if not, then try compiling from the command line. If you don't know how to do that, then I'd suggest you un-install Eclipse until you CAN, since understanding compile issues like that is a key piece of knowledge you will need.


Eclipse is great for a lot of things, but until you understand the fundamentals, it really can be more of a crutch than a tool.
 
Paul Ho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Luke wrote:Rather than posting a link to an external site which we can't trust or know, why don't you tell us specifically what you are having trouble with? What have you tried? What errors were given? How did it not work?

Not all Java projects need a main method or main class. They can be used as libraries in other applications or used to run internal to some other framework (such as Servlets or drop-ins). So having no main is not an issue, not a surprise, and a red herring if you think that is a reason for not being able to import the project.


Thanks for your attantion,Steve.I have revised my question.Hope you would help me out here
 
Paul Ho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:Surely Eclipse is giving you some kind of error or notification. And if not, then try compiling from the command line. If you don't know how to do that, then I'd suggest you un-install Eclipse until you CAN, since understanding compile issues like that is a key piece of knowledge you will need.


Eclipse is great for a lot of things, but until you understand the fundamentals, it really can be more of a crutch than a tool.


Hi,fred.Nice to meet you!
I'm new at this.And I got some error from the command line.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well..the obvious question is...Do you have the google package you are trying to access?

Generally, things will work better here if you keep it to one question/topic per thread.

It's really kind of hard to answer you qeustions without seeing your code. If you can, post it here (and please UseCodeTags), but not if it is more than about 100 lines...people just won't bother if it is over that.

If you are a newbie, then perhaps this isn't where you should be starting. Can you compile a HelloWorld.java program, and get it to run, all on the command line?
 
Paul Ho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:well..the obvious question is...Do you have the google package you are trying to access?

Generally, things will work better here if you keep it to one question/topic per thread.

It's really kind of hard to answer you qeustions without seeing your code. If you can, post it here (and please UseCodeTags), but not if it is more than about 100 lines...people just won't bother if it is over that.

If you are a newbie, then perhaps this isn't where you should be starting. Can you compile a HelloWorld.java program, and get it to run, all on the command line?



No,I haven't figure out which particular package I needed yet

I wonder if I can search the APIs names that the project is trying to import at code.google.com so that I will know which package I need.
Somehow,I didn't manage to find these APIs reference which content the information about API lib's name like MSDN do.
So I download 'guava-libraries' which I googled the similar keywords bofore and imported into the -claaspath.
But it got the same error.

I can compile some simple program on the command line after I looked up some javac guidence
And one question at each thread is a good idea.I will keep doing in that way when I separate each independent questions later.

Right now I think my question is where I can find these particular 'common.base' and 'zynamics.binnavi' libs.

I have solved the problem.Thanks for your attantion!
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Ho wrote:Right now I think my question is where I can find these particular 'common.base' and 'zynamics.binnavi' libs.

Where did you get the code you are trying to compile? That site should have a list of dependencies on it. If not, send them an email to ask.
 
Paul Ho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Luke wrote:
Paul Ho wrote:Right now I think my question is where I can find these particular 'common.base' and 'zynamics.binnavi' libs.

Where did you get the code you are trying to compile? That site should have a list of dependencies on it. If not, send them an email to ask.


I changed the version of project and solved this problem finally.Thanks for your reply.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!