- This topic has 17 replies, 8 voices, and was last updated 15 years, 5 months ago by Loyal Water.
-
AuthorPosts
-
deepakgupta_72MemberHi,
I am using MyEclipse Enterprise Workbench
Version: 5.5.1 GA
Build id: 20070521-5.5.1-GA
JDK 6when i am trying to run the build.xml through MyEclipse ide its giving me error
Error starting modern compiler
for the target
<target name=”sourcecompile” depends=”prepare”>
<javac srcdir=”${src.dir}” destdir=”${classes.dir}” debug=”on” source=”1.6″>
<classpath refid=”classpath”/>
</javac>
</target>But if I run the same ant file through command promt it works fine. Is there any thing i am missing. I have already set environmental variables like
JAVA_HOME
CLASSPATH
PATH
ANT_HOMEThanks in advance
Deepak
Loyal WaterMemberHi Deepak,
Can you use JDK 1.5 instead of JDK 6 and try running your file ? MyEclipse is not certified to run with JDK 6 yet.
deepakgupta_72MemberThanks Nipun,
But my colleague who has MyEclipse 5.1 runs the same build with jdk1.6 he doesn’t get any error. Can you think of any settings that i might be missing in my MyEclipse i have used the all in one installer for installation.
Loyal WaterMemberMyEclipse is not certified with JDK 6 yet. There are times when JDK 6 gives problems with certain MyEclipse configurations. Ill take this issue to my dev team and get back to you with an update.
Riyad KallaMemberDeepak,
If you go to the Run Tools drop down menu in the tool bar (right next to the run menu) and click the down arrow and go to “Open External Tools Dialog” then find your Ant script, check the “JRE” tab and make sure you have the right JRE set to run the Ant script with. It’s possible it could be pickig up an older JDK that doesn’t know how to generate “1.6” class files.
deepakgupta_72MemberHi Riyad,
Thanks but iJRE option is “Run in the same JRE as workspace” and i have set my workspace JRE to 1.6 i do not even have any other JRE installed on my system. I have tried the anthoer option also “Separate JRE” but console bar just shows terminated thats it. Nipun as you said you will pass on this to your developer team thanks and if you need any information about my eclipse settings or my ant build just let me know I will post it.
One more thing popped in my head my autobuild functionality and hot deployment is working fine so what i feel myeclipse is able to compile the code using 1.6 as its my project and workspace default compiler but its seems to have some issue with running that target of my ant build. If this helps you in helping me.thanks
Deepak
deepakgupta_72MemberHi,
I have installed the latest MyEclipse 6.1 now also i am getting the same problem. MyEclipse 6.1 is certified for Java 6 then why i am getting this problem. By looking at the error can anybody from your development team tell that at what point of time or due to which wrong configuration MyEclipse can through this error.
copying my problem again
Hi,I am using MyEclipse Enterprise Workbench
Version: 6.0.1 GA
Build id: 6.0.1-GA-200710
JDK 6when i am trying to run the build.xml through MyEclipse ide its giving me error
Error starting modern compiler
for the target
<target name=”sourcecompile” depends=”prepare”>
<javac srcdir=”${src.dir}” destdir=”${classes.dir}” debug=”on” source=”1.6″>
<classpath refid=”classpath”/>
</javac>
</target>But if I run the same ant file through command prompt it works fine, even my hot deployment also works fine. Is there any thing i am missing. I have already set environmental variables like
JAVA_HOME
CLASSPATH
PATH
ANT_HOMEThanks
Deepak
Riyad KallaMemberDeepak,
I really don’t know what is going on here. The Ant runtime is provided by the Eclipse platform, we don’t instrument it in any way, as long as you have a Java 1.6 runtime registered under Window > Prefs > Java > Installed JRE, the Ant runner should be able to provide that to the Ant build file when it’s run.This isn’t some issue with MyEclipse, but rather a configuration issue on your end if you cannot get it running.
But you mentioned that *all* you have installed is JRE 6, which makes the problem very strange and unfortunately I have no other suggestions besides possibly double-checking your settings and seeing why it won’t run.
When I setup the exact same Ant build script on my end with a 1.6 source version, it compiles fine.
deepakgupta_72MemberHi Riyad,
Thanks for the reply, I my self understands that it should be some configuration issue. As in our office we have multiple MyEclipse Licenses and installed version and as i have mentioned in my previous post it is working fine with some people and not with other. My main question/concern is can you think of any configuration that i might have missed out or is wrong.
Thanks and Regards,
Deepak
Riyad KallaMemberDeepak,
Just what I mentioned above… you could try out a new workspace and see if suddenly it started working, and then try and back out which changes/differences there are.Also double check the JREs I mentioned above as well and which ones Eclipse is aware of, and then make sure that the Ant runtime is setup to launch with that JRE, and not a different one (like the default 1.5 one we ship with our All in One installer)
Now that I think about it… that’s probably the problem. You may need to go to Window > prefs > Java > Installed JREs, and hit Add, and add your 1.6 JRE manually. Then with your Ant configuration under JRE, be sure to select it… otherwise the default JRE (for the MyEclipse All in One install, that’s the 1.5 JRE we ship) will be chosen and your source=”1.6″ will fail with that.
Ton HuismanMemberTo compile java sources from an Eclipse (or MyEclipse for that matter) you need the tools.jar from a complete install of a JDK, a ‘mere’ JRE isn’t enough. This implies that just installing ME with the fullstack installer needs an additional JDK install to compile your Java sources. Install the JDK (just download it from Sun) and select it in the properties dialogs, like RKalla suggested earlier. Be sure to add the JDK to the list, as it doesn’t automatically find available JDK’s.
HTH
Ton
Riyad KallaMemberTon is correct with respect to running the Ant <javac> task… just to clarify, compiling inside the IDE doesn’t require a JDK, but he’s exactly right if you are using Ant.
Ton thanks for the correction, it slipped my mind.
sujay11183MemberIn the External tools dialog -> go to the JRE tab and in there select radio button Execution Environment and select the jdk version and this would rectify the problem… Atleast it worked for me !!
Nathan RevoMemberWith MyEclipse 7.1 If I have my workspace JDK set to a 1.5 jdk and I tell ANT to run in the same JRE as the workspace I get the error:
Error starting modern compiler
support-shaliniMemberrevoman,
Can you copy paste your installation details? You can get them from MyEclipse > Installation Summary > Installation Details.
Also, copy paste your pulse handshake id? You can get that from ~\Genuitec\Common\configuration\pulse2.properties. Look for pulse.handshake.id in that file. -
AuthorPosts