• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

what is ":" in enabling assertion

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

I dont understand what is ":" in the statement while we enable or disable assertion at runtime.
<code>
java -ea examples.cert1 -da:examples.cert.MyProg1
</code>

In this MyProg1 is class of examples.cert package. I wanted to enable assertion in general for the package examples.cert1 but disable for examples.cert.MyProg1 class. I use Windows XP and "colon" makes my java statement errorneous, if separated by space, no error but no effect of disabling or enabling. while giving no space between -da:<classname> makes it errorful, saying something /// not found.

Please help me to understand this, isnt't something I miss the Unix syntax.

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

<code>
java -ea examples.cert1 -da:examples.cert.MyProg1
</code>



You are enabling assertions in examples.cert1 package but disabling them in examples.cert.MyProg1 class. But... what java program are you running?

I would expect to see something like this:

java -ea examples.cert1 -da:examples.cert.MyProg1 MyJavaProgramName
 
He does not suffer fools gladly. But this tiny ad does:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic