Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 21-07-2011, 05:31 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Jan 2007
Posts: 8
Unhappy How to run java old version program in newer version 1.6


hello frds....i wanted to help in java newer version 1.6 software....i was using version 1.4 and my project and my other java program working fine....now i upgraded to newer version....now all the files are not compiling and running in the newer version....can any body help me on this problem...that how can i run my old version java program in newer one.


Thanks in Advance
kshitizsingh is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 22-07-2011, 02:46 PM   #2 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: How to run java old version program in newer version 1.6

It would be great if you can provide more specific error like, what is the error you are getting while running / compiling the program, etc.

I am assuming you want to compile your .java files compatible to older versions. You can use "-source" switch of javac for that.

Code:
javac -source 1.4 MyProgam.java
Above line will treat MyProgram.java as Java 1.4 compatible source and will produce binary which is compatible with JRE 1.4

I hope this helps.
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 26-07-2011, 08:02 PM   #3 (permalink)
Right Off the Assembly Line
 
Join Date: Jan 2007
Posts: 8
Red face Re: How to run java old version program in newer version 1.6

Hi ....I attached the file in which I pasted the errors,when i trying to run my files in newer version of java 1.6. These files was running successfully in java version 1.4.
Attached Images
File Type: jpg compile error.JPG (31.7 KB, 2 views)
File Type: jpg rum time error.jpg (107.7 KB, 2 views)
kshitizsingh is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2