JAVA Quick Search Engine :

Custom Search

NB:

You can Find ALL (Downloads,tutorials,meaning,more posts)Quickly and easily With This Search engine.

*For Meaning Use : Meaning of 'WORD' .
*For Download Somthing Use : Downloads ' WORD'
*For More Posts About A Subjet Use : Posts About 'WORD/SENTENSE')

Sunday, April 26, 2009

Bootable Java CD

Installing Java on a bootable CD

Bart's PE Builder is a tool that lets you build a bootable Windows CD ROM or DVD using Windows XP or Windows Server 2003. This is a quick guide to setting up a plugin for Bart's PE Builder v3 that will allow you to install a Java Runtime and run Java programs directly from CD, without requiring any hard disk.

Installing the Java Runtime

The first step to creating the plugin is to install the Java Runtime on a Windows machine. You can download the Java Runtime for free from http://www.java.com/. These instructions are based on version 1.4.2 of the Java Runtime for Windows. If you attempt to use a different version, you may need to change some of the config files which we will describe later.

Files required for the Java Runtime plugin

If you have not already installed Bart's PE Builder, you should do so now. Create a new directory called j2re in the PE Builder plugins directory. Now go to C:\Program Files\Java\j2re1.4.2\ (or wherever you installed the Java Runtime to) and copy bin and lib into the j2re plugin directory.

Plugin configuration files

There are two configuration files that you must create in the j2re directory. j2re.inf tells PE Builder which files it needs to to include from this plugin on the bootable CD (so you may need to change this slightly if you are using a different version of Java). j2re_nu2menu.xml is used to add items to the NU2 menu system. Note that we do not need to add any menu items for the Java Runtime to work.

YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE DOWNLOADS OR DETAILS.

Running PE Builder

When you run PE Builder, this plugin will be listed as "Java 2 Runtime Environment". Make sure you tick the box if you want the Java Runtime to be installed on your bootable Windows CD. Follow the instructions and you will end up with an ISO image of the CD, which you can burn using your favourite CD burning software.

Running Java programs from the bootable CD

When you boot from the CD you have created, it will start to load the operating system from the CD. No hard disk is required. The java.exe executable can be found in D:\J2RE\BIN, where D: is your CD drive (it may be different depending on your hardware configuration). You can run Java programs as you would do normally, however, you may find it convenient to add D:\J2RE\BIN to your PATH variable. (This has to be done manually at the moment, but I will get round to changing the plugin to set this automatically soon.)

Installing Java programs on the CD

Having successfully installed the Java Runtime on a bootable Windows CD, you may now want to include some useful Java programs on the CD as well. It may seem obvious, but remember that the CD is read-only, so any programs you do run will not be able to save any information to the directory they run from. You may find it convenient to create your own plugin for each Java application you include on the CD.

Installing Java applications

This example will show you how to create a new plugin for jlogtrailer , a log tailing utility written in Java. You will need to have completed all previous steps for the Java Runtime plugin before this will work.

Files required for the JLogTailer plugin

Create a new plugin directory called JLogTailer. Download the JLogTailer-2.0.0.jar file from the JLogTailer page and place it in the plugin directory. You will also need to put the two config files in the plugin directory:

YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE DOWNLOADS OR DETAILS.

Now you must build a new ISO image with both the Java Runtime and JLogTailer plugins selected.

Running JLogTailer from the bootable CD

When the CD has booted into Windows, you can open a new command window (CMD). Adding the Java executables to the PATH would be useful at this stage, as you will then not need to type the full path every time you run java.exe. If your CD is not mounted as drive D: make sure you use the correct drive letter when modifying the PATH. So here's how to run the LogTailer from the command window:

Microsoft Windows XP [Version 5.1.2600]
{C} Copyright 1985-2001 Microsoft Corp.

D:\i386\system32>set PATH=%PATH%;d:\j2re\bin

D:\i386\system32>cd ../../JLogTailer

D:\JLOGTAILER>java -jar JLogTailer-2.0.0.jar

JLogTailer will now run and you can use the menu bar to open up a new file for log tailing.

Troubleshooting

This guide has been successfully tested with PE Builder 3.0.9-BETA and 3.0.10-BETA. Let me know if I need to update the plugin to work with later versions.

Some broken graphics cards may cause the Java Virtual Machine to crash when it runs a graphical Java application within Windows PE. There is no known fix for this as yet.

There are several different revisions of the Java Runtime 1.4.2. If you receive any "file not found" errors when PE Builder is preparing the ISO image, it may be caused by slightly different filenames being used by the particular revision you are using. For example, the file bin\NPJPI142.dll may be called bin\NPJPI142_01.dll instead. For the plugin to work properly, you will need to change the names of these files in the j2re.inf file yourself.

YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE DOWNLOADS OR DETAILS.

How to install Java

What is Java and why do I need it?

Java is a programming language that allows programs to be written that can then be run on more than one type of operating system. A program written in Java can run on Windows, UNIX, Linux etc. as long as there is a Java runtime environment installed.

Some of the programs on this website have been written in Java, so you will need to install the Java runtime environment in order to run them.

Where can I download Java?

You can download version 1.4 of Java from http://java.sun.com/j2se/1.4/download.html. If you want to be able to write your own Java programs that you can compile and run, then you must download the SDK (Software Developers Kit). If you just want to be able to run a Java program that has already been compiled, then you can get away with just downloading the JRE (Java Runtime Environment). Once you have decided which you need, download either the SDK or the JRE. Choose the download that is most suitable for your operating system.

Setting up Java

If you do not have Java installed already, follow the instructions provided with the download in order to install Java.

Once Java has been installed, you will be able to run Java program by running the java executable that was installed. You may find it convenient to add the location of this file to your operating system's path variable, otherwise you will need to explicitly refer to the absolute location of java.

Setting up the path

  • Windows 2000/XP users may set their path by right-clicking on 'My Computer' and selecting 'Properties'. Under the 'Advanced' tab, there is a button that allows you to set the 'Environment variables'. Click on this and alter the 'Path' variable so that it also contains the path to the Java executable. For example, if you have installed Java in c:\jdk and your path is currently set to C:\WINDOWS\SYSTEM32, then you would change your path to read C:\WINDOWS\SYSTEM32;c:\jdk\bin
    When you open a new command prompt, it will reflect these changes and allow you to run java programs by typing "java". If you have installed the SDK, then you will also be able to run "javac" to compile stuff.
  • Windows 95/98/ME users may find that their path variable is stored in a different place. Edit the c:\autoexec.bat file and add the following line at the end: SET PATH=%PATH%;c:\jdk\bin
    (This also assumes that you have installed Java in c:\jdk)
  • Linux, UNIX, Solaris, FreeBSD users must set their PATH variable to point to where the java binaries have been installed. Please refer to your shell documentation if you have trouble doing this. For example, if you use bash as your shell, then you would add the following line to the end of your .bashrc: export PATH=/path/to/java:$PATH

Setting up the classpath

In addition to setting up the path, you also need to tell Java where to find compiled class files at runtime. You will probably want to set the classpath to include at least the current working directory (.)

Eg: SET CLASSPATH=%CLASSPATH%;.

The classpath can also contain other directories that may contain compiled class files. Note that if you are using classes that are contained inside a .jar file, you will need to specify the full path and name of this file in the classpath, rather than just the name of the directory it is contained within.

Java Documentation

You may optionally download the Java documentation, which includes API pages that explain in good detail how each Java class can be used.

YOU CAN USE QUICK SEARCH ENGINE IN THE TOP FOR MORE DOWNLOADS OR DETAILS.