Skip to content

Commit

Permalink
Remove check for old versions of JDK. Not all JDKs report version in …
Browse files Browse the repository at this point in the history
…a compatible format
  • Loading branch information
bphinz committed Dec 24, 2024
1 parent 6d5026f commit 534de4a
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions java/com/tigervnc/vncviewer/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,11 @@ public static String getHomeDir() {
String os = System.getProperty("os.name");
try {
if (os.startsWith("Windows")) {
// JRE prior to 1.5 cannot reliably determine USERPROFILE
// return user.home and hope it's right...
if (Integer.parseInt(System.getProperty("java.version").split("\\.")[1]) < 5) {
try {
homeDir = System.getProperty("user.home");
} catch(java.security.AccessControlException e) {
vlog.error("Cannot access user.home system property:"+e.getMessage());
}
} else {
homeDir = System.getenv("USERPROFILE");
}
homeDir = System.getenv("USERPROFILE");
} else {
try {
homeDir = FileSystemView.getFileSystemView().
getDefaultDirectory().getCanonicalPath();
homeDir = FileSystemView.getFileSystemView().
getDefaultDirectory().getCanonicalPath();
} catch(java.security.AccessControlException e) {
vlog.error("Cannot access system property:"+e.getMessage());
}
Expand Down

0 comments on commit 534de4a

Please sign in to comment.