This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oh my, oh my...

 
Shannon Sims
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell me I can still submit my project which was written with jdk 1.4.2_04??? The document states:

You may develop your code using any implementation of the Java 2 platform, but the submission that you return must have been tested and shown to work under a production (not development) version of the Sun Microsystem's Java 2 platform and that platform must not have been superseded by a new production version for more than 18 months by the time you make your submission.


If I have to compile with the jdk1.5.0, please tell me where I can quickly learn the new API changes to make my application work.

Thank you.
 
Chulwoo Choi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You may develop your code using any implementation of the Java 2 platform, but the submission that you return must have been tested and shown to work under a production (not development) version of the Sun Microsystem's Java 2 platform and that platform must not have been superseded by a new production version for more than 18 months by the time you make your submission.


Summarizing the above:
(1) You can use any Java 2 to develop.
(2) Your code should be successfully compiled using Java 5.0.
(3) Then, the program should run correctly on Java 5.0.

In your case:
You don't have to worry about (1) as you used J2SDK 1.4.x which is Java 2.
For (2), download/install J2SDK 5.0 and see if your codes compile using J2SDK. There might be minor compilation errors (for example, if you used "enum", which is a keyword as of Java 5.0, as a variable name); then, fix them.
And then, for (3), run your application by executing:

It will work as it did on Java 1.4.x!!

So nothing to worry about...

Chulwoo
 
Chulwoo Choi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1) You can use any Java 2 to develop.
(2) Your code should be successfully compiled using Java 5.0.
(3) Then, the program should run correctly on Java 5.0.

Oh, (1) & (2) mean the same. So I think, in your case, you just need to worry about (3).

...
But why don't you just try (2) using Java 5.0? (Your codes will compile, I guess.) It's almost certain that codes successfully compiled using Java 5.0 will run correctly on Java 5.0.

Regards,
Chulwoo
 
Shannon Sims
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chulwoo,
Thanks for replying. When I tried to compile my code with jdk1.5.0_09, ten unchecked errors appeared. For example:

warning: unchecked conversion
found: java.util.List
required: java.util.Collection<?extends suncertify.server.ContractorRecord>
contractors.addAll( lstContractors);

warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Hashtable
lockedRecords.put(key, record);

So, if it doesn't compile, it surely won't run on Java 5.0, right?

Thanks.
 
Chulwoo Choi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a warning (recommending you to use Java 5 generics features) not an error so it will run.
Did you try running?

Chulwoo
 
Chulwoo Choi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To eliminate warnings, specify the allowed types for Collections/Maps. For example, change from

to


For a Map, for example, change from

to


Make one changes and see if you get less number of warnings. If so, continue to eliminate them all.

Chulwoo
 
Shannon Sims
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chulwoo,
Yes, it runs on Java 5 (jre1.5.0_09). Thank you so much for your help! I was getting really nervous!!!

Thanks again for your replies!!!
 
Chulwoo Choi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem

Chulwoo
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic