This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 108582 - Request manifest header added to JAR noting JDK used for compilation
Summary: Request manifest header added to JAR noting JDK used for compilation
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-01 02:17 UTC by ulfzibis
Modified: 2011-08-31 14:07 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2007-07-01 02:17:32 UTC
In project properties I have defined the java platform 1.6.0-b105

But in dist's jar-Manifest I find:

Created-By: 1.6.0_01-b06 (Sun Microsystems Inc.)
Comment 1 Tomas Zezula 2007-07-03 18:26:16 UTC
The "Created-By" is added by the ant jar task and is not important at least now. I've expect that you have default
platform 1.6.0_01-b06 and explicit platform set to project is 1.6.0-b105, right? The ant runs inside the IDE and the jar
task doesn't have support to run on explicit platform. Running the ant on the explicit platform will slowdown the build.
Comment 2 ulfzibis 2007-07-04 15:49:18 UTC
Yes, you are right.

The ant jar task should use it's property "platform.active" from project.properties for the "Created-By"-entry, instead
of the version of the JVM on which it's running.

Comment 3 Tomas Zezula 2007-07-05 09:05:07 UTC
Unfortunately it requires changes in the ant jar task.
Comment 4 ulfzibis 2007-07-05 10:08:32 UTC
So then it's an ant issue ?

If yes, could you file it there.
Unfortunately I'm not involved in the ant project.
Comment 5 ulfzibis 2007-07-05 10:52:49 UTC
So then it's an ant issue ?

If yes, could you file it there.
Unfortunately I'm not involved in the ant project.
Comment 6 Tomas Zezula 2007-07-05 11:04:40 UTC
I will firstly try to find some workaround and later fill an enhancement for adding (executable) to jar task.
Comment 7 Jesse Glick 2007-07-09 21:08:08 UTC
Not a defect IMHO. Ant is correctly recording which version of Java was used to package the JAR. This has nothing to do
with what versions of Java were used to compile sources or test the result.
Comment 8 ulfzibis 2007-07-10 15:31:42 UTC
IMHO for the deployer of a given jar archive it's more interesting to know which version of javac has compiled the
sources, than which version of jar has packed the classes to a jar.
Can you add an additional info in the manifest, which documents this?
Comment 9 Tomas Zezula 2007-07-10 16:43:19 UTC
Why you need to know which version of javac compiled the sources? If all you need is a -target you can get it from the
class files. If you compile source with JDK 1.6 javac with -target 1.4 the javac will generate bytecode for JDK 1.4 but
it was compiled by 1.6 javac.
Comment 10 ulfzibis 2007-07-10 17:00:16 UTC
My last comment was just academic.
I didn't have needed this until now. I was just confused about finding the "wrong" version in the manifest, thinking
that could be confusing to others too.

Comment 11 ulfzibis 2007-07-10 18:09:32 UTC
I came to this issue, because I had real problems compiling with JDK 6.0 u1 (see link below) and wanted to distinguish
my jars by it's manifest.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6575083
(Until this bug is resolved, I have to remain at JDK 6.0.)
Comment 12 Jesse Glick 2007-07-10 18:50:03 UTC
Rather an enhancement request in that case. No plans to implement anything of the sort, but I'm sure you can figure out
how to do it yourself by overriding the jar target in your build.xml.