• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How To Get OS Version

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing an app that uses some commands such as CMD.EXE and COMMAND.COM to do the same tasks. So I need to know which OS version the App is running on to determine which one I need to use. Is there a way to do this?
------------------
Happy Coding,
Gregg Bolinger
 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only thing I can think of right now is to parse the output of the DOS ver command.
Junilu
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that not a similar command such as DIR which I would then need the correct CMD or COMMAND to execute it?
I guess I could try both and find out which one works and use it. Thought maybe there was a more programmable way to do it.
------------------
Happy Coding,
Gregg Bolinger
 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what I was thinking earlier...
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, you kick butt. Thanks a lot!!
Another question. In the API anywhere does it tell what Strings are allowed in the getProperty() method?

------------------
Happy Coding,
Gregg Bolinger
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once again, you kick serious tail. Thanks so much!!

------------------
Happy Coding,
Gregg Bolinger
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic