Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Creating the plug-in project: Error: Main class not found(Error: Main class Files\Java\jdk1.7.0_03\.. could not be found or loaded)
Creating the plug-in project: Error: Main class not found [message #1094927] Mon, 26 August 2013 11:54 Go to next message
Othmar Lippuner is currently offline Othmar LippunerFriend
Messages: 12
Registered: August 2013
Junior Member
I'd like to learn about Eclipse Plugin development to find ways to integrate my codegenerators into Eclipse IDE. For this I went through this tutorial

www.vogella.com/articles/EclipsePlugIn/article.html


In the end, when I try to run the sample code with contextmenue[Manifest.MF] > run as > Eclipse application

I get

Error: Main class Files\Java\jdk1.7.0_03\.. could not be found or loaded
eg. in my german IDE-Environment
Fehler: Hauptklasse Files\Java\jdk1.7.0_03\.. konnte nicht gefunden oder geladen werden.

Right, there is no
public static void main(String[] args)
in the generated project code.

Next I tried out the tutorial "A minimal Plugin" in the "Plattform Plugin Developers Guide". Some result.

Whats wrong? I'm I missing something? Help is appreciated.


Kinde regards
OL

[Updated on: Mon, 26 August 2013 16:33]

Report message to a moderator

Re: Creating the plug-in project: Error: Main class not found [message #1094991 is a reply to message #1094927] Mon, 26 August 2013 13:44 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Quote:
Error: Main class Files\Java\jdk1.7.0_03\.. could not be found or loaded


most likely cause: a command line argument containing "Program Files" wasn't properly quoted and is split so that the second part appears as the main class name, although it might have been part of the classpath or such.
Re: Creating the plug-in project: Error: Main class not found [message #1095114 is a reply to message #1094991] Mon, 26 August 2013 16:44 Go to previous messageGo to next message
Othmar Lippuner is currently offline Othmar LippunerFriend
Messages: 12
Registered: August 2013
Junior Member
Meanwhile I taken great length to pin down the problem. Without success.

I aggree "Fehler: Hauptklasse Files\Java\jdk1.7.0_03\.. konnte nicht gefunden oder geladen werden" looks like argument segmentation/extraction goes wrong somewhere.

Is it a software bug?
Is it a eclipse configuration error I can correct?
Is my environment not correct?

To eclude the third option
some information:

Windows 7; 64 Bit
JAVA_HOME=JAVA_HOME=C:\Programme\Java\jdk1.7.0_09
Path=C:\Program Files\Java\jdk1.7.0_09;.....

I deliberately changed to jdk1.7.0_09 but I still get the errormessage with "..Files\Java\jdk1.7.0_03\".

My "normal" applications run on eclipse in Run and Debug mode like a charm. Only the Plugin-Sampleprojects won't work.

Basically the environment name resolution does seem to not work correctly when a plugin project is started.

Can anyone give me a clue where this "..Files\Java\jdk1.7.0_03\" value comes from?
Any suggestions to make things happen?

regards OL

[Updated on: Mon, 26 August 2013 16:46]

Report message to a moderator

Re: Creating the plug-in project: Error: Main class not found [message #1095170 is a reply to message #1094927] Mon, 26 August 2013 18:35 Go to previous message
Othmar Lippuner is currently offline Othmar LippunerFriend
Messages: 12
Registered: August 2013
Junior Member
Problem solved, finding the solution was a real pain. So here the facts:

Situation
I got the error because the Run-Configuration had the VM-Arguments
-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx384m -Djava.home=C:\Program Files\Java\jdk1.7.0_03\..

evidently this means, PATH and JAVA_HOME are not used to resolve the access to the runtime-JRE.

-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx384m -Djava.home="C:\Program Files\Java\jdk1.7.0_03\.."

would resolve the name resolutionproblem that seems exists - only when working with a Plugin-project. Some other errors still come up.

Solution
All works fine and as expected after a Eclipse Run Configuration is used with
Arguments-Tab entries both
* Programm arguments
* VM arguments

are blanked out....
a new eclispe instance is started, the plugin component is displayed. ok.
Previous Topic:Can't remove project from workspace...
Next Topic:Problems with Ant in Kepler
Goto Forum:
  


Current Time: Thu Apr 18 04:39:49 GMT 2024

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

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

Back to the top