File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question about assertions.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Question about assertions.." Watch "Question about assertions.." New topic
Author

Question about assertions..

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
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?


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Have you had a look at the Java application launcher tool docs?
Maybe there is some interesting info there


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
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 ]
Brian Joseph
Ranch Hand

Joined: May 16, 2003
Posts: 160
Should I memorize the different assertion options? The only one my book covers is -ea (-enableassertions).
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about assertions..