473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

JDK1.5 Question

Picked up a book that instructs beginners to use

javac -source 1.5 <filename>.java to compile source code.

I've observed that (with 1.5 the only installed SDK)

javac <filename>.java

appears to work equally well.

Is the switch needed to get the new features in the production version, or
is the instruction to use -source 1.5 something left over from the beta?

I'd think that the default would be to allow all version features?

TIA for any clarification.
Jul 17 '05 #1
1 3864
Peter van der Goes wrote:
javac -source 1.5 <filename>.java to compile source code.

I've observed that (with 1.5 the only installed SDK)

javac <filename>.java

appears to work equally well.

I've observed the same behavior. Typically you only use the -source
option if your code contains something that works fine in earlier
releases but is broken in the current release. For example I have some
old code with Enumerations where the variables are named "enum". If I
try to compile that under 1.5/5.0 it will complain about "enum" being a
keyword. But if I use the -source 1.4 option it will compile just fine.

Hope this helps.

Eric
http://ericasberry.com
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary Johnson | last post by:
Hi All Having looked at the Java Docs (JDK 1.3) in java.awt.print.*, I can't see if it is possible to (a) get a list of available Windows printer queues and (b) select the printer queue when...
0
by: Nermin Brgulja | last post by:
Hi, I am using jdk1.4 Logger with a FileHandler for logging in a web application, and have two questions regarding logging: The first question is: I've created an Logger and mapped it to an...
0
by: Nicholas Pappas | last post by:
Hello all. I am having some trouble getting JDK1.5 working under Gentoo Linux, and am hoping someone might know a few tricks. I previously had some problems getting the .BIN to work at all,...
0
by: s | last post by:
Hi, I am a new user to j2sdkee1.2.1 After installing this I couldn't run this command "j2ee -verbose" it shows following error: C:\>j2ee -verbose Fatal Error: This J2EE SDK release runs only...
1
by: rameshkumarc | last post by:
can anyone plz tell abt the difference between jdk1.5 and jdk1.6..what are all improvement made in jdk1.6
5
by: chindanoor | last post by:
As i used split method in my local Machine(jdk1.4) it was working fine.., When i try to use in the server(which is jdk1.3 version) unable to support it.., As i m able to do it with StringTokenizer...
1
by: pushpa13 | last post by:
Internationalization in java can enable a user to create application which can have the interfaces available in all the languagues. In earlier version of jdk1.4.1 and jdk1.4.2 that was done by...
2
by: blue2007i | last post by:
hi, every 1 i am a student.pls help me.i have jdk1.6.0_02 and also Bluej 2.2.0 i am able to wtite program in bluej and also compile and get desired output but i cant write program in DOS. when i give...
1
by: jitenid | last post by:
What is the difference between jdk1.5 & jdk1.6 in relate to Applet
1
by: priyankar | last post by:
Could anyone tell me the difference between jdk1.5 and 1.6? Plz give the difference pointwise and in confine manner.... Thank you... regards, Priyanka
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.