Ignore:
Timestamp:
08/03/11 11:13:58 (8 years ago)
Author:
hinerm
Message:

Fixes for ticket #298 and #654

Ticket #298 fixes:

  • search for a /jar subdirectory in working directory or provided classpath
  • all files in /jar are added to the classpath of the instantiated JVM

Ticket #654 fixes:

  • copying of project headers
  • copying of proxy headers
  • copying of jar dependencies to /jar
  • removal of loci_tool dependency
  • packaging improvements to remove full path references
File:
1 edited

Legend:

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

    r7718 r7731  
    109109 
    110110//TODO: Add option override java library path 
     111/** 
     112* jarlist is a semi-colon-separated list of additional jars to include 
     113**/ 
    111114void JavaTools::createJVM(string classdir, string jarlist, bool headless, int memory) 
    112115{ 
     
    126129      std::string classpath (""); 
    127130 
    128       //TODO: Add all Jar2Lib classpath jars to this list by default (by template? by txt file?) 
    129131      classpath += classdir + "jace-runtime.jar"; 
     132 
     133      DIR *d; 
     134      struct dirent *dir; 
     135 
     136      if(classdir.length() >= 1) 
     137      { 
     138        string tmp_dir(classdir); 
     139        tmp_dir += "jar"; 
     140        d = opendir(tmp_dir.c_str()); 
     141      } 
     142      else 
     143      { 
     144        d = opendir("./jar"); 
     145      } 
     146 
     147      if(d) 
     148      { 
     149        while ((dir = readdir(d)) != NULL) 
     150        { 
     151          string tmp_name(dir->d_name); 
     152 
     153          if(tmp_name.compare(".") != 0 && tmp_name.compare("..") !=0) 
     154          { 
     155            classpath += PATHSTEP; 
     156            classpath += classdir + "jar" + SLASH + dir->d_name; 
     157          } 
     158        } 
     159 
     160        closedir(d); 
     161      } 
     162 
    130163 
    131164      if(jarlist.length() >= 1) 
     
    147180      } 
    148181 
    149       std::cout << "jarlist : " << jarlist << std::endl; 
    150  
    151       std::cout << "Classpath for JVM: " << classpath << std::endl; 
     182      //std::cout << "jarlist : " << jarlist << std::endl; 
     183      //std::cout << "Classpath for JVM: " << classpath << std::endl; 
    152184 
    153185      list.push_back(jace::ClassPath( 
Note: See TracChangeset for help on using the changeset viewer.