Permalink
Browse files

trying to make java home detection on linux better.

  • Loading branch information...
originell committed Jul 31, 2012
1 parent d3188ff commit f5431b3bc1f542e71ec6a2e465de00bd08728ac2
Showing with 9 additions and 2 deletions.
  1. +9 −2 setup.py
View
@@ -62,8 +62,15 @@ def setupMacOSX(self):
def setupLinux(self):
self.javaHome = os.getenv("JAVA_HOME")
if self.javaHome is None:
- self.javaHome = '/usr/lib/jvm/java-1.5.0-sun-1.5.0.08' # Ubuntu linux
- #self.javaHome = '/usr/java/jdk1.5.0_05'
+ possibleHomes = ['/usr/lib/jvm/default-java'
+ '/usr/lib/jvm/java-1.5.0-gcj-4.4',
+ '/usr/lib/jvm/jdk1.6.0_30',
+ '/usr/lib/jvm/java-1.5.0-sun-1.5.0.08',
+ '/usr/java/jdk1.5.0_05']
+ for home in possibleHomes:
+ if os.path.exists(home):
+ self.javaHome = home
+ break
self.jdkInclude = "linux"
self.libraries = ["dl"]
self.libraryDir = [self.javaHome + "/lib"]

0 comments on commit f5431b3

Please sign in to comment.