Home > Cannot Use > Cannot Use Classic Compiler As It Is Not Available

# Cannot Use Classic Compiler As It Is Not Available

As a point of order, if you leave both in the directory and try to do a build, the 1.4.1 version is used. Windows Note:When the modern compiler is used in unforked mode on Windows, it locks up the files present in the classpath of the task, and does not release them. Javac works fine from the (Debian Linux) command line. Realizing this work is unfunded :-), it would be nice if when some of the common files were updated as binary distributions, the supported projects would be re-zipped with the most have a peek here

Back to the top FAQs Search RecentTopics FlaggedTopics HotTopics Best Topics Register / Login Win a copy of Cybersecurity Lexicon or Cyber-Physical Attack Recovery Procedures: A Step-by-Step Preparation and Response Guide awt.toolkit : sun.awt.windows.WToolkit java.vm.info : mixed mode java.version : 1.4.1_02 java.ext.dirs : c:\j2sdk\jre\lib\ext sun.boot.class.path : c:\j2sdk\jre\lib\rt.jar;c:\j2sdk\jre\lib\i18n.jar;c:\j2sdk\jre\lib\sunrsasig n.jar;c:\j2sdk\jre\lib\jsse.jar;c:\j2sdk\jre\lib\jce.jar;c:\j2sdk\jre\lib\ch arsets.jar;c:\j2sdk\jre\classes java.vendor : Sun Microsystems Inc. Somehow javac (or at least tools.jar) is being loaded from the first JDK referenced on the system PATH. The side effect of this is that you will not be able to delete or move those files later on in the build.

Back to the top Eclipse Foundation About us Contact Us Donate Governance Logo and Artwork Board of Directors Legal Privacy Policy Cannot use classic compiler, as it is not available "Cannot use classic compiler, as it is not available" problem Cant compile Please help - "Cannot use classic compiler" Ant compile Recall:

The best solution in my opinion is to start Eclipse using the -vm arg to point to a specific JDK install. I reviewed my jar settings system wide and then made sure I was completely up to date with a better understanding of the classpath etc. Even though I defined JAVA_HOME-C:jdk1.3.1_09 and PATH C:jdk1.3.1_09in Can you help me ? I haven't seen this error before but since it says "class version error", it could mean that you're trying to run a jar file from one JRE version (say, 1.4.2) using

Does "jar tf /home/java/jdk1.2.2/lib/tools.jar" show sun.tools.javac.Main? Put the following right in front of your javac task: This will give you the CLASSPATH Ant has been invoked with. file.separator : \ java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi sun.io.unicode.encoding : UnicodeLittle sun.cpu.endian : little sun.cpu.isalist : pentium i486 i386 ant 1.4 attempt: Xindice Build System -------------------- Building with classpath c:\j2sdk\lib\tools.jar;.\java\lib\ant-1.4.1.jar;.\java\lib\examples.jar;.\ja va\lib\infozone-tools.jar;.\java\lib\openorb-1.2.0.jar;.\java\lib\openorb_to ols-1.2.0.jar;.\java\lib\xalan-2.0.1.jar;.\java\lib\xerces-1.4.3.jar;.\java\ lib\xindice.jar;.\java\lib\xml-apis-1.0.jar;.\java\lib\xmldb-sdk.jar;.\java\ Dennis Post Reply Bookmark Topic Watch Topic New Topic Similar Threads echo classpath in build Classic Compiler error while running ant.

Andy Bowes
SCJP, SCWCD
I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams Brad Baker Greenhorn Posts: 15 posted 13 years As a result however, Eclipse no longer started. Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: Ant, Maven Totaltime:1second ¤½¤Î¤È¤­¤ÏJAVA_HOME´Ä¶­ÊÑ¿ô¤¬JDK 1.3¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¾ì½ê¤ò»Ø¤¹¤è¤¦¤ËÀßÄê¤¹¤ëÉ¬Í×¤¬¤¢¤ê¤Þ¤¹¡£ [doc] [toc] [previous] [next] Copyright © 2000 2001 JBoss Organization Copyright © 2001 2002 ÆüËÜ¸ìÌõ: Neverbird Project

Is there somewhere that the mailing list archive can be searched? The ant script doesn't use $JAVA_HOME to decide which 'java' to use to launch ant, it uses$PATH instead. __________________________________________________ Do You Yahoo!? Alexey N. The first two Google links returned for a search Matthew Sinclair at Dec 21, 2000 at 12:51 am ⇧ I have a vague feeling that this is a stupid question, andfor

Tony, I would check to make certain that %JAVA_HOME%/bin/javac exists and that the PATH environmental variable is set in your context and includes %JAVA_HOME%/bin . Buildfile: /home/faith/treeDev/build.xml prepare: compile: /home/java/jakarta-ant/lib/ant.jar:/home/java/jakarta-ant/lib/jaxp.jar:/home/java/jakarta-ant/lib/parser.jar:/home/java/jdk1.2.2/lib/tools.jar [javac] Compiling 4 source files to /home/faith/treeDev/tomcat/webapps/tree/WEB-INF/classes BUILD FAILED /home/faith/treeDev/build.xml:118: Cannot use classic compiler, as it Joe Faith at Nov 30, 2000 at 4:05 pm ⇧ See iftools.jar is there and no typo occurred.The easiest way to ensure that Ant will pick up tools.jar is settingJAVA_HOME correctly and invoke Ant via its ant shell script BTW, noneed I configured my system as shown below and the problem was solved in the simple case with ant working as expected.

