954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Compatibility problems

Greetings:
I`m starting in Java and i`m having problems with compatibility between versions, in school they have an older version(I believe its 1.4.0 but i`m not completely sure) than the one i have at home(1.5.0_04), so almost every time i try to open a applet/application at school i get errors, so i have to change some parts of code, i was wondering, is there a way to convert from newer versions to older version?, or any thoughts on how to ensure compatibility?.
for example:
At home i can use:

frame.add(X)

At school i must use:

frame.getContentPane().add(X)

At school i can`t use:

JFrame.setDefaultLookAndFeelDecorated(true);
ROGENATOR
Newbie Poster
17 posts since Sep 2005
Reputation Points: 11
Solved Threads: 0
 

add the compiler flags "-source 1.4 -target 1.4" (without the quotes) when compiling and your 1.5 compiler will behave like it was a 1.4 compiler and spit out classfiles for 1.4 runtimes.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Greetings:
Thanks jwenting, it worked like a charm

ROGENATOR
Newbie Poster
17 posts since Sep 2005
Reputation Points: 11
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You