• 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

running command line for Assertion not working

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
in command line l have tried to run below expression

java -ea tr.com.AssertionTest (this runs very well)

but after then l have tried below expression

java -ea -da:tr.com.AssertionTest (but now this couldnt be run)

l got something like that which is below





as results l couldnt run below expression

java -ea -da:tr.com.AssertionTest

please help.

thanks...



 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the first example (green) you have options (-ea) followed by a class name, whereas the second example (blue) only has options (-ea and -da) and no class name. Since the class name is required (what class are you trying to compile?) your second example fails.
 
salih ayan
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
l already wrote class name.which is AssertionTest

Should l add something more after the class name

Thanks for help
 
salih ayan
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
l tried also below expressions in command line

1- java -ea -da:tr.com.AssertionTest.java
2- java -ea -da:tr.com.AssertionTest.class
3- java -ea -da:tr/com/AssertionTest.java
4- java -ea -da:tr/com/AssertionTest.class
5- java -ea -da:tr/com/AssertionTest


non of them were working
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

salih ayan wrote: l already wrote class name.which is AssertionTest



Yes, you did, you wrote a class name as part of the -da option. Don't confuse that with the name of the class you want to run, which you still need to state.

Should l add something more after the class name



Yes; more precisely you should add something after the -da option, which contains a class name. Note that the class name you provide to the -da option isn't necessarily the name of the class you want to run.
 
salih ayan
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi it is very strange.
as l read in K&B book about compiling assertion code.

forinstance just below expression definetely is not working in command line.But K&B book says that below expression is working but not

java -ea -da:tr.com.Test

instead upper expression if l write something below is working


java -ea -da tr.com.Test

Okey anyway that expression is not working l meant "java -ea -da:tr.com.Test". l found the way how that expression can be worked by myself


But K&B book also says that just below expression must work

java -ea:com.foo..

But just upper expression also is not working

What can we do this expression whic is in quotes "java -ea:com.foo.." to work



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

Paul Clapham wrote:In the first example (green) you have options (-ea) followed by a class name, whereas the second example (blue) only has options (-ea and -da) and no class name. Since the class name is required (what class are you trying to compile?) your second example fails.



Hi
l already expressed class nama in blue example which is the "AssertionTest"
 
A teeny tiny vulgar attempt to get you to buy our stuff
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic