{"id":26032694,"url":"https://github.com/apache/harmony-classlib","last_synced_at":"2025-04-10T00:41:08.898Z","repository":{"id":574283,"uuid":"206393","full_name":"apache/harmony-classlib","owner":"apache","description":"Mirror of Apache Harmony classlib","archived":false,"fork":false,"pushed_at":"2015-11-03T11:20:56.000Z","size":95760,"stargazers_count":6,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"trunk","last_synced_at":"2025-04-03T04:16:56.293Z","etag":null,"topics":["harmony"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-05-21T01:36:05.000Z","updated_at":"2022-10-04T13:17:52.000Z","dependencies_parsed_at":"2022-07-07T14:20:18.663Z","dependency_job_id":null,"html_url":"https://github.com/apache/harmony-classlib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fharmony-classlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fharmony-classlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fharmony-classlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fharmony-classlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/harmony-classlib/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247909205,"owners_count":21016479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["harmony"],"created_at":"2025-03-06T22:45:35.901Z","updated_at":"2025-04-10T00:41:08.881Z","avatar_url":"https://github.com/apache.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"README\n======\n\n\nThis directory contains the Apache Harmony class library code.\n\n\nContents\n--------\nAfter checking out the code onto disk at \u003cEXTRACT_DIR\u003e you should find the\nfollowing directories under \u003cEXTRACT_DIR\u003e :\n\n*  make     - support for building the source code and packaging the results.\n\n*  depends  - support files (both text and binary) that are required to build\n              the class libraries and any native libraries required. Includes\n              several third party source files as detailed in the file\n              Harmony/depends/oss/README.txt.\n               \n*  doc      - configuration files and images that are required to generate\n              HTML documentation of the Java and C source using the Doxygen\n              documentation system. Pre-genenerated HTML is included. \n               \n*  modules  - Java, C/C++, assembly source files that can be compiled into the\n              class library component files.\n\n*  support  - Java source files used to support test cases across various modules.\n\n\nExport Notice\n-------------\n\nThis distribution includes cryptographic software.  The country in \nwhich you currently reside may have restrictions on the import, \npossession, use, and/or re-export to another country, of \nencryption software.  BEFORE using any encryption software, please \ncheck your country's laws, regulations and policies concerning the\nimport, possession, or use, and re-export of encryption software, to \nsee if this is permitted.  See http://www.wassenaar.org/ for more\ninformation.\n\nThe U.S. Government Department of Commerce, Bureau of Industry and\nSecurity (BIS), has classified this software as Export Commodity \nControl Number (ECCN) 5D002.C.1, which includes information security\nsoftware using or performing cryptographic functions with asymmetric\nalgorithms.  The form and manner of this Apache Software Foundation\ndistribution makes it eligible for export under the License Exception\nENC Technology Software Unrestricted (TSU) exception (see the BIS \nExport Administration Regulations, Section 740.13) for both object \ncode and source code.\n\nThe following provides more details on the included cryptographic\nsoftware:\n\nApache Harmony contains code that is specifically designed to enable\ncryptography.  In particular Apache Harmony contains an implementation\nthe Java cryptographic extensions.  In addition, binary distributions\nof Apache Harmony may contain cryptographic functionality provided by\nThe Legion of the Bouncy Castle (http://www.bouncycastle.org).\n\n\nPre-requisites for Building\n---------------------------\nIn order to build the source code contained in the modules and support\ndirectories, it is necessary to configure the following tools in the user \nenvironment. That is, the working environment should be such that the PATH \nenvironment variable contains all of the directories where the executables of\nthe tools listed below are located and that all of those executables can be \nsuccessfully invoked from the command line.\n\n\n* C compiler - on Windows, the Microsoft(R) 32-bit C/C++ Compiler and on\n               Linux, the GNU project C/C++ Compiler.\n\n* Java compiler - By default, the build scripts are setup to use the Eclipse\n                  compiler (ECJ). The ECJ needs to be in the Ant class path\n                  to execute correctly. The ECJ JAR is downloaded when the \n                  'fetch-depends' target is run on the top-level build script.\n                  Once downloaded copy the JAR from HARMONY_TRUNK/depends/ecj_x.x\n                  folder to the ANT_HOME/lib folder.\n                  \n* Apache Ant - A Java based build tool. See http://ant.apache.org/.\n               It's suggested that the ANT_OPTS environment variable be set\n               to a value of \"-Xms256M -Xmx512M\" while running the build scripts\n               for Harmony.\n\n* Doxygen - the open source documentation system for a variety of programming \n            languages including C, C++ and Java.\n            See http://www.doxygen.org\n            \n\nThe top-level Ant script \u003cEXTRACT_DIR\u003e/build.xml has a default target \nwhich builds both the Java source and C source files. It is expected\ntherefore that, at a minimum, a C compiler and a Java compiler be available.\nDoxygen is only necessary if generation of HTML documentation from the\nsource code is to be carried out by invoking Ant with the \"doc\" target on\nthe \u003cEXTRACT_DIR\u003e/build.xml script. As a convenience, pre-generated\nHTML files are already stored in subversion.\n\n\n\nBuilding\n--------\nThe simplest way to get started is to change directory into \u003cEXTRACT_DIR\u003e and\nthen type \"ant\" to run Apache Ant against the default target of the build.xml\nfile. Provided that the required compilers are available, Ant will proceed to\ncompile all the class library source code.\n\n\nBuilding Java\n-------------\nThe class files output from the Java compilation will be assembled into a set\nof JAR files which reflect the components of the class libraries (see\nhttp://wiki.apache.org/harmony/ClassLibrary for more information). Together with\nthe required support files, these JAR files will then be laid out in the boot\ndirectory of the following directory tree structure ...\n\n\u003cEXTRACT_DIR\u003e\n       |\n       \\---deploy\n             |\n             \\---jdk\n                  |\n                  \\---jre\n                       |\n                       +---bin           \u003c- classlibrary native code \u0026 launcher\n                       |   |\n                       |   +---default   \u003c- VM-specific files for launcher's default VM\n                       |   +---vm1       \u003c- VM-specific files for 'vm1'\n                       |   \\---vm2       \u003c- VM-specific files for 'vm2', and so on\n                       |\n                       \\---lib\n                           |\n                           +---boot      \u003c- common JARs for bootclasspath\n                           | \n                           +---ext       \u003c- extensions directory\n                           |\n                           \\---security\n    \n\n\nBuilding Natives\n----------------\nNext, the source files contained under \u003cEXTRACT_DIR\u003e/modules will be\nbuilt using the available C/C++/ASM compiler. The output from this stage will be the \ncreation of a launcher executable (java.exe on Windows, java on Linux) in the \nbin directory of the above layout together with a number of shared libraries\n(with the .dll extension on Windows, and .so on Linux). \n\nOn Windows if the native build exits with the message :\n\nfatal error U1052: file 'ntwin32.mak' not found\n\nthis is an indication that the required build environment has not been properly\nconfigured in the working console window. \n\n\n\nBuild Output\n------------\nThe supplied source is built into a set of Java class libraries and the native \nshared libraries necessary to support their correct functioning. In order to \nbe used to run a compiled Java application the built class libraries still\nrequire a virtual machine component. \n\n\n\nBuilding Documentation\n----------------------\nTwo sets of HTML files can be found under the \u003cEXTRACT_DIR\u003e/doc directory. \n\n* kernel_doc - contains HTML documentation on the set of Java classes called the\n               \"kernel classes\". These are the set of classes which - under the\n               Harmony class library architecture - are closely tied to\n               the structure of the VM. \n               Browse \u003cEXTRACT_DIR\u003e/doc/kernel_doc/html/index.html\n\n* vm_doc - contains HTML documentation concerned with how the Java class\n           libraries may be used on different VM implementations. This includes\n           an overview of the external dependencies of the class libraries \n           and introduces a VM interface through which the class library natives\n           and VM can interoperate with one another.        \n           Browse \u003cEXTRACT_DIR\u003e/doc/vm_doc/html/index.html\n\nRunning the \"doc\" target of the top-level Ant script\n\u003cEXTRACT_DIR\u003e/build.xml will refresh the contents of these directories.\nThe target makes use of the doxygen tool and so expects the doxygen executable\nto be available in the current user environment (i.e the user PATH environment\nvariable should contain an entry for \u003cDOXYGEN_INSTALL_DIR\u003e/bin ). \n\n\n\nModifying the Java Build Compiler\n---------------------------------\nBy default, the Java compiler is set to use the ECJ compiler. This value is\nset in the HARMONY_TRUNK/make/properties.xml and looks like the following XML\nelement.\n\n\u003cproperty name=\"hy.javac.compiler\" value=\"org.eclipse.jdt.core.JDTCompilerAdapter\" /\u003e\n\nThe compiler can be set to \"modern\", as per the Ant manual, which will cause Ant\nto use the JDK's 'javac' tool. You may also need to change the 'build.compilerarg'\nto '-nowarn' instead of the JDT '-warn:none'.\n\n\nOptions for ECJ compiler\n------------------------\n\nFor more information on configuring the ECJ, check out this document on the batch\ncompiler - http://dev.eclipse.org/viewcvs/index.cgi/*checkout*/jdt-core-home/howto/batch%20compile/batchCompile.html?rev=HEAD\u0026content-type=text/html.\n\n\nWhat's Next ?\n-------------\n\nThe class libraries do not provide the full JSE API. Instead the included source\nis only a subset of the Java 1.5 API.\n\n\nTo test out the functionality of the built class library components a compatible\nVM needs to be obtained.  A compatible VM implements the Virtual Machine Interface\nas described in the documentation above.\n\n\nTroubleshooting \u0026 Known Problems\n--------------------------------\n\nLinux users may need to install an appropriate libc compatibility patch to their\noperating system if they see the following error message when attempting to run\na Java application with the built class library components on a compatible VM :\n\n\u003cerror: unable to load ICUInterface34 (libstdc++.so.5: cannot open shared object\nfile: No such file or directory)\u003e\n\nWhere to obtain the required patch and the precise means of applying it will \nobviously differ according to Linux distribution. On Debian the advanced package\ntool apt-get could be used as follows :\n\nuser@server:~$\u003e apt-get install libstdc++5\n\nOn a Red Hat Enterprise Linux machine the rpm tool may be used to install the \nequivalent package thus : \n\nuser@server:~$\u003e rpm -Uvh compat-libstdc++-33-3.2.3-47.3.i386.rpm\n\nConsult the system administration documentation of your particular Linux\ndistribution for more information.\n\n                                  ----------\n\nLinux users may need to update the value of their LD_LIBRARY_PATH environment \nvariable if they see the following error message when attempting to run a Java\napplication with the built class library components on a compatible VM : \n\nerror while loading shared libraries: libhyprt.so: cannot open shared \nobject file: No such file or directory\n\nOn some systems this error can occur even when the shared library\n(e.g. \u003cEXTRACT_DIR\u003e/deploy/jdk/jre/bin/libhyprt.so) has been built correctly\nand is present in the correct location. This is not a problem with the built\nshared library but instead is dependent on how the operating system locates and \nloads dynamically linked libraries at runtime. Updating the LD_LIBRARY_PATH \nenvironment variable to include the directory\n\u003cEXTRACT_DIR\u003e/deploy/jdk/jre/bin should solve this. An alternative remedy \nwould be to add new entries for each of the shared libraries built from the\ncontributed native source code to the local /etc/ld.so.conf file and then \nrunning the ldconfig program to rebuild the /etc/ld.so.cache. \n\n                                  ----------\n\nLinux users may need to update their GNU Make (http://www.gnu.org/software/make/)\nto version 3.80 or later if they see the following error message when attempting\nto build native source:\n\n: No such file or directory\nmake: *** [../libvmi.so] Error 1\n\n(The library name may be different)\n\n                                  ----------\n\nIf the build fails with an odd error that similar to the following output snippet,\ntry setting the ANT_OPTS environment variable to \"-Xms256M -Xmx512M\".\n\n\u003csnippet\u003e\n    [javac] ----------\n    [javac] 1. ERROR in C:\\dev\\harmony\\enhanced\\classlib\\trunk\\modules\\accessibi\nlity\\src\\main\\java\\javax\\accessibility\\Accessible.java (at line 0)\n    [javac]     /*\n    [javac]     ^\n    [javac] Internal compiler error\n    [javac] java.lang.OutOfMemoryError: Java heap space\n\n    [javac] ----------\n\nBUILD FAILED\nC:\\dev\\harmony\\enhanced\\classlib\\trunk\\build.xml:108: The following error occurr\ned while executing this line:\nC:\\dev\\harmony\\enhanced\\classlib\\trunk\\make\\build-java.xml:143: java.lang.reflec\nt.InvocationTargetException\n\u003c/snippet\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fharmony-classlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fharmony-classlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fharmony-classlib/lists"}