• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

How to set compliance level to 1.3

Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

I using some default package scheme in my project. when I compile using eclipse everything is working fine by setting compliance level to 1.3.
(Project Properties--> Java Compiler ---> Compliance and Classfiles)

Now when I am doing this using ANT build file it's not working.

<javac nowarn="true" debug="off" srcdir="${midlet.src}" includes="**/*.java" destdir="${midlet.classes}" source="1.3" >

<pathelement location="${cldc_lib}"/>
<pathelement location="${midp10_lib}"/>

where to set compliance level in javac task. I tried compiler="javac1.3" It dose'nt work. I tried using "org.eclipse.jdt.core.JDTCompilerAdapter" but I am not aware what exactly it does and why we need that...anyway that is again not working....all these give me error on default package import ...which is not possible in java 1.4 that's the reason I want to set compliance level 1.3

Pleae Help me

I am using
Ant 1.6.4
J2sdk 1.4.2_06
Eclipse 3.0.2
Saloon Keeper
Posts: 27919
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't actually care if you're using the 1.3 JDK's compiler, just use the 'source="1.3"' attribute of the javac command. If you need the actual 1.3 compile and not backwards compatibility under the 1.4 or 1.5 compilers, you'll have to tell Ant where your compiler lives.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic