I am programing a software to edit some windows seven features with java...
Well the most important thing is that the program should not run on any operating system other then windows 7
So what is the code to see if the os is windows 7?
I am using this code
if(!System.getProperty("os.name").toLowerCase().equals("windows vista")||!System.getProperty("os.version").equals("6.1")){
JOptionPane.showMessageDialog(null, "Win7Plus only works on windows 7", "Win7Plus",JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}
Although it is working it still feels wrong!!!
i mean ---> System.getProperty("os.name").toLowerCase().equals("windows vista")
Am i doing this the write way or should i use another code????
Question
Teddy*
I am programing a software to edit some windows seven features with java...
Well the most important thing is that the program should not run on any operating system other then windows 7
So what is the code to see if the os is windows 7?
I am using this code
if(!System.getProperty("os.name").toLowerCase().equals("windows vista")||!System.getProperty("os.version").equals("6.1")){ JOptionPane.showMessageDialog(null, "Win7Plus only works on windows 7", "Win7Plus",JOptionPane.PLAIN_MESSAGE); System.exit(0); }Although it is working it still feels wrong!!!
i mean ---> System.getProperty("os.name").toLowerCase().equals("windows vista")
Am i doing this the write way or should i use another code????
Link to comment
Share on other sites
12 answers to this question
Recommended Posts