A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
Assertion syntax question regarding elipsis (...)
Leonardo Crespo
Ranch Hand
Joined: Jul 03, 2005
Posts: 31
posted
Aug 01, 2005 06:07:00
0
Hi, i could use some help on assertions
K&B book says that
java -ea: mypackage.mysubpackage MainClass
will enable assertions for all classes in mysubpackage and all classes in every subpackage bellow that.
J2SE5 DOC says that:
java -ea: mypackage.mysubpackage... MainClass
(note the 3 dots ... after mysubpackage). is the correct syntax for enabling assertions in mysubpackage classes and all classes bellow it.
Which one is the correct option? Both works for me...
Thank you very much.
Leonardo Crespo
Joyce Lee
Ranch Hand
Joined: Jul 11, 2003
Posts: 1392
posted
Aug 01, 2005 11:52:00
0
[B]K&B book says that
java -ea: mypackage.mysubpackage MainClass
will enable assertions for all classes in mysubpackage and all classes in every subpackage bellow that. [/B]
Are you referring to command-line examples listed in table 4-4 on page 263 of K&B book? On my book, it does include the 3 dots.
java -ea -da: com.geeksanonymous... (page 262) java -ea:com.foo... (table 4-4, page 263)
Have you checked out the
book's errata
?
Leonardo Crespo
Ranch Hand
Joined: Jul 03, 2005
Posts: 31
posted
Aug 02, 2005 06:41:00
0
That should be the case, thank you Joyce.
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Assertion syntax question regarding elipsis (...)
Similar Threads
Enabling Assertions
Question about assertions..
Enabling or disabling assertions
Assertions.
Assertion - what are system classes?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter