How to install Java to compile Sevlets at command prompt

Please help me to compile my java servlets at command prompt.
I have buyed a new leaptop with windows XP service pack 2
I have downloaded Java EE 5 SDK Update 4 (with JDK 6u5) for Windows, English
I setted my path and classpath variable for bin and lib folder..
I could not able to compile my servlet programs
I am getting errors for all my servlet package classes and servlet.http. packages.........

Hi Jeff,
Follow the steps ...
First you install JDK, it can be 1.2, 1.3, 1.4.
Lets say you install it in c:\jdk13\ then c:\jdk13 becomes your Java Home Path.
Edit your autoexec.bat using any editor. And add the Following Lines.
SET CLASSPATH=C:\JDK13\SRC.JAR;C:\JDK13\LIB\TOOLS.JAR;C:\JDK13\LIB\DT.JAR
These are the Jar files that need to comile and execute your Java Programs.
Next add the JDK Binary executables folder in the Windows Path.
Add this line to the end of your Autoexec.bat
PATH=%PATH%;C:\JDK13\BIN
The %PATH% Variable will append the Bin path to the existing path.
Dont worry about the Case of the statements but dont Leave Spaces after in between after the PATH= Words in any of the above statements.
Its reccomended to Restart your PC for these commands to take effect.
Then write a Java Class and compile it with javac yourClass.java and then run it with java yourClass
Hope this is clear enough.
Regards ,
Max

