Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
bibodo
Posts: 23
Registered: ‎04-22-2009
Accepted Solution

No definition found for exported static routine: .main(String[])

Hi,

 

I am developing for the BlackBerry with the JDE-Eclipse-Plugin-1.0.0.67 on an Eclipse-3.4.2 using the simulator 4.7.0.46.

 

Eclipse seems to not compile anymore. When I start the debugger the compiler runs but producese corrupt output i.e. When the simulator starts up the application under development does not apear in the download section.

 

I get the  the following message in the comile log.

 

Warning!: No entry points found
Optimizing
Populating
Warning!: No definition found for exported static routine: .main(String[])

 

I tryed ..

...to close the project in eclipse.

..to delete the project and reimport it to eclipse.

 

When I run the debuger from the JDE everything runs fine.

 

Has anybody any idea to solve this problem?

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

Re: No definition found for exported static routine: .main(String[])

I guess my first question is, does your main class have a public main() method defined? The compiler thinks "no".

 

 

 

 

 

 

Please use plain text.
Developer
Ted_Hopp
Posts: 1,304
Registered: ‎01-21-2009

Re: No definition found for exported static routine: .main(String[])

Did you create the project as a BlackBerry project? Do you have a class that declare a method

 

public static void main(String[] args) {

}

Have you activated the project for BlackBerry? (Check by a right click on the project in Package Explorer and look for a check mark on the menu that pops up).

 




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Please use plain text.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Carrier: ***

Re: No definition found for exported static routine: .main(String[])

[ Edited ]

Every java application has to have an entry point.

 

Method that invoked when the application starts.

 

It is 

 

public static void main(String[] args)

 

As you're a newbie check this link:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=13264&jump=true

Message Edited by tbilisoft on 22-05-2009 05:07 PM
Please use plain text.
Developer
bibodo
Posts: 23
Registered: ‎04-22-2009

Re: No definition found for exported static routine: .main(String[])

Thanks for your reply.

Yes I have a class with a static main method and I forgott to mention the project comiled before.

 

 
Please use plain text.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Carrier: ***

Re: No definition found for exported static routine: .main(String[])

Is this class included into your project ?

 

Can you observe it as a part of your project in Eclipse ?

Please use plain text.
Developer
bibodo
Posts: 23
Registered: ‎04-22-2009

Re: No definition found for exported static routine: .main(String[])


Ted_Hopp wrote:

Did you create the project as a BlackBerry project? Do you have a class that declare a method

 

public static void main(String[] args) {

}

Have you activated the project for BlackBerry? (Check by a right click on the project in Package Explorer and look for a check mark on the menu that pops up).

 


Yes I created the project as a BlackBerry project with the BlackBerry JDE then I imported it into Eclipse. Yes I have activated the project for BlackBerry. I forgott to mention that the project already compiled before.

Please use plain text.
Developer
bibodo
Posts: 23
Registered: ‎04-22-2009

Re: No definition found for exported static routine: .main(String[])


tbilisoft wrote:

Is this class included into your project ?

Yes.

Can you observe it as a part of your project in Eclipse ?

Yes.


 

Please use plain text.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Carrier: ***

Re: No definition found for exported static routine: .main(String[])

Try to recreate project in Eclipse and add files again.

 

Seems that there is a bug inside of Eclipse.

Please use plain text.
Developer
bibodo
Posts: 23
Registered: ‎04-22-2009

Re: No definition found for exported static routine: .main(String[])

I solved the problem. The reason was a misconfigured bin-path in the eclipse classpath. Eclipse generated the classfiles in an other location than the rapc compiler searched for them. Fixing the classpath did it. Now erverything works fine as it did before.

Thanks for helping me. 

Please use plain text.