Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Can't launch application from eclipse
Can't launch application from eclipse [message #118748] Wed, 19 November 2003 17:27 Go to next message
Eclipse UserFriend
I have here an application, which - for some strange reason - I can
not start from within eclipse (I mean using Run...).

The application starts up fine using the commandline or when packed
into a .jar file and then executed. However, when I click on Run...
and select the application I get a "Launching MyApp...: 0% done" in
the lower left and that's it. Nothing else happens! It seems, as if
eclipse refuses to start this application!?!

Since I was suspecting maybe some static initializer causing some
uncaught exception during startup I even surrounded the program with a
"Launcher" program:
-------------------------
package test;

public class Launcher {

public static void main(String[] args) {
System.out.println("Launcher.main() started...");
try {
MyApp.main(args);
} catch (Throwable t) {
System.err.println("error in main");
t.printStackTrace();
}
System.out.println("Launcher.main() ended...");
}
}
-------------------------

The idea of this launcher being, that this class does not contain ANY
static initialization code and does not reference ANY other class
before entering the try {} clause. This way this should catch EVERY
error that might happen during program initialization as well as
program execution.

But even THAT is not started (i.e. the launcher.main() started...)
message does not appear! I also added a -verbose option to the VM
arguments, but I don't get a single character on the console.

What can cause eclipse to simply refuse to start a class??? Again:
Outside eclipse the application starts without the slightest problem!
I am completely puzzled?

Michael
Re: Can't launch application from eclipse [message #118764 is a reply to message #118748] Wed, 19 November 2003 17:40 Go to previous messageGo to next message
Eclipse UserFriend
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:bpgqll$ct5$1@eclipse.org...
> ...
> What can cause eclipse to simply refuse to start a class??? Again:
> Outside eclipse the application starts without the slightest
problem!
> I am completely puzzled?

.... and I forgot to mention: All other of my two dozen or so projects
start up without problem, so it can't be some fundamental eclipse or
JRE setup problem.

This on eclipse 3.0M4 (Build 200310101454).

Michael
Re: Can't launch application from eclipse [message #118815 is a reply to message #118764] Wed, 19 November 2003 19:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nobody.there.127.0.0.1

Michael Moser wrote:
>>What can cause eclipse to simply refuse to start a class??? Again:
>>Outside eclipse the application starts without the slightest

I ran into a problem like this on a previous version of WebSphere Studio
Device Developer (based on Eclipse 2.0). In that case, I had created a
project with one class library, and then modified the .project (by
copying over it) so that the project was of a different type.

I don't know if you've tried yet, but it might be worth creating the
project, then copying the .java files over from within Eclipse. (Copying
with the Windows explorer caused bad things for CVS.)

Andrew Jr.

============================================================ ==========
IBM Phoenix Labs (OTI)
11811 North Tatum Boulevard, Suite 2400
Phoenix, Arizona, USA 85028-1614
Re: Can't launch application from eclipse [message #118942 is a reply to message #118815] Thu, 20 November 2003 02:48 Go to previous message
Eclipse UserFriend
As turned out, it had nothing to do with the project nature or such.
For whatever reason on the Run configuration's classpath tab the
checkbox "Use default class path" was unchecked. Checking that fixed
things.
Sorry for the noise...

Michael
Previous Topic:Can Eclipse complete words using words already in the file (complete next, complete previous)?
Next Topic:Eclipse 2.1.2 Exit Error
Goto Forum:
  


Current Time: Thu May 08 08:31:36 EDT 2025

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

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

Back to the top