• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

converting 1.4 code to 1.5

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a program written in 1.4 in Eclipse. Is there an easy way, without recoding, to convert it to 1.5?

Thanks!
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apps written in 1.4 will work out the box in 1.5.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
..unless you want to use the specific features in 1.5
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
enum is a new reserved word in 1.5

so if you are very unlucky and your 1.4 code uses this you may need to adjust it.
 
Dave Kairys
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to use some of the features of 1.5. For instance, in 1.4 (appropriate declarations made)
for (int x = 1; x < 9; x++){
if (x < 6){//places text 'Garden # + Low' in textarea
TextArea[x].setText("Garden " + x + "Low");
}//closes if
else{//places text 'Garden # + High' in textarea
TextArea[x].setText("Garden " + x + "High");
TextArea[x].setBackground(lightGreen);//sets color
TextArea[x].setEditable(false);//disallows any editing
pane.add(TextArea[x]);//adds to control
}//closes else
}//closes for loop
will populate a textarea array no problem. However, in 1.5, the program will not even run.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

However, in 1.5, the program will not even run.


What exactly do you mean by that? Do you get an error message? If so, what is the error message?

You should be able to run programs written and compiled with Java 1.4 on Java 5.0 without modifications, and you should be able to compile Java 1.4 code on the Java 5.0 compiler without modifications.

The problem probably doesn't' have anything to do with the version difference. So, tell us exactly what goes wrong and we can help you with it.
 
Dave Kairys
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't even get any error messages. That is what is strange about it. I can comment the above block of code out and the program will execute no problem(the GUI still shows up). However, when that block is removed from commenting, the GUI doesn't show up at all. I haven't encountered anything like that ever.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic