Ignore:
Timestamp:
05/31/11 16:13:59 (9 years ago)
Author:
hinerm
Message:
  • Updated javaTools with future plans
  • Fixed class path bug
Location:
trunk/projects/jar2lib/src/main/resources/project-files/jtools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/jar2lib/src/main/resources/project-files/jtools/include/javaTools.h

    r7713 r7718  
    7070     * This method is used to instantiate a JVM with a custom class path. 
    7171     */ 
    72     static void createJVM(string classdir); 
     72    static void createJVM(string jarlist); 
    7373 
    7474    /** 
  • trunk/projects/jar2lib/src/main/resources/project-files/jtools/source/javaTools.cxx

    r7713 r7718  
    5858} 
    5959 
    60 void JavaTools::createJVM(string classdir) 
     60void JavaTools::createJVM(string jarlist) 
    6161{ 
    62   JavaTools::createJVM(classdir, std::string(""), true, 256); 
     62  JavaTools::createJVM("", jarlist, true, 256); 
    6363} 
    6464 
     
    7575void JavaTools::createJVM(string classdir, int memory) 
    7676{ 
    77   JavaTools::createJVM(classdir, std::string(""), true, memory); 
     77  JavaTools::createJVM(classdir, "", true, memory); 
    7878} 
    7979 
    8080void JavaTools::createJVM(string classdir, bool headless) 
    8181{ 
    82   JavaTools::createJVM(classdir, std::string(""), headless, 256); 
     82  JavaTools::createJVM(classdir, "", headless, 256); 
    8383} 
    8484 
     
    9090void JavaTools::createJVM(bool headless, string jarlist) 
    9191{ 
    92   JavaTools::createJVM("",jarlist, headless, 256); 
     92  JavaTools::createJVM("", jarlist, headless, 256); 
    9393} 
    9494 
     
    108108} 
    109109 
     110//TODO: Add option override java library path 
    110111void JavaTools::createJVM(string classdir, string jarlist, bool headless, int memory) 
    111112{ 
     
    125126      std::string classpath (""); 
    126127 
    127       classpath += classdir + "jace-runtime.jar" + PATHSTEP; 
    128       classpath += classdir + "loci_tools.jar" + PATHSTEP; 
    129       classpath += classdir + "bio-formats.jar"; 
    130  
    131       std::cout << "Classpath for JVM: " << classpath << std::endl; 
     128      //TODO: Add all Jar2Lib classpath jars to this list by default (by template? by txt file?) 
     129      classpath += classdir + "jace-runtime.jar"; 
    132130 
    133131      if(jarlist.length() >= 1) 
     
    149147      } 
    150148 
     149      std::cout << "jarlist : " << jarlist << std::endl; 
     150 
     151      std::cout << "Classpath for JVM: " << classpath << std::endl; 
     152 
    151153      list.push_back(jace::ClassPath( 
    152154      classpath 
     
    163165      if (headless) 
    164166        list.push_back(jace::CustomOption("-Djava.awt.headless=true")); 
    165       else 
    166         list.push_back(jace::CustomOption("-Djava.awt.headless=false")); 
    167  
    168       list.push_back(jace::CustomOption("-Djava.library.path=" + classpath)); 
    169167      //list.push_back(jace::CustomOption("-verbose")); 
    170168      //list.push_back(jace::CustomOption("-verbose:jni")); 
Note: See TracChangeset for help on using the changeset viewer.