File: load_native_library.diff

package info (click to toggle)
libjdic-java 0.9.5-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,024 kB
  • ctags: 2,427
  • sloc: java: 8,655; xml: 3,837; cpp: 3,437; ansic: 677; sh: 318; makefile: 214
file content (61 lines) | stat: -rw-r--r-- 3,631 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Index: libjdic-java-0.9.5/jdic/src/share/classes/org/jdesktop/jdic/init/JdicManager.java
===================================================================
--- libjdic-java-0.9.5.orig/jdic/src/share/classes/org/jdesktop/jdic/init/JdicManager.java	2008-07-10 03:54:49.000000000 +0530
+++ libjdic-java-0.9.5/jdic/src/share/classes/org/jdesktop/jdic/init/JdicManager.java	2008-07-10 03:54:50.000000000 +0530
@@ -183,19 +183,8 @@
                 if( null==clNativeExtractor 
                     && JdicManager.class.getClassLoader() instanceof URLClassLoader)
                 {
-                    //running url of current class                                                  
-                    nativeLibPath =  new File(
-                            new URL(JdicManager.class
-                                .getProtectionDomain()
-                                .getCodeSource()
-                                .getLocation(),
-                                ".")
-                            .openConnection()
-                            .getPermission()
-                            .getName()
-                        ).getCanonicalPath()
-                        + File.separator + getPlatform() 
-                        + File.separator + getArchitecture();
+		    // set to java.library.path
+		    nativeLibPath = System.getProperty("java.library.path");
                 }  
             }    
             if(null!=clNativeExtractor){
@@ -311,7 +300,7 @@
                 } else {
                     AccessController.doPrivileged( new PrivilegedExceptionAction() { 
                         public Object run() throws IOException {
-                            System.load(nativeLibPath + File.separator 
+                            System.load(nativeLibPath + File.separator + "lib"
                                     + libName + getPlatformDLLext());
                             return null;
                         }
Index: libjdic-java-0.9.5/jdic/src/unix/classes/org/jdesktop/jdic/tray/internal/impl/GnomeSystemTrayService.java
===================================================================
--- libjdic-java-0.9.5.orig/jdic/src/unix/classes/org/jdesktop/jdic/tray/internal/impl/GnomeSystemTrayService.java	2008-07-10 03:54:43.000000000 +0530
+++ libjdic-java-0.9.5/jdic/src/unix/classes/org/jdesktop/jdic/tray/internal/impl/GnomeSystemTrayService.java	2008-07-10 03:54:50.000000000 +0530
@@ -69,7 +69,7 @@
         t.sync();
 
         try{
-            JdicManager.loadLibrary("jdic");
+            JdicManager.loadLibrary("tray");
         }catch(PrivilegedActionException e){
             e.printStackTrace();
         }
Index: libjdic-java-0.9.5/jdic/src/unix/classes/org/jdesktop/jdic/tray/internal/impl/GnomeTrayAppletService.java
===================================================================
--- libjdic-java-0.9.5.orig/jdic/src/unix/classes/org/jdesktop/jdic/tray/internal/impl/GnomeTrayAppletService.java	2008-07-10 03:54:43.000000000 +0530
+++ libjdic-java-0.9.5/jdic/src/unix/classes/org/jdesktop/jdic/tray/internal/impl/GnomeTrayAppletService.java	2008-07-10 03:56:32.000000000 +0530
@@ -85,7 +85,7 @@
         // System.out.println("version = " + version);
         // System.out.flush();
 
-        if ((version.indexOf("1.5") == -1) || (os.equals("SunOS"))) {
+        if (((version.indexOf("1.6") == -1) && (version.indexOf("1.5") == -1))|| (os.equals("SunOS"))) {
             // 1.4.2 or older JVM, use MAWT !
             long w = getWidget(window, 400, 400, 0, 0);
             // System.out.println("Widget w = " + w);