Bug 22509 - Unable to start some Java application
Summary: Unable to start some Java application
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-17 07:33 EDT by Christophe Demez CLA
Modified: 2002-11-13 04:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Demez CLA 2002-08-17 07:33:06 EDT
I have 2 machines, on both I use eclipse, but on the second I have installed 
Eclipse 2.0 .

I m unable to start some Java applications (Some others have no problems) with 
the last release of Eclipse.

I often develop on the first machine (with an older version of eclipse), 
export to a JAR file and then import it on the second machine.

(First machine is at office and second at home).

IT IS REALLY BLOCKING MY BUSINESS !!

I have the following exception when debugging:
----------------------------------------------
java.lang.NoClassDefFoundError: jmc/gui/management/ManagementConsole
Exception in thread "main" 

after a message appear in a Window "could not find main class. Program will 
exit"

I have no more information like this :

You can reach me at :
---------------------
dev1@v-tech.ws
ICQ : 95959353
Comment 1 Darin Swanson CLA 2002-08-17 17:04:42 EDT
Christophe, "jmc/gui/management/ManagementConsole" is not part of the Eclipse 
product. Is this part of your code that you are referencing from one plugin to 
another? It would appear to be a classpath problem on your project(s).

So one you are working with Eclipse 1.0 and the other Eclipse 2.0?  Moving back 
and forth between these two versions is not supported (only migration forward).

Does this only occur when you are debugging...ie running works fine?
Comment 2 Christophe Demez CLA 2002-08-17 23:39:58 EDT
Hi

1. I know that "jmc/gui/management/ManagementConsole" is not part of eclipse, 
it is my software.

2. It is for Eclipse 2.0 release

3. There is no classpath problem, I develop full time in Java since 5 years 
and use Eclipse since a long time now, I have verify a lot of parameters, 
without success !

4. The problem appear also when running

5. I m sure it is a problem with Eclipse, I have try to recompile all, 
reimport from source code, ... , without success

Christophe
Comment 3 Darin Wright CLA 2002-08-19 08:37:14 EDT
When you try to launch the program - a failed launch should appear in the debug 
view. What does it show for a classpath when you display its properties (from 
the pop-up Properties menu)?

Comment 4 Christophe Demez CLA 2002-08-19 14:54:14 EDT
I join the classpath, it sounds that all the path are correct, except that 
some are repeated several times.

Also, I have notice that when I try to rebuild the project, nothing happend,
also, the IDE do not detect the errors when I write something bad.

This project sounds completely deconnected of Java, no compilation, no running 
possible and no syntax check, ...

Here is the classpath:
----------------------
C:\Java\j2sdk1.4.1\bin\javaw -classpath C:\Java\eclipse\workspace\XML-HugeXML-
Tests;C:\Java\eclipse\workspace\XML-HugeXML;C:\Java\eclipse\workspace\LIB-
XPP;C:\Java\eclipse\workspace\JUL;C:\Java\eclipse\workspace\LIB-
Xerces;C:\Java\eclipse\workspace\LIB-Xalan;C:\Java\eclipse\workspace\LIB-
Xerces;C:\Java\eclipse\workspace\XML-
HugeXML;C:\Java\eclipse\workspace\JAI;C:\Java\projects\OData\server\lib\xmldb\i
nfozone-tools.jar;C:\Java\eclipse\workspace\LIB-
Xalan;C:\Java\eclipse\workspace\LIB-JUnit -Xdebug -Xnoagent -
Djava.compiler=NONE -
Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:5301 
tests.hugexml.TS_HugeXML
Comment 5 Darin Wright CLA 2002-08-19 15:42:21 EDT
Is "auto-build" turned off? See Window -> Preferences -> Workbench...

It sounds like you are not compiling. So there may be no class files. You can 
also do a manual build.
Comment 6 Christophe Demez CLA 2002-08-19 15:58:21 EDT
Yes, it is turned on !

If you really talk about "Perform build automatically on resource modification"

It is turned ON

Christophe
Comment 7 Christophe Demez CLA 2002-08-19 16:03:21 EDT
Even after a rebuild, it remain the same !
Comment 8 Darin Wright CLA 2002-08-19 16:12:03 EDT
And where is the main class "tests.hugexml.TS_HugeXML"? i.e. where in the file 
system is it? Can you see its class file in the corresponding output directory 
of its project? or is it in a jar?
Comment 9 Christophe Demez CLA 2002-08-19 17:10:35 EDT
It should be at :

C:\Java\eclipse\workspace\XML-HugeXML-Tests\  ... "tests\hugexml\TS_HugeXML"

But I do not see any .class file there, only some java files !

Is it normal ? It is surely linked to the fact that I cannot compile !

Christophe
Comment 10 Darin Wright CLA 2002-08-20 08:33:26 EDT
If there are no class files, we cannot run/debug them. The error message 
indicates it cannot find the "main" class, so this is most likely the problem. 
Moving to JCORE for comment.
Comment 11 Christophe Demez CLA 2002-08-20 09:16:50 EDT
Ok,

I must transfer this bug to someone else, right ?

How can I do this ?

thanks for help

Christoph
Comment 12 Christophe Demez CLA 2002-08-20 12:41:58 EDT
I have notice that :

I do "Right click->Java Build Path"

and I have the message "Build path will result in a cycle."

It only occur on projects that I cannot compile !

Christophe
Comment 13 Philipe Mulet CLA 2002-08-22 09:20:15 EDT
Do you actually have a cycle in your classpath (as the error says it) ? If you 
still want to compile, in spite of this cycle, and willing to tolerate the 
resulting errors, you can disable the optional check in the compiler (refusing 
to build if classpath has errors).

Uncheck: Window>Preferences>Java>Compiler>Other>Stop builder when invalid 
classpath is detected

Ok to close ?
Comment 14 Philipe Mulet CLA 2002-09-26 09:42:25 EDT
Ignore the cycle warning, this might just be an artifact (bug 23979).

Christophe - does anything compile at all ? By the sound of it, it does not 
seem to. Are your source located in a source folder inside your classpath ? Do 
you have errors reported against your project (like missing entries on the 
CP) ? Does codeassist/search resolve properly inside your sources ?

Do you have any information in your .metadata/.log file ?
Comment 15 Philipe Mulet CLA 2002-10-02 06:09:18 EDT
Christophe: do you actually have cycles in your build path ? If so, I'd be 
interested to know what motivates this.
Comment 16 Christophe Demez CLA 2002-10-02 06:58:07 EDT
Yes, I have cycle, somthing like that, it is only an example, not real
package, because commercial and private one.

JUL:utility library
-------------------
package : xml.node
package : xml.timeui : use some packages of XMLTime

XMLTime : xml scheduling
------------------------
Use some classes of xml.noe

Christophe
Comment 17 Philipe Mulet CLA 2002-11-13 03:50:59 EST
Did you try to toggle the compiler to let it proceed with cycles (as described 
in earlier comment) ?

If so, is it ok to close?
Comment 18 Christophe Demez CLA 2002-11-13 04:20:45 EST
Hi,

All is fixed now, it was due to cycles.

Thanx a lot
Comment 19 Philipe Mulet CLA 2002-11-13 04:42:09 EST
Closing