ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How can you compile a java program in all the previous versions of java using a single version?

user-image
تم إضافة السؤال من قبل himanshu mittal
تاريخ النشر: 2013/06/26

it depends on the JVM version, for example: a1.4 JVM won't run a .java file compiled by a1.6 compiler unless you use compilation flags as follows: in you console you can try this % javac -target1.4 -bootclasspath jdk1.4.2/lib/classes.zip \ -extdirs "" OldCode.java -target : tells the used compiler to generate code that will run on an older JVM.
-bootclasspath : compile your code against the APIs of the older version of Java.
for more information of using 'javac' command, see it's documentation on http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javac.html

Amitesh Rai
من قبل Amitesh Rai , SOFTWARE DEVELOPER , techzone technology pvt ltd

javac -source jdk_version programName.java

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