Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse 3.1 and ANT script
Eclipse 3.1 and ANT script [message #218671] Thu, 10 November 2005 21:32 Go to next message
harry sheng is currently offline harry shengFriend
Messages: 37
Registered: July 2009
Member
Hi,

I have an ANT script which runs well on Eclipse 3.0.
I migrate it to Eclipse 3.1 this week together with the java project,
(no source change, just import the project in 3.1 workspace from CVS
repository.)

The ANT script does not work well in 3.1.

1. Run ANT in the same JRE as the workspace

1.1 use <exec executable="javasigner.exe"> instead of <signjar>
No verbose messages for <jar> task.
Execute failed: java.io.IOException: CreateProcess: jarsigner.exe
-storepass password <jarfile> <alias> error=2

1.2 use <signjar> instead of <exec executable="javasigner.exe">
Lots of verbose messages for <jar> task.
Execute failed: java.io.IOException: CreateProcess: jarsigner.exe
-storepass password <jarfile> <alias> error=2


2. Run ANT in separate JRE (J2SDK 1.4.2_05, I have only this installed for
the workspace anyway.)

First of all, if I have JRE 1.5 installed on my computer, the 1.5
rt.jar (not the 1.4.2 rt.jar !) will be picked for compilation. I only
installed 1.4.2 JRE for the workspace, and JAVA_HOME points to J2SDK 1.4.2.

2.1 use <exec executable="javasigner.exe"> instead of <signjar>
No verbose messages for <jar> task.
build succeeded.

2.2 use <signjar> instead of <exec executable="javasigner.exe">
Lots of verbose messages for <jar> task.
jarsigner: unable to open jar file: <path to the jar file>
(Checked and the file is there.)

I want run ANT in the same JRE as the workspace so that I do not need to
add serialVersionUID to every serializable class if I want to debug in
Eclipse.
Please help.

Thanks,
Harry
Re: Eclipse 3.1, JRE, ANT and ${java.home} [message #218758 is a reply to message #218671] Fri, 11 November 2005 18:13 Go to previous messageGo to next message
harry sheng is currently offline harry shengFriend
Messages: 62
Registered: July 2009
Member
I specified the only installed JRE home directory as the JDK install
directory "c:\j2se1.4.2_05" in Eclipse. But when refer ${java.home} in ANT
script, it points to JRE install directory at "c:\program
files\java\jre1.4.2_05".

I cannot set java.home or java_home or my.java.home as property in ANT
script (it triggers a huge error message popup when I run the script).

My question,
1. Will Eclipse actually use the JRE I specified for the project or
workspace ?
2. If I have 2 or more JDK (JRE) installed, how will Eclipse pick from
them ?

I have these questions, because last time I have 1.4.2 and 1.5.0 JRE
installed on my computer, Eclipse picked the 1.5.0 rt.jar to run the ANT
script even though I only have install 1.4.2 JRE for the whole workspace.

Now I deleted the 1.5.0 JRE from my machine, and the ANT script complains
"C:\program files\java\jre1.4.2_05\bin\jarsigner.exe" is not a recognized
as a command.
Re: Eclipse 3.1 and ANT script [message #218774 is a reply to message #218671] Fri, 11 November 2005 20:16 Go to previous message
harry sheng is currently offline harry shengFriend
Messages: 37
Registered: July 2009
Member
I delete every eclipse related stuff from hard disk and reinstall eclipse
again.
Now everything goes back to normal.

Thanks,
Harry
Previous Topic:can't delete the programmatically created class from PackageView
Next Topic:Code formatter
Goto Forum:
  


Current Time: Fri Apr 26 23:42:41 GMT 2024

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

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

Back to the top