Considering File Content: Will the NetBeans IDE (deployed version)produce files identical to the jav

C

clusardi2k

(1) If I use the NetBeans IDE (6.8 version) and create a deployed version of a fairly large project will it be exactly the same as using the standard "javac" compiler deployed application on the command line.

Will the files produced by both tools be exactly the same. Can you, please, tell me the differences that will occur.

(2) Can you also give me a comparision of the Eclipse files produced on deployment versus the "javac" files produced. Will the two deployed projects be exactly the same.


Thanks for the detailed intuitive information,
 
M

markspace

(1) If I use the NetBeans IDE (6.8 version) and create a deployed
version of a fairly large project will it be exactly the same as
using the standard "javac" compiler deployed application on the
command line.

Will the files produced by both tools be exactly the same. Can you,
please, tell me the differences that will occur.

Depends. I'm pretty sure the .class files will be exactly the same.
However, since a .jar file is just a zip file, the order of those .class
files in the .jar won't be the same (possibly) and the .jar file won't
byte-for-byte compare as equals.

There might be other differences. NetBeans might decide to build a
manifest file for you. Depending on your usage of the command line
tools, you might not have a manifest at all. Etc.

Since most folks (all?) don't care about "exact" differences, only that
the execution is the same, or at least as expected, I doubt even the
tool vendors could answer this question completely.
 
J

Jeff Higgins

(1) If I use the NetBeans IDE (6.8 version) and create a deployed version of a fairly large project will it be exactly the same as using the standard "javac" compiler deployed application on the command line.

WTF does ""javac" compiler deployed application" mean?
 
L

Lew

(1) If I use the NetBeans IDE (6.8 version) and create a deployed version of a fairly large project
will it be exactly the same as using the standard "javac" compiler deployed application on the
command line.

Since NetBeans *uses* the javac compiler of whatever version of Java you have (which one do
you have?), or whichever one you configure for the project, the answer is obvious.
Will the files produced by both tools be exactly the same.

You mean "javac" run by NB vs. the same exact executable run on the command line?
Can you, please, tell me the differences that will occur.

Assuming the same executable is invoked each time you invoke "javac", what will the
difference be between

javac com/foo/bar/Something.java
and
javac com/foo/bar/Something.java
?
(2) Can you also give me a comparision of the Eclipse files produced on deployment

What exactly do you mean by "the Eclipse files produced on deployment"?

Compilation is not deployment, you know.
versus the "javac" files produced. Will the two deployed projects be exactly the same.

"javac" does not deploy projects.

Whether you get the same project "exactly" between any two deployments depends on what
has changed between the deployments. Did you recompile? Add or remove modules or resources?
Change Java versions?

If you don't change any of the inputs, the output will not change.
Thanks for the detailed intuitive information,

Sorry, "intuitive information"? What do you mean by that?

I prefer to offer factual information.
 
A

Arne Vajhøj

(1) If I use the NetBeans IDE (6.8 version) and create a deployed version of a fairly large project will it be exactly the same as using the standard "javac" compiler deployed application on the command line.

Will the files produced by both tools be exactly the same. Can you, please, tell me the differences that will occur.

(2) Can you also give me a comparision of the Eclipse files produced on deployment versus the "javac" files produced. Will the two deployed projects be exactly the same.

NetBeans use the same Java compiler as you do command line, so the
generated byte code will be the same assuming you use the same
compiler options (and note that it is quite common to build
with some options for development and with other options for
real build).

If you package in jar files there will always be differences
in files as jar files contain timestamps.

Eclipse comes with its own Java compiler and it could
generate different code.

Best practice is to develop the code in the IDE and
create official build with tools like ant/maven based
on VCS. So it is not something there is much focus on.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top