Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » sth wrong after installing 1.4.2_03
sth wrong after installing 1.4.2_03 [message #179564] Tue, 13 January 2004 22:18 Go to next message
Eclipse UserFriend
Originally posted by: ming_zhu.163.net

I'm using Eclipse 2.1.2 on Windows 2000 Professional. I was reading the
book Eclipse in Action from Manning and follow the examples to learn how to
use Eclipse. I met some problems but don't know how to quickly find a
solution.

Previously I was using JDK 1.4.2_02 ( I guess. Forget the exact version
number. ) which was installed at C:\j2sdk1.4.2. I was using Log4J and Ant
and they all worked fine.

Several days ago I uninstalled the previous JDK and installed JDK 1.4.2_03
at C:\j2sdk1.4.2_03. Then I found both Log4J and Ant cannot work correctly.

When I run the program from Eclipse, the following error is reported for
Log4J.

log4j:WARN No appenders could be found for logger
(org.eclipseguide.persistence.FilePersistenceServices).
log4j:WARN Please initialize the log4j system properly.

When I run the Ant from Eclipse, I meet the following.

....

Compile:
....
[javac] BUILD FAILED:
file:C:/eclipse/workspace/Persistence/build.xml:38: Unable to find a javac
compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Total time: 1 second

But when I run Ant with the same build.xml with a DOS window, it works.
Re: sth wrong after installing 1.4.2_03 [message #179589 is a reply to message #179564] Wed, 14 January 2004 00:16 Go to previous messageGo to next message
Eclipse UserFriend
I would recommend starting Eclipse using -vm argument to ensure that Eclipse
is started using your JDK install at C:\j2sdk1.4.2_03.
It would appear that you are starting Eclipse using a JRE install.

If you are correctly using the JDK install already, to fix the Ant problem
ensure to include the tools.jar from your JDK install in your Ant runtime
classpath.

HTH
Darins

"Zhu Ming" <ming_zhu@163.net> wrote in message
news:bu2cbk$4sl$1@eclipse.org...
> I'm using Eclipse 2.1.2 on Windows 2000 Professional. I was reading the
> book Eclipse in Action from Manning and follow the examples to learn how
to
> use Eclipse. I met some problems but don't know how to quickly find a
> solution.
>
> Previously I was using JDK 1.4.2_02 ( I guess. Forget the exact version
> number. ) which was installed at C:\j2sdk1.4.2. I was using Log4J and Ant
> and they all worked fine.
>
> Several days ago I uninstalled the previous JDK and installed JDK 1.4.2_03
> at C:\j2sdk1.4.2_03. Then I found both Log4J and Ant cannot work
correctly.
>
> When I run the program from Eclipse, the following error is reported for
> Log4J.
>
> log4j:WARN No appenders could be found for logger
> (org.eclipseguide.persistence.FilePersistenceServices).
> log4j:WARN Please initialize the log4j system properly.
>
> When I run the Ant from Eclipse, I meet the following.
>
> ...
>
> Compile:
> ...
> [javac] BUILD FAILED:
> file:C:/eclipse/workspace/Persistence/build.xml:38: Unable to find a javac
> compiler;
> com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK
> Total time: 1 second
>
> But when I run Ant with the same build.xml with a DOS window, it works.
>
>
Re: sth wrong after installing 1.4.2_03 [message #179626 is a reply to message #179589] Wed, 14 January 2004 02:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ming_zhu.163.net

Thanks alot, Darin!

I run eclipse with -vm C:\j2sdk1.4.2_03\bin\java.exe. Then Log4J and Ant
are working now.

But there still will be a black DOS box when Eclipse is running. Any way to
remove/hide it?

It's so simple! But why will this happen? I think JRE is installed
together with JDK. But why can't Eclipse find the correct JDK path and has
to use the JRE path? Even when I run Eclipse with the -vm command line
parameter, the JRE_LIB Classpath Variable is still "C:\Program
Files\Java\j2re1.4.2_03\lib\rt.jar". Any way to change that?

Thanks again!
Zhu Ming

"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
news:bu2j50$ail$1@eclipse.org...
> I would recommend starting Eclipse using -vm argument to ensure that
Eclipse
> is started using your JDK install at C:\j2sdk1.4.2_03.
> It would appear that you are starting Eclipse using a JRE install.
>
> If you are correctly using the JDK install already, to fix the Ant problem
> ensure to include the tools.jar from your JDK install in your Ant runtime
> classpath.
>
> HTH
> Darins
>
> "Zhu Ming" <ming_zhu@163.net> wrote in message
> news:bu2cbk$4sl$1@eclipse.org...
> > I'm using Eclipse 2.1.2 on Windows 2000 Professional. I was reading the
> > book Eclipse in Action from Manning and follow the examples to learn how
> to
> > use Eclipse. I met some problems but don't know how to quickly find a
> > solution.
> >
> > Previously I was using JDK 1.4.2_02 ( I guess. Forget the exact version
> > number. ) which was installed at C:\j2sdk1.4.2. I was using Log4J and
Ant
> > and they all worked fine.
> >
> > Several days ago I uninstalled the previous JDK and installed JDK
1.4.2_03
> > at C:\j2sdk1.4.2_03. Then I found both Log4J and Ant cannot work
> correctly.
> >
> > When I run the program from Eclipse, the following error is reported for
> > Log4J.
> >
> > log4j:WARN No appenders could be found for logger
> > (org.eclipseguide.persistence.FilePersistenceServices).
> > log4j:WARN Please initialize the log4j system properly.
> >
> > When I run the Ant from Eclipse, I meet the following.
> >
> > ...
> >
> > Compile:
> > ...
> > [javac] BUILD FAILED:
> > file:C:/eclipse/workspace/Persistence/build.xml:38: Unable to find a
javac
> > compiler;
> > com.sun.tools.javac.Main is not on the classpath.
> > Perhaps JAVA_HOME does not point to the JDK
> > Total time: 1 second
> >
> > But when I run Ant with the same build.xml with a DOS window, it works.
> >
> >
>
>
Re: sth wrong after installing 1.4.2_03 [message #179634 is a reply to message #179589] Wed, 14 January 2004 03:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ming_zhu.163.net

I've found the solution should be to add the tools.jar in the Additional
JARs for Ant.
If I remove tools.jar, Ant will not work even if I use -vm to start Eclipse
with JDK JVM.

BTW, to change reserved class path variables, go to menu Window ->
Preference, then Java -> Installed JREs. But this JDK JVM should be the
same as the JRE JVM since they are the same version 1.4.2_03.

Thanks!
Zhu Ming


"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
news:bu2j50$ail$1@eclipse.org...
> I would recommend starting Eclipse using -vm argument to ensure that
Eclipse
> is started using your JDK install at C:\j2sdk1.4.2_03.
> It would appear that you are starting Eclipse using a JRE install.
>
> If you are correctly using the JDK install already, to fix the Ant problem
> ensure to include the tools.jar from your JDK install in your Ant runtime
> classpath.
>
> HTH
> Darins
>
> "Zhu Ming" <ming_zhu@163.net> wrote in message
> news:bu2cbk$4sl$1@eclipse.org...
> > I'm using Eclipse 2.1.2 on Windows 2000 Professional. I was reading the
> > book Eclipse in Action from Manning and follow the examples to learn how
> to
> > use Eclipse. I met some problems but don't know how to quickly find a
> > solution.
> >
> > Previously I was using JDK 1.4.2_02 ( I guess. Forget the exact version
> > number. ) which was installed at C:\j2sdk1.4.2. I was using Log4J and
Ant
> > and they all worked fine.
> >
> > Several days ago I uninstalled the previous JDK and installed JDK
1.4.2_03
> > at C:\j2sdk1.4.2_03. Then I found both Log4J and Ant cannot work
> correctly.
> >
> > When I run the program from Eclipse, the following error is reported for
> > Log4J.
> >
> > log4j:WARN No appenders could be found for logger
> > (org.eclipseguide.persistence.FilePersistenceServices).
> > log4j:WARN Please initialize the log4j system properly.
> >
> > When I run the Ant from Eclipse, I meet the following.
> >
> > ...
> >
> > Compile:
> > ...
> > [javac] BUILD FAILED:
> > file:C:/eclipse/workspace/Persistence/build.xml:38: Unable to find a
javac
> > compiler;
> > com.sun.tools.javac.Main is not on the classpath.
> > Perhaps JAVA_HOME does not point to the JDK
> > Total time: 1 second
> >
> > But when I run Ant with the same build.xml with a DOS window, it works.
> >
> >
>
>
Re: sth wrong after installing 1.4.2_03 [message #179681 is a reply to message #179626] Wed, 14 January 2004 04:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Zhu Ming wrote:

>Thanks alot, Darin!
>
>I run eclipse with -vm C:\j2sdk1.4.2_03\bin\java.exe. Then Log4J and Ant
>are working now.
>
>But there still will be a black DOS box when Eclipse is running. Any way to
>remove/hide it?
>
>
use javaw.exe instead of java.exe

Dani

>It's so simple! But why will this happen? I think JRE is installed
>together with JDK. But why can't Eclipse find the correct JDK path and has
>to use the JRE path? Even when I run Eclipse with the -vm command line
>parameter, the JRE_LIB Classpath Variable is still "C:\Program
>Files\Java\j2re1.4.2_03\lib\rt.jar". Any way to change that?
>
>Thanks again!
>Zhu Ming
>
>"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
>news:bu2j50$ail$1@eclipse.org...
>
>
>>I would recommend starting Eclipse using -vm argument to ensure that
>>
>>
>Eclipse
>
>
>>is started using your JDK install at C:\j2sdk1.4.2_03.
>>It would appear that you are starting Eclipse using a JRE install.
>>
>>If you are correctly using the JDK install already, to fix the Ant problem
>>ensure to include the tools.jar from your JDK install in your Ant runtime
>>classpath.
>>
>>HTH
>>Darins
>>
>>"Zhu Ming" <ming_zhu@163.net> wrote in message
>>news:bu2cbk$4sl$1@eclipse.org...
>>
>>
>>>I'm using Eclipse 2.1.2 on Windows 2000 Professional. I was reading the
>>>book Eclipse in Action from Manning and follow the examples to learn how
>>>
>>>
>>to
>>
>>
>>>use Eclipse. I met some problems but don't know how to quickly find a
>>>solution.
>>>
>>>Previously I was using JDK 1.4.2_02 ( I guess. Forget the exact version
>>>number. ) which was installed at C:\j2sdk1.4.2. I was using Log4J and
>>>
>>>
>Ant
>
>
>>>and they all worked fine.
>>>
>>>Several days ago I uninstalled the previous JDK and installed JDK
>>>
>>>
>1.4.2_03
>
>
>>>at C:\j2sdk1.4.2_03. Then I found both Log4J and Ant cannot work
>>>
>>>
>>correctly.
>>
>>
>>>When I run the program from Eclipse, the following error is reported for
>>>Log4J.
>>>
>>>log4j:WARN No appenders could be found for logger
>>>(org.eclipseguide.persistence.FilePersistenceServices).
>>>log4j:WARN Please initialize the log4j system properly.
>>>
>>>When I run the Ant from Eclipse, I meet the following.
>>>
>>>...
>>>
>>>Compile:
>>>...
>>> [javac] BUILD FAILED:
>>>file:C:/eclipse/workspace/Persistence/build.xml:38: Unable to find a
>>>
>>>
>javac
>
>
>>>compiler;
>>>com.sun.tools.javac.Main is not on the classpath.
>>>Perhaps JAVA_HOME does not point to the JDK
>>>Total time: 1 second
>>>
>>>But when I run Ant with the same build.xml with a DOS window, it works.
>>>
>>>
>>>
>>>
>>
>>
>
>
>
>
Re: sth wrong after installing 1.4.2_03 [message #179972 is a reply to message #179634] Wed, 14 January 2004 12:05 Go to previous message
Eclipse UserFriend
"Zhu Ming" <ming_zhu@163.net> wrote in message
news:bu2tfu$l1u$1@eclipse.org...
> I've found the solution should be to add the tools.jar in the Additional
> JARs for Ant.
> If I remove tools.jar, Ant will not work even if I use -vm to start
Eclipse
> with JDK JVM.

Ant is more than javac :-)
Ant needs and uses the tools.jar for the javac task (and possible other
tasks).
Starting Eclipse with the -vm arg to point to a JDK install allows Eclipse
to add the tools.jar to your Ant runtime classpath automatically.

HTH
Darins
Previous Topic:Programmatic use of Eclipse's CVS Plugin
Next Topic:Exception launching the Eclipse Platform
Goto Forum:
  


Current Time: Sun Jun 08 08:33:45 EDT 2025

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

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

Back to the top