pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From noobmike <mdri...@lakeheadu.ca>
Subject Re: Application class name is required.
Date Tue, 03 May 2011 17:12:02 GMT
I am using Eclipse Helios (3.6.2) - Eclipse IDE for Java Developers, and I'm
glad I got it installed properly, but I thought if it was installed properly
you wouldn't have to add the .jars each time. Oh well, this isn't the
problem at hand! ha ha. 

at first I added what you suggested: 

public static void main(String[] args) {
        DesktopApplicationContext.main(PushButtons.class, args);

which told me I had to Typecast it, which I did :

public static void main(String[] args) {
        DesktopApplicationContext.main((Class<? extends Application>)
PushButtons.class, args);

then I had the option to Run > Run As > Java Application. Which I knew
wasn't correct because I want the Run As > Pivot Application. Well I ran it
anyway and got the error :

Exception in thread "main" java.lang.ClassCastException:
org.apache.pivot.tutorials.buttons.PushButtons cannot be cast to
	at org.apache.pivot.tutorials.buttons.PushButtons.main(PushButtons.java:35)

I tried messing around with the Run Configurations, at first it was set to:
org.apache.pivot.tutorials.buttons.PushButtons which gave me the above
error. I know this makes more sense because it is the main class, but I am
just trying everything I can, so I switched it to:
org.apache.pivot.wtk.DesktopApplicationContext this gave me the same error
as before: 
Application class name is required. 

About adding the main() to my project, my end goal is to make stand alone
IIA's is this the way to go? 
I'm not quite sure what goes into finalizing all of that. 

Thanks again Greg. 

View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Application-class-name-is-required-tp2894336p2895061.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

View raw message