Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » failed to find main class
icon14.gif  failed to find main class [message #551186] Thu, 05 August 2010 14:35 Go to next message
horseatingweeds is currently offline horseatingweedsFriend
Messages: 13
Registered: August 2010
Junior Member
I tried installing eclipse-php-helios-win32 on win xp. I got an error: "failed to find main class" followed by org.eclipse.something something long number.

I followed the installation here: http://ist.berkeley.edu/as-ag/tools/howto/install-eclipse-wi n.html and the readme folder's readme_eclipse.html

Those were the only instructions I could find. I put the eclipse folder in the root: C:\eclipse. But when I opened C:\eclipse\eclipse.exe it failed with that error... I've searched around but found no info on this error.

I'm just trying to find a decent tool for writing php and debugging it. With how cryptic and acronym laden everything related to eclipse is - I'm feeling like I'm on the wrong path here.

Java version 6 update 21

[Updated on: Wed, 11 August 2010 00:38]

Report message to a moderator

Re: failed to find main class [message #551199 is a reply to message #551186] Thu, 05 August 2010 14:58 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 8/5/2010 8:35 AM, info@gentledoberman.com wrote:
> I tried installing eclipse-php-helios-win32 on win xp. I got an error:
> "failed to find main class" followed by org.eclipse.something something
> long number.
>
> I followed the installation here:
> http://ist.berkeley.edu/as-ag/tools/howto/install-eclipse-wi n.html and
> the readme folder's readme_eclipse.html
>
> Those were the only instructions I could find. I put the eclipse folder
> in the root: C:\eclipse. But when I opened C:\eclipse\eclipse.exe it
> failed with that error... I've searched around but found no info on this
> error.
>
> I'm just trying to find a decent tool for writing php and debugging it.
> With how cryptic and acronym laden everything related to eclipse is -
> I'm feeling like I'm on the wrong path here.
> Java version 6 update 21

See sticky post at top of forum: don't use jdk1.6.0_21.

Download jdk1.6.0_20 from here (look down the page for it):

http://www.oracle.com/technetwork/java/javase/downloads/inde x.html

It looks like you'll have to get a larger package than you need (with
GlassFish or JavaFX, NetBeans, etc. to get it at all--just ignore all
this other stuff unless you need it).

I've said it before, Eclipse is a big elephant that you eat one spoonful
at a time. Be patient, ask questions, and you'll soon find happiness.
NetBeans is easier starting out, but Eclipse is what is used for
world-class development projects. Both have great developer communities.
(I don't actually know if NetBeans does PHP because I'm a Java guy and
haven't tackled PHP.)

Hope this helps,

Russ Bateman
Re: failed to find main class [message #551209 is a reply to message #551186] Thu, 05 August 2010 15:40 Go to previous messageGo to next message
horseatingweeds is currently offline horseatingweedsFriend
Messages: 13
Registered: August 2010
Junior Member
Would this be the cause of the error?

Failed to find a Main Class in " C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0v201005 07.jar "

The sticky says: "UPDATE: The latest JDK/JRE downloads have fixed this problem, so the simplest way to resolve is to download and re-install from http://www.java.com (alternative link is http://java.sun.com/javase/downloads/index.jsp)"

And I updated mine just today, so wouldn't I have the fixed JDK/JRE? I'm not even sure how to re-install java.

Also, I added the "-XX:MaxPermSize=256m" to my ini file, which was one of the old fixes, just to see. Error remains.

The error says I'm missing a file, and it's right, the file isn't there. There's nothing in the plugins directory about 'equenox'. Do I have the wrong download?

I went to http://www.eclipse.org/downloads/ and downloaded Eclipse for PHP developers
Re: failed to find main class [message #551229 is a reply to message #551209] Thu, 05 August 2010 16:31 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 8/5/2010 9:40 AM, horseatingweeds wrote:
> Would this be the cause of the error?
>
> Failed to find a Main Class in "
> C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0v201005 07.jar "
>
> The sticky says: "UPDATE: The latest JDK/JRE downloads have fixed this
> problem, so the simplest way to resolve is to download and re-install
> from http://www.java.com (alternative link is
> http://java.sun.com/javase/downloads/index.jsp)"
>
> And I updated mine just today, so wouldn't I have the fixed JDK/JRE? I'm
> not even sure how to re-install java.
> Also, I added the "-XX:MaxPermSize=256m" to my ini file, which was one
> of the old fixes, just to see. Error remains.
> The error says I'm missing a file, and it's right, the file isn't there.
> There's nothing in the plugins directory about 'equenox'. Do I have the
> wrong download?
>
> I went to http://www.eclipse.org/downloads/ and downloaded Eclipse for
> PHP developers

1) Use a JDK and not a JRE with Eclipse.

2) You don't have to disturb/keep updating/whatever your computer host's
JRE just for Eclipse's benefit: use a dedicated JDK for Eclipse and
leave the one on your machine alone.

3) The latest build of Java causes problems for Eclipse (or, Eclipse has
problems with it).

Not to pick a bone with the tutorial you followed, it looked very
helpful, but I would suggest you read the setting-up article or so (as
relevant) under "Eclipse-oriented" at http://www.javahotchocolate.com
Then, after installation and getting Eclipse launched and healthy, go
back to whatever you were doing. This would be easier than trying to lay
it all out for you in this forum.

Russ Bateman
Re: failed to find main class [message #551230 is a reply to message #551229] Thu, 05 August 2010 16:34 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

It looks like Eric has updated the sticky post. Follow that for a good
JDK if you like. I find the issue confusing enough that I'll just stay
with jdk1.6.0_20 for a while.

Russ
Re: failed to find main class [message #551297 is a reply to message #551230] Thu, 05 August 2010 19:59 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 2411
Registered: July 2009
Senior Member
On 8/5/10 12:34 PM, Russ Bateman wrote:
> It looks like Eric has updated the sticky post. Follow that for a good
> JDK if you like. I find the issue confusing enough that I'll just stay
> with jdk1.6.0_20 for a while.

Oracle fixed the Java problem last week so if you download the JDK or
JRE now, you'll get the fixed version and Eclipse works fine. If you
want to know all the gory details, view the bug reports mentioned in the
Announcement post.

Eric
Re: failed to find main class [message #551298 is a reply to message #551209] Thu, 05 August 2010 20:01 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 2411
Registered: July 2009
Senior Member
On 8/5/10 11:40 AM, horseatingweeds wrote:
> Would this be the cause of the error?
>
> Failed to find a Main Class in "
> C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0v201005 07.jar "
>
> The sticky says: "UPDATE: The latest JDK/JRE downloads have fixed this
> problem, so the simplest way to resolve is to download and re-install
> from http://www.java.com (alternative link is
> http://java.sun.com/javase/downloads/index.jsp)"
>
> And I updated mine just today, so wouldn't I have the fixed JDK/JRE? I'm
> not even sure how to re-install java.
> Also, I added the "-XX:MaxPermSize=256m" to my ini file, which was one
> of the old fixes, just to see. Error remains.
> The error says I'm missing a file, and it's right, the file isn't there.
> There's nothing in the plugins directory about 'equenox'. Do I have the
> wrong download?
>
> I went to http://www.eclipse.org/downloads/ and downloaded Eclipse for
> PHP developers


What, exactly, error message are you seeing; give us details.
Also, did you specify the JVM for Eclipse to use in eclipse.ini, as
described here: http://wiki.eclipse.org/Eclipse.ini

Eric
Re: failed to find main class [message #552114 is a reply to message #551186] Tue, 10 August 2010 22:01 Go to previous messageGo to next message
horseatingweeds is currently offline horseatingweedsFriend
Messages: 13
Registered: August 2010
Junior Member
Ok, I'm trying this over again with the suggestions I've received. (thanks btw) But regardless of the efforts in detail of the instructions on installing this thing, I have a couple questions.

First, according to this: http://www.javahotchocolate.com/tutorials/setup-eclipse.html #install and this: http://www.javahotchocolate.com/tutorials/setup-jdk.html#pri mo by default Eclipse looks here: "eclipse/jre" for the JDK (java development kit)

I thought I knew what this meant: "Just download a JDK and put the files in the eclipse/jre folder." However, there is no jre folder and the JDK I downloaded in one file, a .exe:
jdk-6u20-javafx-1_3-windows-i586.exe

So what does this mean? Do I make a eclipse/jre folder and just plop the .exe in there? Am I even downloading the correct "JDK" or "JRE" or whatever? The two acronyms are seeming nebulous to me. Or, by "eclipse/jre" to they mean - plop the jdk into eclipse's root? Confused



[Updated on: Tue, 10 August 2010 22:34]

Report message to a moderator

Re: failed to find main class [message #552116 is a reply to message #552114] Tue, 10 August 2010 22:17 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2010.08.10 16:01, horseatingweeds wrote:
> Ok, I'm trying this over again with the suggestions I've received.
> (thanks btw) But regardless of the efforts in detail of the instructions
> on installing this thing, I have a couple questions.
>
> First, according to this:
> http://www.javahotchocolate.com/tutorials/setup-eclipse.html #install and
> this: http://www.javahotchocolate.com/tutorials/setup-jdk.html#pri mo
> Eclipse looks here: "eclipse/jre" for the JDK (java development kit)
>
> I thought I knew what this meant: "Just download a JDK and put the files
> in the eclipse/jre folder." However, there is no jre folder and the JDK
> I downloaded in one file, a .exe: jdk-6u20-javafx-1_3-windows-i586.exe
>
> So what does this mean? Do I make a eclipse/jre folder and just plop the
> .exe in there? Am I even downloading the correct "JDK" or "JRE" or
> whatever? The two acronyms are seeming nebulous to me. Or, by
> "eclipse/jre" to they mean - plop the jdk into eclipse's root? :?

Under your eclipse folder, create a new folder named "jre", then copy
your JDK there. Assuming you install Eclipse on C:\eclipse and drop the
very latest JDK into it, it would look like this:

C:\eclipse\jre\jdk1.6.0_21

I'll review the verbiage to see if I can make it clearer.

If you don't want to do it this way, then modify eclipse.ini to add this
line (I obviously assume a JDK path here):

-vm
C:\Program Files\Java\jdk1.6.0_21

(See http://wiki.eclipse.org/Eclipse.ini)

Last, don't use a mere JRE with Eclipse; always use a JDK. Sure, you can
get away with it for the most part (just to run Eclipse), but don't do
it. Use a proper JDK. You need one for other work you'll do in Eclipse.

Russ
Re: failed to find main class [message #552117 is a reply to message #552116] Tue, 10 August 2010 22:22 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2010.08.10 16:17, Russell Bateman wrote:
> On 2010.08.10 16:01, horseatingweeds wrote:
>> [snip]
>>
>> I thought I knew what this meant: "Just download a JDK and put the files
>> in the eclipse/jre folder." However, there is no jre folder and the JDK
>> I downloaded in one file, a .exe: jdk-6u20-javafx-1_3-windows-i586.exe
>>
>> So what does this mean? Do I make a eclipse/jre folder and just plop the
>> .exe in there? Am I even downloading the correct "JDK" or "JRE" or
>> whatever? The two acronyms are seeming nebulous to me. Or, by
>> "eclipse/jre" to they mean - plop the jdk into eclipse's root? :?

Oh, yeah, I forgot. You DO of course need to unzip the JDK. If you had
carefully read setup-jdk.html, you'd have seen how to do this in order
to sequester a private copy of the JDK that would not interfere with (or
be the same as) the one in use on your computer host.
Re: failed to find main class [message #552119 is a reply to message #551186] Tue, 10 August 2010 22:37 Go to previous messageGo to next message
horseatingweeds is currently offline horseatingweedsFriend
Messages: 13
Registered: August 2010
Junior Member
I tried this: C:\Program Files\eclipse\jre\jdk-6u20-javafx-1_3-windows-i586.exe and also specified it in the eclipse.ini file. So now when I open the eclipse.exe file in the eclipse folder - it brings up a setup window, which at first I thought was an eclipse setup window, but instead appears to be something for setting up JavaFX(TM) 1.3 SDK.

I stepped though the setup wizard just to see what it was trying to do. It gets to a page where you can Modify, Repair, or Remove - nothing about installing.

Is this the jdk-6u20-javafx-1_3-windows-i586.exe trying to install the Java runtime development environment kit, or whatever? I'm afraid to just give it a try...

I must have downloaded the wrong file then. All I got was this 156 MD exe (jdk-6u20-javafx-1_3-windows-i586.exe) and no setup-jdk.html
Re: failed to find main class [message #552121 is a reply to message #552119] Tue, 10 August 2010 22:41 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2010.08.10 16:37, horseatingweeds wrote:
> I tried this: C:\Program
> Files\eclipse\jre\jdk-6u20-javafx-1_3-windows-i586.exe and also
> specified it in the eclipse.ini file. So now when I open the eclipse.exe
> file in the eclipse folder - it brings up a setup window, which at first
> I thought was an eclipse setup window, but instead appears to be
> something for setting up JavaFX(TM) 1.3 SDK.
> I stepped though the setup wizard just to see what it was trying to do.
> It gets to a page where you can Modify, Repair, or Remove - nothing
> about installing.
>
> Is this the jdk-6u20-javafx-1_3-windows-i586.exe trying to install the
> Java runtime development environment kit, or whatever? I'm afraid to
> just give it a try...
>
> I must have downloaded the wrong file then. All I got was this 156 MD
> exe (jdk-6u20-javafx-1_3-windows-i586.exe) and no setup-jdk.html

The file you are using is a Windows installation. To extract the JDK
from it, which is the only thing you want, is covered in detail
(including graphic illustrations) in
http://www.javahotchocolate.com/tutorials/setup-jdk.html
Re: failed to find main class [message #552122 is a reply to message #551186] Tue, 10 August 2010 22:53 Go to previous messageGo to next message
horseatingweeds is currently offline horseatingweedsFriend
Messages: 13
Registered: August 2010
Junior Member
Is it ok to have eclipse in the programs directory on windows?
Re: failed to find main class [message #552126 is a reply to message #551186] Wed, 11 August 2010 00:37 Go to previous messageGo to next message
horseatingweeds is currently offline horseatingweedsFriend
Messages: 13
Registered: August 2010
Junior Member
Ok, I understand now. The jdk-6u20-javafx-1_3-windows-i586.exe file was a file installer, not the actual JRE or JDK that I needed. I had actually installed the JDK the other day on my first try at installing Eclipse. So I just used eclipse to map to that one.

This was confusing for me, despite the instructions, because i didn't know what a JRE or JDK were. It was unclear that, in order to run Eclips, you needed to point it at an executable which is available as part of a Java Development Environment - which is installed easily enough with a downloadable installer.

Thanks everyone.
Re: failed to find main class [message #552267 is a reply to message #552122] Wed, 11 August 2010 13:30 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 8/10/2010 4:53 PM, horseatingweeds wrote:
> Is it ok to have eclipse in the programs directory on windows?

There is nothing wrong with installing the JDK normally, which puts it
into Program Files/Program Files (x86), and consuming it from there. In
that case, you should add the -vm option to eclipse.ini.
Re: failed to find main class [message #552268 is a reply to message #552126] Wed, 11 August 2010 13:35 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 8/10/2010 6:37 PM, horseatingweeds wrote:
> Ok, I understand now. The jdk-6u20-javafx-1_3-windows-i586.exe file was
> a file installer, not the actual JRE or JDK that I needed. I had
> actually installed the JDK the other day on my first try at installing
> Eclipse. So I just used eclipse to map to that one.
> This was confusing for me, despite the instructions, because i didn't
> know what a JRE or JDK were. It was unclear that, in order to run
> Eclips, you needed to point it at an executable which is available as
> part of a Java Development Environment - which is installed easily
> enough with a downloadable installer.
> Thanks everyone.

Eclipse is written in Java and needs a JRE in order to run.

What Eclipse does, for Java developers, is help them develop software
written to Java. For that, you need the JDK.

By referring to the JDK in eclipse.ini, you make it that Eclipse runs on
the JRE that accompanies the JDK and make it that it consumes the JDK
because you're writing a Java application (app, servlet, etc.).
Re: failed to find main class [message #559782 is a reply to message #552121] Sat, 18 September 2010 11:13 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 1
Registered: September 2010
Junior Member
I have exactly the same problem: when I try to open eclipse helios I get the error message "Failed to find a Main Class in : 'C:\Eclipse 3.6\eclipse\plugins\org.eclipse.equinox.launcher_1.1.0.v2010 0507' ".

The file is present, and I have tried pointing to the vm with JDK 1.6.0_20 and 1.5.0_22, but still the same error. My eclipse.ini file in C:\Eclipse 3.6\eclipse is currently:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v 20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
"C:\Program Files\Java\jdk1.5.0_22\bin\java.exe"

My OS is Vista SP2. I have used Eclipse Ganymede and Galileo successfuly - still am, since I can't get Helios to work.

Having looked at and tried Russell Bateman's many helpful suggestions, I can only conclude that I have missed something. Can you point me in the right direction?
Re: failed to find main class [message #885834 is a reply to message #551186] Wed, 13 June 2012 17:27 Go to previous messageGo to next message
Anuja Gupta is currently offline Anuja GuptaFriend
Messages: 2
Registered: June 2012
Junior Member
hi...I have eclipse galelio installed and now i want to install ECLIPSE IDE FOR JAVA DEVELOPER also and I am using jdk 1.6.0_32 and while opening eclipse.exe for my new eclipse it gives "failed to find main class in C:\Users\Anuja\Desktop\eclipse//plugins/ org.eclipse.equinox.launcher_1.3.0.v20 120552-1813.jar exception.so shud I remove galileo one or can use both ,but how?
Re: failed to find main class [message #885836 is a reply to message #885834] Wed, 13 June 2012 17:28 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 6/13/2012 11:27 AM, Anuja Gupta wrote:
> hi...I have eclipse galelio installed and now i want to install ECLIPSE
> IDE FOR JAVA DEVELOPER also and I am using jdk 1.6.0_32 and while
> opening eclipse.exe for my new eclipse it gives "failed to find main
> class in C:\Users\Anuja\Desktop\eclipse//plugins/
> org.eclipse.equinox.launcher_1.3.0.v20 120552-1813.jar exception.so shud
> I remove galileo one or can use both ,but how?

You may install as many copies of Eclipse as you have room on your hard
disk for. Obviously, each must be on its own filesystem path.
Re: failed to find main class [message #885839 is a reply to message #885836] Wed, 13 June 2012 17:35 Go to previous messageGo to next message
Anuja Gupta is currently offline Anuja GuptaFriend
Messages: 2
Registered: June 2012
Junior Member
I have put both eclipse folder in java folder under program files..what is the problem then?
Re: failed to find main class [message #885844 is a reply to message #885839] Wed, 13 June 2012 17:46 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 6/13/2012 11:35 AM, Anuja Gupta wrote:
> I have put both eclipse folder in java folder under program files..what
> is the problem then?

There's not enough information to go. If I understand what you've said,
which contradicts the scant information in your original question, you
propose to drop Eclipse somewhere underneath C:/Program Files/Java/...

This would not be a very tidy solution. Put your copies of Eclipse on
paths like C:\Users\Anuja\dev\galileo, \helios, \indigo, \etc.

Then, edit your eclipse.ini files to reflect where you've installed Java
according to http://wiki.eclipse.org/Eclipse.ini. If you're going to do
Java, be sure to download a copy of the JDK (and not a mere JRE). I keep
the JDK I'm using for Eclipse privately to my user and wire it up to
eclipse.ini as well as use it in Eclipse itself.

Be certain you're not mismatched between the bittedness of Eclipse and
the Java you're telling it to use.
Previous Topic:Eclipse
Next Topic:Clear CommandLine arguments on restart of Eclipse
Goto Forum:
  


Current Time: Sun Dec 21 04:51:33 GMT 2014

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

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