Problem with importing projects [message #280856] |
Fri, 11 February 2005 14:06 |
Eclipse User |
|
|
|
Originally posted by: vgap4.gmx.de
Hi all,
after reinstalling my system incl. eclipse I tried to import one of my
projects. It did but Eclipse can't find the main in my project. Is there
a way to force Eclipse to use my particular file. Or why does Eclipse
not find the main function?
Thanks
Ilja
|
|
|
Re: Problem with importing projects [message #280857 is a reply to message #280856] |
Fri, 11 February 2005 14:38 |
Eclipse User |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
Did the project get built?
Does your class really contain a main method?
If you right click the project and loo k at its properties, do you see
something strange there?
--
Chris Laffra, http://eclipsefaq.org
"Ilja Roganov" <vgap4@gmx.de> wrote in message
news:cuie31$s1q$1@www.eclipse.org...
> Hi all,
> after reinstalling my system incl. eclipse I tried to import one of my
> projects. It did but Eclipse can't find the main in my project. Is there
> a way to force Eclipse to use my particular file. Or why does Eclipse
> not find the main function?
> Thanks
> Ilja
|
|
|
Re: Problem with importing projects [message #280864 is a reply to message #280857] |
Fri, 11 February 2005 15:07 |
Eclipse User |
|
|
|
Originally posted by: vgap4.gmx.de
Chris Laffra wrote:
> Did the project get built?
> Does your class really contain a main method?
> If you right click the project and loo k at its properties, do you see
> something strange there?
>
When building it I have to create a new Application (in Run Window) -
yes it's an Application and it did run before reinstalling Eclipse and
has a main method. Now I can't find my main class when pressing search
in MainTab/MainClass. My Project name is set correctly.
But unfortunately I'm not very familiar with Eclipse so I can't say if
in properties is something strange but it looks like ever.
Ilja
|
|
|
Re: Problem with importing projects [message #280865 is a reply to message #280864] |
Fri, 11 February 2005 15:42 |
Eclipse User |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
How about this. Create a new project.
Copy the Java code from the old project to the new project.
See if that helps.
--
Chris Laffra, http://eclipsefaq.org
"Ilja Roganov" <vgap4@gmx.de> wrote in message
news:cuihmt$gnc$1@www.eclipse.org...
> Chris Laffra wrote:
> > Did the project get built?
> > Does your class really contain a main method?
> > If you right click the project and loo k at its properties, do you see
> > something strange there?
> >
>
> When building it I have to create a new Application (in Run Window) -
> yes it's an Application and it did run before reinstalling Eclipse and
> has a main method. Now I can't find my main class when pressing search
> in MainTab/MainClass. My Project name is set correctly.
> But unfortunately I'm not very familiar with Eclipse so I can't say if
> in properties is something strange but it looks like ever.
>
> Ilja
|
|
|
Re: Problem with importing projects [message #281084 is a reply to message #280865] |
Tue, 15 February 2005 14:31 |
Eclipse User |
|
|
|
Originally posted by: vgap4.gmx.de
Chris Laffra wrote:
> How about this. Create a new project.
> Copy the Java code from the old project to the new project.
> See if that helps.
>
Sorry for the delay I was on vacation this weekend. No it doesn't help.
I allready tried this. Even if I create a new class with the main method
eclipse does not find this method ... I really don't know what is wrong
here.
regards
Ilja
|
|
|
Re: Problem with importing projects [message #281088 is a reply to message #281084] |
Tue, 15 February 2005 14:36 |
Eclipse User |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
What does you main method look like? Please cut and paste it here.
--
Chris Laffra, http://eclipsefaq.org
"Ilja Roganov" <vgap4@gmx.de> wrote in message
news:cut11d$vt2$1@www.eclipse.org...
> Chris Laffra wrote:
> > How about this. Create a new project.
> > Copy the Java code from the old project to the new project.
> > See if that helps.
> >
> Sorry for the delay I was on vacation this weekend. No it doesn't help.
> I allready tried this. Even if I create a new class with the main method
> eclipse does not find this method ... I really don't know what is wrong
> here.
>
> regards
> Ilja
|
|
|
Re: Problem with importing projects [message #281094 is a reply to message #281088] |
Tue, 15 February 2005 14:46 |
Eclipse User |
|
|
|
Originally posted by: vgap4.gmx.de
Chris Laffra wrote:
> What does you main method look like? Please cut and paste it here.
>
I tried with many different methods. One is:
public static void main(String[] args) {
Display display= new Display();
mainShell= new Shell(Display);
Listener closeListener= new Listener () {
public void habdleEvent(Event event) {
MessageBox box= new MessageBox(mainShell, SWT.OK | SWT.CANCEL |
SWT.APPLICATION_MODAL);
box.setMessage("Exit MapViewer ?");
event.doit= box.open() == SWT.OK;
}
}
display.addListener(SWT.Close, closeListener);
display.addListener(SWT.Dispose, closeListener);
mainShell.addListener(SWT.Close, closeListener);
mainShell.addListener(SWT.Dispose, closeListener);
mainShell.setSize(800, 600);
mainShell.setPos(200,200);
mainShell.open());
while (!mainSHell.isDisposed() ) {
if (!display.readAndDispatch() )
display.sleep();
}
display.dispose();
}
Another one was standard main methode (after creating a new class with
main) and only adding console output.
|
|
|
Re: Problem with importing projects [message #281106 is a reply to message #281094] |
Tue, 15 February 2005 15:40 |
Eclipse User |
|
|
|
Originally posted by: Chris_Laffra.ca.ibm.com
Weird. It kinda works for me. I right click the project containing my main
class and choose Run > Java Application.
The "searching for main types..." dialog runs for a long time and comes back
with a very long list of candidate classes.
My class is in the list and I can run it.
However, when I do the same with another project selected, my main class is
not found.
I searched Bugzilla and could not find a bug for this. I posted one for
3.1M4.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=85271
--
Chris Laffra, http://eclipsefaq.org
"Ilja Roganov" <vgap4@gmx.de> wrote in message
news:cut1ut$4ts$1@www.eclipse.org...
> Chris Laffra wrote:
> > What does you main method look like? Please cut and paste it here.
> >
>
> I tried with many different methods. One is:
>
> public static void main(String[] args) {
> Display display= new Display();
> mainShell= new Shell(Display);
> Listener closeListener= new Listener () {
> public void habdleEvent(Event event) {
> MessageBox box= new MessageBox(mainShell, SWT.OK | SWT.CANCEL |
> SWT.APPLICATION_MODAL);
> box.setMessage("Exit MapViewer ?");
> event.doit= box.open() == SWT.OK;
> }
> }
> display.addListener(SWT.Close, closeListener);
> display.addListener(SWT.Dispose, closeListener);
> mainShell.addListener(SWT.Close, closeListener);
> mainShell.addListener(SWT.Dispose, closeListener);
>
> mainShell.setSize(800, 600);
> mainShell.setPos(200,200);
> mainShell.open());
>
> while (!mainSHell.isDisposed() ) {
> if (!display.readAndDispatch() )
> display.sleep();
> }
> display.dispose();
> }
>
> Another one was standard main methode (after creating a new class with
> main) and only adding console output.
|
|
|
Re: Problem with importing projects [message #281646 is a reply to message #281106] |
Wed, 23 February 2005 15:10 |
Eclipse User |
|
|
|
Originally posted by: vgap4.gmx.de
Chris Laffra wrote:
> Weird. It kinda works for me. I right click the project containing my main
> class and choose Run > Java Application.
> The "searching for main types..." dialog runs for a long time and comes back
> with a very long list of candidate classes.
> My class is in the list and I can run it.
>
> However, when I do the same with another project selected, my main class is
> not found.
>
> I searched Bugzilla and could not find a bug for this. I posted one for
> 3.1M4.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=85271
>
Thanks for the replies. There was no bug report handling a similar
situation as I had. My solution was to reinstall all my java stuff
including jdk, eclipse and all plugins. Now it works as it should.
cu
Ilja
|
|
|
Re: Problem with importing projects [message #281699 is a reply to message #281646] |
Thu, 24 February 2005 14:49 |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
Ilja Roganov wrote:
> Chris Laffra wrote:
>
>> Weird. It kinda works for me. I right click the project containing my
>> main
>> class and choose Run > Java Application.
>> The "searching for main types..." dialog runs for a long time and
>> comes back
>> with a very long list of candidate classes.
>> My class is in the list and I can run it.
>>
>> However, when I do the same with another project selected, my main
>> class is
>> not found.
>>
>> I searched Bugzilla and could not find a bug for this. I posted one for
>> 3.1M4.
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=85271
>>
>
> Thanks for the replies. There was no bug report handling a similar
> situation as I had. My solution was to reinstall all my java stuff
> including jdk, eclipse and all plugins. Now it works as it should.
That complete re-install of everything was almost certainly not
necessary. Definitely not reinstalling the JDK.
I suspect there was just a configuration problem with the project that
wasn't working.
The only time (in more than 3 years of using Eclipse on a daily basis)
that I've ever had to re-install it was when an old 2.x version got into
an out of memory state during shutdown and corrupted the workspace. Even
then, I only had to reconstruct the workspace, not reinstall all of Eclipse.
I'm pointing this out so that you don't spend time in the future because
you think all that re-installing is necessary or regular.
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.03638 seconds