Similar Messages

  • Java Code Compilation in Windows Command Prompt

    Hi Everyone,
    I have been programming in java for quite some time now using an IDE (eclipse). I downloaded the following java file from:
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.html#requirements
    and have downloaded the required JMF. The problem is that I want to compile and run this code in Windows Command Prompt; however, I keep receiving errors upon compilation because I do not know how to make jmf.jar be recognized as a library.
    Thx.

    javac -cp jmf.jar;otherJars file1.java file2.java file3.java...
    Run java and javac from the command line for an explanation of their options.
    Edited by: nclow on Jul 24, 2008 1:43 PM

  • How can install java sdk for mac os x 10.6.8

    How can install java sdk for mac os x 10.6.8?

    Deanwdd wrote:
    I mean to update Quicktime for Mac Os X 10.6.8...
    If you're running 10.6.8, Apple menu > Software Update. What version of QT do you have?

  • How to install java stack ,only  abap ,basis patch level 9 installed

    how to install java stack ,already installed abap ,basis patch level 9,please any one guide me and please give me installation steps for java stack.

    Hi,
    From sapinst, install Java Add-on.
    check installation guide.
    Thanks
    Sunny

  • How To install Java Application[J2SE] into Windows Mobile

    Hi All,
    I have developed an application for Mobile devices[ Windows Mobile] exclusively using Java[AWT].When I try to install , the application in mobile, i got the following error.
    *"MIDlet cannot be installed because critical information is missing from the MIDlet file (.jar). - 13 Please contact the MIDlet provider for more information."*
    I didnt use any midlet classes in my application. So my question is, what the above error denotes? and How to install
    java[AWT] application into mobile?. What are all the requirements to install the application?.
    Thanks in advance.

    Hi David, thank you very much, your information was very useful, finally i got the work done.
    The problem was with the JVM which is im used in my Windows Mobile. And im installed CrE-ME in my mobile
    to execute java application.
    The following link has the details of how to install the JVM and execute the aplication (.jar ).
    http://javatolearn.blogspot.com/search/label/Java%20in%20Windows%20CE%20with%20CrE-ME
    Thanks and Regards
    Baskaran

  • How to install Java on Red Hat

    Does anyone know how to install Java on Red Hat. I'm having problems installing it, and I can't really find any instructions anywhere on how to go about it. Thanks.

    Java won't run on Red Hat because of firewall
    problems.What ? Since when ? But there are problems with certain versions of RH.
    Nothing to do with a firewall though.
    >
    It only runs on Sun and Windows 95.
    But not the Vax version.

  • How to install JAVA , XML on 10.2.0.4.0 (AIX).

    Hi All,
    How to install JAVA , XML on 10.2.0.4.0 (AIX).
    Any document/link/ metalink doc would be highly appreciated
    Thanks In advance
    ivw

    Thanks for reply.
    I dont have dbca .. only ssh access, no gui
    sqlplus '/ as sysdba'
    SQL*Plus: Release 10.2.0.4.0 - Production on Fri Aug 21 02:24:59 2009
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    SQL> select count(*), owner from all_objects
    where object_type like '%JAVA%' group by owner;
    no rows selected
    so java is not loaded in the database
    I believe in 9i we have to run this
    @?/javavm/install/initjvm.sql
    @?/xdk/admin/initxml.sql
    @?/xdk/admin/xmlja.sql
    @?/rdbms/admin/catjava.sql
    Is there is any change in 10g regarding these above steps?
    Edited by: ivw on Aug 20, 2009 9:28 PM

  • How to install Java on Yosemite?

    How to install Java on Yosemite?

    What version do you need, and what do you need it for?
    If just web applets, you only need the JRE. If running desktop apps or development, then you need the JDK.
    Java 1.6 is here: Java for OS X 2014-001
    Any later version via Java.com. Pick Java SE JRE or JDK as required.

  • How to installed java comm in solaris

    I have installed borland jbuilder5 enterprise edition,and
    put the libSolarisSerialParallel.so in LD_LIBRARY_PATH
    (LD_LIBRARY_PATH=/usr/lib), the comm.jar in jre\lib\,javax.comm.properties in jre\lib .
    But when I Open the serial port, the program always raise a exception "null".
    What can i do ?

    sorry :
    how to "installed" java comm in solaris
    --->
    how to install java comm in solaris

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • How to install java in oracle databse

    i have java code that i want user in database side And this code have have error .
    it must java lib instlled to database side ,
    how to install jre to database ?

    Pl post details of OS and database versions. Oracle databases include a JRE version that cannot be changed
    Re: upgrade JRE version of Oracle 11g database
    Pl post exactly how you are loading/compiling your code, along with the complete error codes and messages
    HTH
    Srini

  • How to install Java system on NW7.01 ?

    Hi, all experts,
    I have been installed Database instance and Central instance on NW7.01, I selected the options is
    "SAP NetWeaver 7.0 including Enhancement Package1---->SAP Application Server ABAP---->
    Oracle-->Central System--
    >Central System.
    But now I want to install Java system,
    Who could tell me how to select the option ?
    OS version: Linux_x86_64,  DB version: Oracle10.0.2.4
    Best regards and thanks in advance,
    Michael

    >
    Michael Hong wrote:
    > Hi, all experts,
    >
    > I have been installed Database instance and Central instance on NW7.01, I selected the options is
    > "SAP NetWeaver 7.0 including Enhancement Package1---->SAP Application Server ABAP---->
    > Oracle-->Central System--
    >Central System.
    >
    >
    > But now I want to install Java system,
    >
    > Who could tell me how to select the option ?
    >
    > OS version: Linux_x86_64,  DB version: Oracle10.0.2.4
    >
    > Best regards and thanks in advance,
    > Michael
    I couldn't find the option "Java add-in"  below the Option "SAP NetWeaver 7.0 including Enhancement Package1", only find
    the option "SAP Application Server JAVA".
    If I install SAP Application Server JAVA , then I need to install the oracle 10g again, so it will have two database ,
    who have the experience of the "JAVA + ABAP " installation ?
    Thanks,
    Michael
    Edited by: Michael Hong on Mar 10, 2010 5:03 AM

  • How to install java in /opt

    Hi,
    I am trying to install java using RPM selfextract package. But it alwasy installs in /usr.
    I am installing on fedora core 3 machine. I dont't have enough space in /usr that's why i want to install in /opt.
    I am downloading the j2sdk-1_4_2_08-linux-i586-rpm.bin in /opt
    and gave rpm -iv j2sdk-1_4_2_08-linux-i586.rpm
    but it always installs in /usr/java/...
    how do i get this installed in /opt??
    I have already preset the env variables to /opt/java/... locations.
    Please let me know as soon as possible.
    thanks
    sri

    I found this link when looking at the installation instructions on java.sun.com. It tells you how to install the sdk in any directory.
    http://java.sun.com/j2se/1.5.0/install-linux.html#self-extracting
    Hope this helps
    Jay

  • How to install Java in ASUS EeePC Linux OS?

    Who knows how to install a Java to a Linux OS in ASUS EeePC? I purchased an EeePC 4GB Surf for my programming subjects. But then, I couldn't use the Eclipse if I don't have Java installed on the pc. Do you know how to put Java in a ASUS EeePC 4GB Surf Linux OS?

    Some programs like FrostWire will not work without Java being upgraded. To do this:
    1.
    Use the Synaptic Package manager to add the repository: deb http://geekconnection.org xandros4 main. If you have no clue what that means read Installing software on the EEE - quick beginner's guide on the wiki.
    2.
    After Synaptic has downloaded the files to update the repository; Scroll through the available items to locate xandros-sun-jre1.5; Mark it for installation; Click Apply.
    The approximate size of this installation of Java is 30Mb and it is reported in this thread on the forum that after this version of Java was installed FrostWire works.
    http://wiki.eeeuser.com/howto:upgrade_java?s=java

Maybe you are looking for

  • [SOLVED] Gnome 3 always crash

    I tried to install gnome 3 on the system, when I typed startx, gnome 3 occurs with a long time and when it appears , there is no icon appears, and no desktop background. Only menu bar appears in white (not like the look of all gnome 3 normally) and w

  • Lightroom 5: start button in the presentation module doesn't work properly

    Hi. I purchased LR 5 last week but the start button in the presentation mudule doesn't work properly. I get a black screen and nothing happens. I have to press the esc button several times to return to LR.Can you help me please Regards Eugene

  • After updating to iOS 7 I can no longer receive text messages.

    I can send text messages but I am not receiving responses even though the received confirmed they responded.  I am also not receiving text messages initiated by anyone else.  Problem did not exist prior to the update.  Contact list has not changed an

  • Upresing for Printing in Lightroom 2

    In their Luminous Landscape Lightroom 2 Tutorial (which is excellent), Reichmann and Schewe recommend upresing by 50% from native resolution when printing so that a file that measured 200+ppi would be pushed to 360 and a file in the 300's would go to

  • Problems with music softwares...

    Hi everybody , I'm a new french user , so sorry for my english... Ok, I'm a music maker and I got some troubles beetween Snow Leopard and Ableton Live music software. I'm comming here to ask you if you got some problems whith snow leopard and video o