Browse Source

[java] handle absolute paths with -java-lib

Caue Waneck 11 years ago
parent
commit
059383345f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      genjava.ml

+ 3 - 1
genjava.ml

@@ -2983,7 +2983,9 @@ let get_classes_zip zip =
   !ret
   !ret
 
 
 let add_java_lib com file std =
 let add_java_lib com file std =
-  let file = try Common.find_file com file with
+  let file = if Sys.file_exists file then
+		file
+	else try Common.find_file com file with
     | Not_found -> try Common.find_file com (file ^ ".jar") with
     | Not_found -> try Common.find_file com (file ^ ".jar") with
     | Not_found ->
     | Not_found ->
       failwith ("Java lib " ^ file ^ " not found")
       failwith ("Java lib " ^ file ^ " not found")