• Post Reply Bookmark Topic Watch Topic
  • New Topic

works in eclipse but not command line?  RSS feed

 
shawn moore
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




In eclipse this prints: Number of args: 0

Using command line - java Main nothing happens...

The path is set for the project, I've already used cd to execute at the bin folder...

Thanks!
 
Stephan van Hulst
Saloon Keeper
Posts: 7969
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shawn, welcome to CodeRanch.

Where did you save your source file, what exactly have done to compile it and what have you done to run the class?
 
shawn moore
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan,

Thank you for the quick response, I found the error. I carried the same file name across 2 projects which caused the program to successfully run in eclipse, but run a different Main program (which didn't use .println) in the command line...

Now that I've tracked down the true source location in both eclipse and the command line it runs as planned.

take care,
Shawn
 
rossco giordano
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
way to hone in on that err, sounds wicked.

I'm with the crowd that believes it's okay to err in Eclipse, so long as you're learning how to make the most of an industry tool.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!