Skip to main content



      Home
Home » Newcomers » Newcomers » Ant problemos
Ant problemos [message #70332] Fri, 27 May 2005 09:47 Go to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

Hi,
I have a problem that is really killing me.

I recently installed Eclipse3.1M7. JDK is V1.5.0_01

Ant builds ran fine in 3.1M6, but now every time I try to run an ant task
I get a popup with:
Title: Java Virtual Machine Launcher
Message: Could not find the main class. Program will exit.

Build and Executes/debugs of the project all work fine...Ant just does not
want to run.

I've checked the tools.jar and jre...all looks fine.

Any ideas...anyone..please?
Help....

ty,
pc
Re: Ant problemos [message #70431 is a reply to message #70332] Fri, 27 May 2005 11:41 Go to previous messageGo to next message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=95611
Workaround listed in comment #2

HTH
Darins

"Paul" <paulcohen@ozemail.com.au> wrote in message
news:93f467da0e26b04e0494e2aa1a5ddadd$1@www.eclipse.org...
> Hi,
> I have a problem that is really killing me.
>
> I recently installed Eclipse3.1M7. JDK is V1.5.0_01
>
> Ant builds ran fine in 3.1M6, but now every time I try to run an ant task
> I get a popup with:
> Title: Java Virtual Machine Launcher
> Message: Could not find the main class. Program will exit.
>
> Build and Executes/debugs of the project all work fine...Ant just does not
> want to run.
>
> I've checked the tools.jar and jre...all looks fine.
>
> Any ideas...anyone..please?
> Help....
>
> ty,
> pc
>
Re: Ant problemos [message #70487 is a reply to message #70431] Fri, 27 May 2005 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

thanks...thought I was going crazy for a while.

The proposed solution does not appear to work for me either.

Any clues?

ty,
pc
Re: Ant problemos [message #70504 is a reply to message #70487] Fri, 27 May 2005 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

and I have no quotes in any Path entries
Re: Ant problemos [message #70522 is a reply to message #70504] Fri, 27 May 2005 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Can you provide the command line information: Right click on your failed
build process>Process Information>Command Line

Thanks
Darins

"Paul" <paulcohen@ozemail.com.au> wrote in message
news:7eb9fe17bfce2596f547058182e08755$1@www.eclipse.org...
> and I have no quotes in any Path entries
>
Re: Ant problemos [message #70541 is a reply to message #70504] Fri, 27 May 2005 12:55 Go to previous messageGo to next message
Eclipse UserFriend
And does running in the same JRE (set on the JRE tab of your Ant launch
config) solve any problems?

Darins

"Paul" <paulcohen@ozemail.com.au> wrote in message
news:7eb9fe17bfce2596f547058182e08755$1@www.eclipse.org...
> and I have no quotes in any Path entries
>
Re: Ant problemos [message #70560 is a reply to message #70541] Fri, 27 May 2005 13:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

Interesting...my main jre is set to the jdk

If I set the Ant to JRE (different one) I get the original error.

If I set it to same as workspace I now get
Dialog: Failure of Background Ant Build
Message: Could not find one or more classes:
"org.apache.tools.ant.buidlexception"
PLease check ant classpath

ty,pc
Re: Ant problemos [message #70577 is a reply to message #70522] Fri, 27 May 2005 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

I'm not sure what you mean here as I don't see any of these options.

right clicking on build.xml or any of the targets.

ty,
pc
Re: Ant problemos [message #70595 is a reply to message #70577] Fri, 27 May 2005 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Sorry...more explict instructions:
Run the build that fails
Go to the debug view, right click on the terminated process>Process
Information>Command Line

Also in your plugins directory you do not have either
org.eclipse.ant.core_3.1.0 or org.eclipse.ant.ui_3.1.0 do you?
That is you did your M7 install in a new location...not over your old M6
install?

Darins

"Paul" <paulcohen@ozemail.com.au> wrote in message
news:3b44f0fd9e0d39e66c720b97abca3aef$1@www.eclipse.org...
> I'm not sure what you mean here as I don't see any of these options.
>
> right clicking on build.xml or any of the targets.
>
> ty,
> pc
>
Re: Ant problemos [message #70775 is a reply to message #70595] Fri, 27 May 2005 13:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

ant "-Declipse.home=c:\eclipse " "-Declipse.running=true "
"-DJAVA_HOME=C:\Java\jdk1.5.0_01 "
"-Dant.home=c:\eclipse\plugins\org.apache.ant_1.6.3" -logger
org.eclipse.ant.internal.ui.antsupport.logger.AntProcessBuil dLogger
-buildfile "C:\eclipse\workspace2\LightStone\build.xml"


re: install. No I deleted all the M6 and did a clean install with just the
workspaces in the directory.

the only ant ones I have are:
C:\eclipse\plugins\org.apache.ant_1.6.3
C:\eclipse\plugins\org.eclipse.emf.ant_2.1.0

ty,pc
Re: Ant problemos [message #70789 is a reply to message #70775] Fri, 27 May 2005 14:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

previous message was eclipse and ant using same JRE

THis is from different ones, where the message is the original "Failed to
find Main class message"

C:\Java\jre1.5.0_01\bin\javaw.exe
-Dant.home=c:\eclipse\plugins\org.apache.ant_1.6.3
-Dant.library.dir=c:\eclipse\plugins\org.apache.ant_1.6.3\li b -classpath
G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6. 2\lib\ant.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.a pache.ant_1.6.2\lib\ant-antlr.jar;G:\eclipse-SDK-3.0-win32\e clipse\plugins\org.apache.ant_1.6.2\lib\ant-apache-bcel.jar; G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6. 2\lib\ant-apache-bsf.jar;G:\eclipse-SDK-3.0-win32\eclipse\pl ugins\org.apache.ant_1.6.2\lib\ant-apache-log4j.jar;G:\eclip se-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\an t-apache-oro.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\or g.apache.ant_1.6.2\lib\ant-apache-regexp.jar;G:\eclipse-SDK- 3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-apach e-resolver.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org. apache.ant_1.6.2\lib\ant-commons-logging.jar;G:\eclipse-SDK- 3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-commo ns-net.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apac he.ant_1.6.2\lib\ant-icontract.jar;G:\eclipse-SDK-3.0-win32\ eclipse\plugins\org.apache.ant_1.6.2\lib\ant-jai.jar;G:\ecli pse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\a nt-javamail.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org .apache.ant_1.6.2\lib\ant-jdepend.jar;G:\eclipse-SDK-3.0-win 32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-jmf.jar;G:\e clipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\li b\ant-jsch.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org. apache.ant_1.6.2\lib\ant-junit.jar;G:\eclipse-SDK-3.0-win32\ eclipse\plugins\org.apache.ant_1.6.2\lib\ant-launcher.jar;G: \eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\ lib\ant-netrexx.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins \org.apache.ant_1.6.2\lib\ant-nodeps.jar;G:\eclipse-SDK-3.0- win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-starteam. jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_ 1.6.2\lib\ant-stylebook.jar;G:\eclipse-SDK-3.0-win32\eclipse \plugins\org.apache.ant_1.6.2\lib\ant-swing.jar;G:\eclipse-S DK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-tr ax.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.a nt_1.6.2\lib\ant-vaj.jar;G:\eclipse-SDK-3.0-win32\eclipse\pl ugins\org.apache.ant_1.6.2\lib\ant-weblogic.jar;G:\eclipse-S DK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-xa lan1.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache .ant_1.6.2\lib\ant-xslp.jar;C:\eclipse\configuration\org.ecl ipse.osgi\bundles\6\1\.cp\lib\remoteAnt.jar;C:\Java\jdk1.5.0 _01\lib\tools.jar;C:\eclipse\plugins\org.junit_3.8.1\junit.j ar
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner
"\"-Declipse.connect.port=1352 \""
"\"-Dorg.eclipse.ant.core.ANT_PROCESS_ID=1117216524500 \""
"\"-DJAVA_HOME=C:\Java\jdk1.5.0_01 \""
\"-Dant.home=c:\eclipse\plugins\org.apache.ant_1.6.3\" -logger
org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuild Logger
-buildfile \"C:\eclipse\workspace2\LightStone\build.xml\"
Re: Ant problemos [message #70813 is a reply to message #70789] Fri, 27 May 2005 14:11 Go to previous messageGo to next message
Eclipse UserFriend
Can you verify that

C:\eclipse\configuration\org.eclipse.osgi\bundles\6\1\.cp\li b\remoteAnt.jar
is present.

Also it is very strange that your Ant home is pointing to
c:\eclipse\plugins\org.apache.ant_1.6.3 yet you are using all the Ant JARs
from G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6. 2?

Run>External Tools>External Tools...
Go to the classpath tab
Click Restore Defaults
Run

"Paul" <paulcohen@ozemail.com.au> wrote in message
news:93d26f115712250cc649b010abea1474$1@www.eclipse.org...
> previous message was eclipse and ant using same JRE
>
> THis is from different ones, where the message is the original "Failed to
> find Main class message"
>
> C:\Java\jre1.5.0_01\bin\javaw.exe
> -Dant.home=c:\eclipse\plugins\org.apache.ant_1.6.3
> -Dant.library.dir=c:\eclipse\plugins\org.apache.ant_1.6.3\li b -classpath
>
G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6. 2\lib\ant.jar;G:
\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\ lib\ant-antlr.ja
r;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1. 6.2\lib\ant-apac
he-bcel.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apa che.ant_1.6.2\li
b\ant-apache-bsf.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugin s\org.apache.ant
_1.6.2\lib\ant-apache-log4j.jar;G:\eclipse-SDK-3.0-win32\ecl ipse\plugins\org
..apache.ant_1.6.2\lib\ant-apache-oro.jar;G:\eclipse-SDK-3.0 -win32\eclipse\pl
ugins\org.apache.ant_1.6.2\lib\ant-apache-regexp.jar;G:\ecli pse-SDK-3.0-win3
2\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-apache-resolv er.jar;G:\eclips
e-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant -commons-logging
..jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.an t_1.6.2\lib\ant-c
ommons-net.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org. apache.ant_1.6.2
\lib\ant-icontract.jar;G:\eclipse-SDK-3.0-win32\eclipse\plug ins\org.apache.a
nt_1.6.2\lib\ant-jai.jar;G:\eclipse-SDK-3.0-win32\eclipse\pl ugins\org.apache
..ant_1.6.2\lib\ant-javamail.jar;G:\eclipse-SDK-3.0-win32\ec lipse\plugins\org
..apache.ant_1.6.2\lib\ant-jdepend.jar;G:\eclipse-SDK-3.0-wi n32\eclipse\plugi
ns\org.apache.ant_1.6.2\lib\ant-jmf.jar;G:\eclipse-SDK-3.0-w in32\eclipse\plu
gins\org.apache.ant_1.6.2\lib\ant-jsch.jar;G:\eclipse-SDK-3. 0-win32\eclipse\
plugins\org.apache.ant_1.6.2\lib\ant-junit.jar;G:\eclipse-SD K-3.0-win32\ecli
pse\plugins\org.apache.ant_1.6.2\lib\ant-launcher.jar;G:\ecl ipse-SDK-3.0-win
32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-netrexx.jar; G:\eclipse-SDK-3
..0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-nodep s.jar;G:\eclipse-
SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\lib\ant-s tarteam.jar;G:\e
clipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_1.6.2\li b\ant-stylebook.
jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache.ant_ 1.6.2\lib\ant-sw
ing.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apache. ant_1.6.2\lib\an
t-trax.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.apac he.ant_1.6.2\lib
\ant-vaj.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins\org.ap ache.ant_1.6.2\l
ib\ant-weblogic.jar;G:\eclipse-SDK-3.0-win32\eclipse\plugins \org.apache.ant_
1.6.2\lib\ant-xalan1.jar;G:\eclipse-SDK-3.0-win32\eclipse\pl ugins\org.apache
..ant_1.6.2\lib\ant-xslp.jar;C:\eclipse\configuration\org.ec lipse.osgi\bundle
s\6\1\.cp\lib\remoteAnt.jar;C:\Java\jdk1.5.0_01\lib\tools.ja r;C:\eclipse\plu
gins\org.junit_3.8.1\junit.jar
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner
> "\"-Declipse.connect.port=1352 \""
> "\"-Dorg.eclipse.ant.core.ANT_PROCESS_ID=1117216524500 \""
> "\"-DJAVA_HOME=C:\Java\jdk1.5.0_01 \""
> \"-Dant.home=c:\eclipse\plugins\org.apache.ant_1.6.3\" -logger
> org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuild Logger
> -buildfile \"C:\eclipse\workspace2\LightStone\build.xml\"
>
Re: Ant problemos [message #70940 is a reply to message #70813] Fri, 27 May 2005 14:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

remoteant.jar is there.

Strange...the ant home does not seem to want to reset, even manually doing
it.
Is it set anywhere else?

ty,pc
Re: Ant problemos [message #70973 is a reply to message #70940] Fri, 27 May 2005 14:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paulcohen.ozemail.com.au

Success!!
Thank you.

Had to go to window/preferences/ant/runtime/
and remove the old ones manually and add external jars.
Now works fine.

Strange how it did that because I dumped a whole directory from one G
drive to C, without running it on G first, unless there is a workspace
setting that held the ant home locations? These were also copied from G to
C drive?

So problem actually seemed to be just the ant home was screwed, as I just
tested the same/diff workspace with "set an input handler" checked and
it's all sweet.

Thanks again for your time in talking me through this.
Sometimes it's obvious, but an outside eye is what you need.

Cheers,
pc
Re: Ant problemos [message #70984 is a reply to message #70973] Fri, 27 May 2005 15:08 Go to previous message
Eclipse UserFriend
Thank you.
There must be a bug in here somewhere...it should not have been soo hard to
figure this out.
I will attempt to play around with migration in this area to see what I can
find.

Darins

"Paul" <paulcohen@ozemail.com.au> wrote in message
news:9bee63ae24ad182d588aa63a58c380c9$1@www.eclipse.org...
> Success!!
> Thank you.
>
> Had to go to window/preferences/ant/runtime/
> and remove the old ones manually and add external jars.
> Now works fine.
>
> Strange how it did that because I dumped a whole directory from one G
> drive to C, without running it on G first, unless there is a workspace
> setting that held the ant home locations? These were also copied from G to
> C drive?
>
> So problem actually seemed to be just the ant home was screwed, as I just
> tested the same/diff workspace with "set an input handler" checked and
> it's all sweet.
>
> Thanks again for your time in talking me through this.
> Sometimes it's obvious, but an outside eye is what you need.
>
> Cheers,
> pc
>
Previous Topic:Report Tutorial
Next Topic:The old SWT Javadoc question
Goto Forum:
  


Current Time: Wed Jul 23 17:26:46 EDT 2025

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

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

Back to the top