• Post Reply Bookmark Topic Watch Topic
  • New Topic

converting 1.4 code to 1.5  RSS feed

 
Dave Kairys
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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!
 
Michael Lloyd Lee
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apps written in 1.4 will work out the box in 1.5.
 
Sunny Kumar
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
..unless you want to use the specific features in 1.5
 
Ros Bain
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!