• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about assertions..

 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is
java -ea -dsa
the same as
java -ea
?
the KnB book says the java -ea enables assertions in all classes, except for the system classes, so my impression is that the first one is doing the same...
any ideas?
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you had a look at the Java application launcher tool docs?
Maybe there is some interesting info there
 
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andres
Yes
java -ea -dsa
the same as
java -ea

and its also equal to java -ea -dsa and java -ea <filename> and java -ea -esa -dsa and java -ea -esa -dsa -esa -dsa etc.
[ June 26, 2003: Message edited by: Anupam Sinha ]
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Should I memorize the different assertion options? The only one my book covers is -ea (-enableassertions).
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Brian did I confuse you. Well I only wanted to pointed out the order of evaluation of the assertions command line arguments, it's left to right so if you say java -enableassertions -disableassertions <filename> then assertions would be disabled. As for the various assertions command line options they are :
-ea or -enableassertions
-da or disableassertions
-esa or enablesystemassertions
dsa or disablesystemassertions
Try this javaranch
thread and this tutorial at sun's site.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic