• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

assert keydword usage.  RSS feed

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
O tried to use the new assert keyword but my code doesn't even compile.
I try a simpler code and still dont compile, could you tell me what's wrong here ?
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes..
you are correct. i also get the same error. i tried jdk1.4.0_03 and jdk1.4.1_01 both. none of them works.
regards
maulin
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try
javac -source 1.4 X.java
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and after it compiles run it with java -ea ( or -enableassertions)
[ December 23, 2002: Message edited by: Barry Gaunt ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might like to take a look at The September Newsletter.
 
Zkr Ryz
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok , now I got it.
I don't know, this seems kind of odd to me , what is the reason of this -source flag when already have a -target flag ??
Anyway I've never use them before, and now I guess I should start

Thank you all for your answers.
Regards Zkr Ryz.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks all.
i will try it when i get back to work
Mary X'Mas.
regards
maulin
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the reason of this -source flag when already have a -target flag ??
Take a look at The javac Documentation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!