File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Uncertainty about version.txt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Uncertainty about version.txt" Watch "Uncertainty about version.txt" New topic
Author

Uncertainty about version.txt

Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 163
Question 1
=======

When I do a java -version in dos screen I get:

java version "1.6.0_12"

Then Java(TM) SE Runtime Environment (build 1.6.0_12-b04)

I think in version.txt I should put - java version "1.6.0_12" but wanna make sure

Question 2
=======

I downloaded this version of java from sun website today. Is there a way to find out if this is a production version?

Question 3
=======

When I compile the programs in Dos is there anyway I can check which version of java they have been compiled with?

My system evironment variables path and CLASSPATH both point to C:\Program Files\Java\jdk1.6.0_12\bin


Help on any of these question greatly appreciated.

Thanks Kevin.



Java5 Tutorials | Java6 Tutorials | HTML/CSS Tutorials | JavaScript and jQuery Tutorials
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
Kevin Florish wrote:Question 1
=======

When I do a java -version in dos screen I get:

java version "1.6.0_12"

Then Java(TM) SE Runtime Environment (build 1.6.0_12-b04)

I think in version.txt I should put - java version "1.6.0_12" but wanna make sure


In my opinion, this is enough. All the information on the version is included in "1.6.0_12".
b04 is the internal build number.. Think of it as if you would package the application for a User. You simply need to tell them which version to get from the Web, the internal build number wouldn't be of value.. I don't know much about that b04, I'm guessing it is the working build that SUN published for that specific update... The other one not being published ? Anyone other rancher could confirm or explain this ?

Kevin Florish wrote:
Question 2
=======

I downloaded this version of java from sun website today. Is there a way to find out if this is a production version?



I personally always check this website: SUN products - download page
My understanding is that if it's there, it is not recommanded production version (see the paragraph at the top). I also always get my versions on this site, because they are all one click away ;)

Kevin Florish wrote:
Question 3
=======

When I compile the programs in Dos is there anyway I can check which version of java they have been compiled with?
My system evironment variables path and CLASSPATH both point to C:\Program Files\Java\jdk1.6.0_12\bin

Help on any of these question greatly appreciated.

Thanks Kevin.


Basically, the major and minor number will tell you that. You probablly have already seen that when you try to run a class with an older jdk..

Beyond that, I googled it ;)
Someone wrote a little java program that's reads the couple first bytes and gives you the major/minor of that class..
Getting Major/Minor of a class

I'm not aware if any options on the java command could give you the same information..

Regards,
Alex
Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 163
Found the information you provided most helpful.

Thanks Alex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uncertainty about version.txt
 
Similar Threads
Automatic Failure.
Jave 6
some inquiries about SCJD exam
What to put in version.txt?
No Display when running the jar