sounds like you are using the wrong compile command line, how are you compiling?
Main Topics
Browse All TopicsI am trying to compile my code with JDK 1.4.2. It used to work with 1.4.2, but now it doesn't seem to work anymore. What do I need to do to find out where ther error is? It doesn't give much of a help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I am using Eclipse. Here is the Ant call. THe compiler is set to 1.4.2 and seems to be the one running also.
<target name="build" depends="init,set_build_cl
<javac classpathref="client.build
fork="yes"
memorymaximumsize="120m"
destdir="${build.dir}/clas
debug="on"
source="${client.java.lang
srcdir="${src.dir}"
deprecation="true"/>
</target>
I probably found the base error, that is I use pregenerated libraries that are based on what is in the JAVA_HOME (and that was 1.5). However, now when I compile, it just referes to the compile task:
F:\DevelopmentView\build\i
The error message from the log doesn't help that much either:
org.eclipse.core.runtime.C
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.jdt.internal.c
at org.eclipse.core.internal.
at org.eclipse.core.runtime.S
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.core.runtime.S
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.core.internal.
at org.eclipse.debug.internal
at org.eclipse.debug.internal
at org.eclipse.debug.internal
at org.eclipse.debug.internal
at org.eclipse.core.internal.
Caused by: java.io.FileNotFoundExcept
at java.io.FileInputStream.op
at java.io.FileInputStream.<in
at org.eclipse.core.internal.
... 29 more
Another weird thing (in Eclipse) is that imports that some files complain about that it cannot resolve other classes or interfaces to a type (even though they are in the very same package). The classes they complain about has worked for a long time. I even stripped those classes down to virtually nothing, and it still complained about them. This is not during compilation, but it signals by underlining with red.
objects:
I used to work with som e1.5 stuff not related to what I am doing now. Then I changed back in Eclipse, but forgot to change back in the WIndows system environment. This is a problem since I use jar-files that are fetched and built depending on java version. Later on the libraries are the base for the path creatin - the project files are created. When I changed the Java in the environment and rerun the dependncy creation sript, I got rid of that problem.
ksivananth:
I have had that problem before also, and also have some tricks to get rid of it. However, it keeps getting more and more stubborn. It comes back faster and faster and restarts and other tricks tend not to help.
-source flag is not part of the environment. It's part of the compiler command line.
You're supplying the 1.4 compiler with a flag telling it to compile 1.5 sources. It won't allow that because it knows nothing of them.
If you're compiling using ANT or Maven (or some other build tool) change its project file.
If you're compiling by calling the compiler from the commandline directly, remove the -target 1.5 flag.
Business Accounts
Answer for Membership
by: ksivananthPosted on 2009-01-29 at 01:28:56ID: 23495484
how are you compiling it?
if in eclispse, look at the problems tab!