Basically, it's the install dir for thejdk, not for the jre (which is what many other programs expect when they seeJAVA_HOME)Matt-----Original Message-----From: Joe FaithSent: Thursday, November 30, 2000 9:11 AMTo: [email protected]: Easy fix is move that noise to the end of your path. ------------------------------------------------------------ ---------------- ----------- compile: [javac] Compiling 2045 source files to \workspace\apps\sandbox\build\class [javac] Modern compiler not found - looking for Post Reply Bookmark Topic Watch Topic New Topic Similar Threads Classic Compiler error while running ant. Messenger.

Post Reply Bookmark Topic Watch Topic New Topic programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: Ant, Maven Hope this helps. “„ Larry L (2) Offline Feb 6, 2004 @ 8:31 AM #5 Re: Modern compiler not found Your pointing to the issue of multiple JREs seems to be Oracle's installer uses Stone Age JDKs.

## Buildfile: build.xml init: idl: prepare: clean-jar: [delete] Deleting: C:\xindice\java\lib\xindice.jar [delete] Unable to delete file C:\xindice\java\lib\xindice.jar src: [echo] Compiling Source [javac] Modern compiler is not available - using classic compiler [javac] Compiling

The one in Sun's jdk118_v1 uses JAVA_HOME if it is set, and consequently fails if used from an "exec" in ant under jdk1.2. (I modified .java_wrapper to solve the problem.) Doug. Anyhoo, we have a couple solutions now. Anotherpossibility is that if you have set it, you've only set it as a shellvariable, rather than an actual environment variable (the difference between'set' and 'setenv'). So that's what I'd suggest you check.

Roland ([email protected]) “„ burnette (33) Offline Jan 28, 2004 @ 2:59 PM #2 Re: Modern compiler not found You need to add tools.jar to your ant classpath, see http://www.eclipse.org/eclipse/faq/eclipse-faq.html#users_16 . C:\poolman-2.0.3\build>echo %JAVA_HOME% C:\jdk1.3 Why is ant throwing up this message. The external Ant build works fine and building with Eclipse itself > works fine. Total time: 1 second C:\poolman-2.0.3\build> when I do this: C:\poolman-2.0.3\build>echo %JAVA_HOME% C:\jdk1.3 C:\poolman-2.0.3\build> Why is ant throwing up this message.

I suspect it would do that even if you > give Eclipse a JDK with the -vm switch -- have not tried that. > > I think the solution is to The workaround is to fork when invoking the compiler. See if tools.jar is there and no typo occurred. yes Please provide some more details: Value of %JAVA_HOME% c:\j2sdk Version of Ant, running on system 1.4.1 (does not seem to work for XINDICE) 1.5.3-1 (seems to work fine in a

Please provide some more details: Value of %JAVA_HOME% Version of Ant, Value of %ANT_HOME% if you are running Ant 1.5.1 or greater, the output from 'ant -diagnostics' would be useful as I also read a comment that putting tools.jar in the jre/lib/ext directory will work as well, but I haven't tried that technique as yet. Ifbuildfailsbecausesun.*classescouldnotbefound youwillneedtosettheJAVA_HOMEenvironmentvariable totheinstallationdirectoryofjava. Xindice Build System -------------------- Building with classpath c:\j2sdk\lib\tools.jar;.\java\lib\ant.jar;.\java\lib\examples.jar;.\java\lib \infozone-tools.jar;.\java\lib\openorb-1.2.0.jar;.\java\lib\openorb_tools-1. 2.0.jar;.\java\lib\xalan-2.0.1.jar;.\java\lib\xerces-1.4.3.jar;.\java\lib\xi ndice.jar;.\java\lib\xml-apis-1.0.jar;.\java\lib\xmldb-sdk.jar;.\java\lib\xm ldb-xupdate.jar;.\java\lib\xmldb.jar Starting Ant...

I have the 1.4.2 SDK installed on my system but I also have the 1.3.1 JRE installed (I needed it for a visualization tool I was evaluating). Thanks a bunch. [email protected] Matthew Sinclair at Dec 21, 2000 at 10:08 pm ⇧ Stefan,Ok one reason of this problem could be thattools.jar is missing in the classpath ...Almost as soon as I sent Are you sure that when you installed Oracle, your JAVA_HOME setting was not changed?

is set up correctly.The following is the task that is giving me errors now:Thanks in advance for any helpMike Stanley reply Tweet Search Discussions Search All Groups user 1 response I am very familiar with Ant and I have no idea what is going onhere.Has anyone come across this problem ? Buildfile:build.xml init: ASimpleHelloObject: [echo]WroteASimpleHelloObject.java compile: [javac]Moderncompilerisnotavailable-usingclassiccompiler [javac]Compiling1sourcefiletoD:\temp BUILDFAILED D:\temp\build.xml:22:Cannotuseclassiccompiler,asitisnotavailableAcomm onsolutionistosettheenvironmentvariableJAVA_HOMEtoyourjdkdirectory. http://im.yahoo.com Adam Murdoch at Dec 1, 2000 at 1:54 am ⇧ Hi,A mismatched JVM and tools.jar can cause the problem you're seeing.Check that your PATH is set up so that you're