Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Considering File Content: Will the NetBeans IDE (deployed version)produce files identical to the javac compiler files

Reply
Thread Tools

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

 
 
clusardi2k@aol.com
Guest
Posts: n/a
 
      04-26-2013
(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,
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      04-26-2013
On 4/26/2013 6:41 AM, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> (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.


 
Reply With Quote
 
 
 
 
Jeff Higgins
Guest
Posts: n/a
 
      04-26-2013
On 04/26/2013 09:41 AM, (E-Mail Removed) wrote:
> (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?

> 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,


 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      04-26-2013
(E-Mail Removed) wrote:
> (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.

--
Lew
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      04-26-2013
On 4/26/2013 9:41 AM, (E-Mail Removed) wrote:
> (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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 8 - so bad it's hastening the death of the PC? ~misfit~ NZ Computing 18 04-15-2013 04:15 AM
What Linux freeware will blur faces & show all frames of a 30second AVI video? Danny D. Digital Photography 8 04-14-2013 10:18 PM
Help! Identical code doesn't work in Wing IDE but does in Komodo. fyleow Python 4 04-20-2006 01:24 PM
Python IDE like NetBeans/Delphi IDE fowlertrainer@anonym.hu Python 5 04-06-2005 05:56 AM
Building a GUI using NetBeans platform (not Netbeans IDE !) Pimousse Java 2 04-21-2004 07:22 AM



Advertisments