Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.239

Navigation: Getting started > Install winIDEA > Install winIDEA for Linux

Scroll Prev Top Next More

Installing winIDEA SDK for Java

Download and unzip Java SDK from iSYSTEM web page. The zip file contains documentation, sample project and libraries (jar file, DLL for Windows and SO for Linux). Copy files in lib directory to your application, add jar file to classpath, and load native library with the following code:

 

/**
* Returns directory of jar file containing this class. Native libraries (dll, so)
* are expected in this directory.
*/
private static String getJarFileDir() throws URISyntaxException {
   Path jarPath = Paths.get(CDebugFacade.class.getProtectionDomain().getCodeSource().getLocation().toURI());
   return jarPath.getParent().toAbsolutePath().toString();
}
public static void main(String[] args) throws Exception
{
   String os = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
   boolean isWindows = os.startsWith("windows");
   String architecture = System.getProperty("sun.arch.data.model");
   String libraryName = getJarFileDir();
   if (architecture.equals("64")) {
       if (isWindows) {
           libraryName += "/IConnectJNIx64.dll";
       } else {
           libraryName += "/libiconnectJava.so";
       }
   } else if (architecture.equals("32")) {
       if (isWindows) {
           libraryName = "/IConnectJNI.dll";
       } else {
           throw new IllegalStateException("32 Linux is currently not supported. Please contact iSYSTEM for more info.");
       }
   } else {
       throw new IllegalStateException("Unknown 32/64 bit architecture:" + architecture);
   }
   try {
       System.out.println("java.library.path = " + System.getProperty("java.library.path"));
       System.out.println("Loading native library: " + libraryName);
       System.load(libraryName);
   } catch (Throwable thr) {
       System.err.println("Error loading library: " + libraryName);
       System.err.println("Error: " + thr.toString());
       thr.printStackTrace();
       return;
   }
   System.out.println("isystem.connect demo for Java version: " +
                      si.isystem.connect.connectJNI.getModuleVersion());
}

Copyright © 2024 TASKING Germany GmbH