Java binary on Linux

Recently noticed support for Java binary on Linux kernel which means you can execute your Java applications simply as:
$ ./HelloWorld.class
And this can be achieved in following few steps(Assuming JDK is already installed and CLASSPATH properly configured):

  • Recompile your kernel with CONFIG_BINFMT_MISC option. This can be achieved as follows:
    #cd /usr/src/linux; make menuconfig
    Select "Executable file formats / Emulations" -> Kernel Support for MISC binaries
    Save and exit. Follow /usr/src/linux/README for further information on compiling the kernel.
    BINFMT_MISC can also be compiled as a independent module and inserted manually. This feature allows you to invoke almost any binary by simply typing it's name in shell. Refer to /usr/src/linux/Documentation/binfmt_misc.txt for more information on this.
  • Mount binfmt_misc and setup for Java executable:
    # mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
    # echo ':Java:M::\xca\xfe\xba\xbe::/usr/local/bin/javawrapper:' > /proc/sys/fs/binfmt_misc/register
  • Now execute the following:
    # cat /usr/src/linux/Documentation/java.txt |grep -m3 -A 195 "Cut here"
    and copy the first script as /usr/local/bin/javawrapper. This script will add the class file to classpath.
    Compile the second C program as follow:
    # gcc -O2 -o javaclassname javaclassname.c
    # cp javaclassname /usr/local/bin
    This executable is required to find the fully qualified class name i.e. for class Test.class in package, it will return
  • 5. And now the fun part. Just chmod any Java class to execute it.
    # javac
    # chmod +x HelloWorld.class
    # ./HelloWorld.class
  • I gathered this from /usr/src/linux/Documentation/java.txt which can be referred for more information.

    ISPs in India

    An Internet service provider (ISP, also called Internet access provider or IAP) is a business or organization that offers users access to the Internet and related services. Many but not all ISPs are telephone companies.

    Internet access reached India in the early 90’s. ERNet, a division of Department of Electronics (DoE), and NICNet (Department of Statistics) were the pioneers for providing this service. Both ERNet and NICNet were Government bodies, though had very different charters and growth histories.

    The ERNet (Educational and Research Network) project was designed to provide Internet connectivity to the premier educational and research institutions of India, while NICNet was assigned the provision of Internet services primarily to Government departments and organizations. ERNet grew from a low-bandwidth, unreliable, shell1 and UUCP2 based Internet service to become the first to provide full TCP-IP3 access to dial-up modem4 customers through SLIP5 accounts around 1993.

    NICNet began with shell-only access, at 2400 BPS, but started providing high speed TCP-IP access through 64 KBPS V-SAT links.

    ERNet and NICNet are thus India’s first ISPs, though their operations have been shackled by the restrictions put upon them by Government regulations and policies of the Department of Telecom (DoT). Despite this, they were doing quite well in providing the essential Internet services to an Internet-starved India, until the advent of VSNL Internet services and the restrictive clampdown that followed.

    Another provider of Internet services that preceded VSNL is the Software Technology Parks of India (STPI) Internet service. This service was permitted only for a restricted audience, the software exporters falling under the STP scheme of the DoE. STPI has been providing high-end Internet services through leased lines and dial-up links, in and around several of the Parks, including Bangalore, Hyderabad and NOIDA, through the respective SoftNET networks.

    Entry of VSNL..

    On 15th August 1995, VSNL launched the Gateway Internet Access Service, for providing public Internet access. Initially, DoT allowed VSNL the license to operate this service only in the 4 metros. By the VSNL charter, it is supposed to only provide international telecom gateways, not end-user services. Thus the name "Gateway Service" was used to cover up for direct service provision.

    Starting with only dial-up shell and PPP8 access in the 4 metros, VSNL followed with leased-line access to subscribers, followed by the setting up of points of presence (POP) in Bangalore and Pune. The DoT has turned a blind eye to these license violations, and tacitly helped VSNL with post-facto ad hoc permissions along the way.

    VSNL has, since the inception of GIAS, portrayed itself in the press as India’s only legitimate ISP, while forcing many restrictions on the other ISPs through DoT regulations and the telecom policy. The Telegraph Act of 1885, a pre-independence British law, has been repeatedly invoked by VSNL and interpreted to give itself extended powers while forcing the other ISPs to curtail their operations.

    ISP monopoly never ceased to exist even after other players entering Indian market. There have been incidents of individuals facing problems regarding good quality internet connection.
    Quoting an incident from Broadband blog:
    "Well, to cut a long story short, this person works with a respectable computer company. He wanted to have a connection of his own to work. Since he lives in a place where there is no other service provider, he chose to trust his money in Tata’s brand name. However, despite repeated calls and efforts, he couldn’t trace the “executive” for his
    connection. "

    These and similar incidents might make one feel to go about opening their own ISPs.

    Entanet, a supplier of business-to-business Internet services, has announced sometime back, that it is to offer a 'Virtual Pipe' option that takes advantage of a company's infrastructure. The Virtual Pipe enables ISPs, companies, societies, local authorities, schools, or any organization, to offer its own independently managed service.

    Aimed at organizations that envisage connecting upwards of 50 users, customers of the service will have their own set of IP addresses and Radius server and bill their own customers directly, while Entanet manages all of the traffic and infrastructure behind the scenes.

    Talking about Indian ISP is going to take time. Meanwhile, would like to hear your experiences about it.

    Barcamp Pune

    Foo Camp is an invite-only event for technology luminaries hosted in Sebastopol, CA at the O’Reilly headquarters. Though everyone is not invited in the event.
    In response to criticism of Foo Camp, BarCamp was created as an open, welcoming, once-a-year event for geeks to camp out for a couple of days with wifi and smash their brains together.

    It is an intense event with discussions, demos and interaction from attendees. Attendees must give a demo, a session, or help with one.

    There is going to be a barcamp in Pune shortly. Visit this link to register for the event

    I will be there, will you be?