Issue while using 'javac' with different versions of java

I am facing an issue while compiling a java code

The code was earlier compiling with a lower version of jdk i.e. 1.4.1.02 but now when I am compiling the same code with any higher versions, like 1.4.2, it is throwing an error.

-

bash-2.03$ /export/home/jdk/1.4.1_02/bin/javac -d /export/home/classes classpath .:/export/home/jar/util.jar:/export/home/jar/util_sdk.jar:/export/home/thirdparty/xerces-j/2.6.2/xercesImpl.jar:/export/home/thirdparty/rsa-bsafe/crypto-j/3.5.2/cryptoc/jsafe.jar:/export/home/thirdparty/javamail/1.3.1/mail.jar:/export/home/thirdparty/rsa-bsafe/cert-j/2.1.2/certj/certjWithNative.jar

The java compilation throws no error.

-

But when we use a higher version of java, like 1.4.2.03

bash-2.03$ /export/home/jdk/1.4.2.03/bin/javac -d /export/home/classes classpath .:/export/home/jar/util.jar:/export/home/jar/util_sdk.jar:/export/home/thirdparty/xerces-j/2.6.2/xercesImpl.jar:/export/home/thirdparty/rsa-bsafe/crypto-j/3.5.2/cryptoc/jsafe.jar:/export/home/thirdparty/javamail/1.3.1/mail.jar:/export/home/thirdparty/rsa-bsafe/cert-j/2.1.2/certj/certjWithNative.jar

We get an error 劵

javac: no source files

Usage: javac <options> <source files>

where possible options include:

-gGenerate all debugging info

-g:noneGenerate no debugging info

-g:{lines,vars,source}Generate only some debugging info

-nowarnGenerate no warnings

-verboseOutput messages about what the compiler is doing

-deprecation Output source locations where deprecated APIs are used

-classpath <path> Specify where to find user class files

-sourcepath <path>Specify where to find input source files

-bootclasspath <path>Override location of bootstrap class files

-extdirs <dirs>Override location of installed extensions

-d <directory>Specify where to place generated class files

-encoding <encoding>Specify character encoding used by source files

-source <release> Provide source compatibility with specified release

-target <release> Generate class files for specific VM version

-help Print a synopsis of standard options

bash-2.03$

XXX-

[2280 byte] By [Enhancing_minda] at [2007-11-26 13:35:37]
# 1

Hi,

If I'm not mistaken the source files (*.java files) are missing in both executions you have mentioned. The error you get in the second time is not because of a jdk version problem but missing source files passed to the javac command. As you can see, the error it throws is 'javac: no source files'. So make sure you properly execute the javac command with correct parameters (destination, classpath and source files).

Btw, you are posting your problmes in a wrong forum. This particular forum is dedicated to JMX. So please make sure you use the proper forum to post your problems. The chance of getting a reply by posting on a this type of specific forum is very low.

Cheers!

Jini

Jinia at 2007-7-7 22:19:14 > top of Java-index,Core,Monitoring & Management...