• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic