• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

command line arguments...

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am having trouble in passing < symbol as a command line argument. I have to pass file name after that < symbol from which my program will take the input.
but when i pass this and print all the command line paramters in the main function it does not print < than sign and any argument that is written after that.....

But when i pass the arguments using netbeans IDE by setting the project properties it works perfectly.

here is the command i am using to run the program....

java EightPuzzle -s BreadthFirst < file_that_takes_14_moves_to_solve

the file name "file_that_takes_14_moves_to_solve" and < than symbol is not printed when i pass it through command line.... but it does when i pass it through netbeans by setting the project properties......

any help will be highly appreciated.

Regards
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The < symbol is a redirecting command. You may have to quote it using double-quotations around it. Try java EightPuzzle -s BreadthFirst "<" file_that_takes_14_moves_to_solve
 
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic