Is java interpreted or a compiled language.

Im confused all languages aare compiled arent they?
C++ is compiled into binary, then its ready to execute.
Java compiled into bytecode and then interpreted bt the JVM, then passed into binary and run?
Is this right anyone got a definitive answer?
Cheers

Im confused all languages aare compiled arent they?Languages are not classified into compiled and interpreted. Implementations of languages are either compilers or interpreters.
Most implementations of languages are compilers these days. As far as I know there are no Java interpreters. Java is always compiled into bytecode or native code in all implementations I've seen.
The bytecode can be interpreted as it usually was in the early days of Java, or compiled at run time, or pre-compiled, or can be both interpreted and compiled at run time as HotSpot does.

Similar Messages

  • Is java a compiled language - part 2

    yamm_v6.6_6 said
    Again, I think you are confusing the compilation process and the interpretation process with the meaning of "compiled language" and "interpreted language", mr. jschell. Compilation process and interpretation process have definitions very well established in the Computer Science, as you said, and I agree with you. There are no controversies in those definitions. On the other hand, the meaning of "compiled language" and "interpreted language" might vary, because in this case there are controversiesNo.
    Compilers are one of the most well studied and well defined aspects of computer science more so than any other part of computer science.
    And the Dragon book is now, and has been for at least 20 years, the recognized authoratative source of that part of computer science.
    And there is nothing in there that supports your conclusion nor nothing that supports your term definitions.
    A language in of itself is never compiled nor interpreted. That book specifically defines the process under which a language must be processed to become either compiled and/or interpreted.
    If you wish to disagree with that then state something from that book or first demonstrate that that book is no longer the authorative source.
    Finally note that in terms of computer science none of the java documents (specifications or otherwise) are suitable authoratative sources. The java specifications although adequate are far from precise in the adherence to definitions in computer science, or even in the definition of java itself.

    Wow! I was just googling, and then look at what I found! This thread! Thanks, mr jschell, for your replies. I really appreciate them.
    jschell wrote:
    Finally note that in terms of computer science none of the java documents (specifications or otherwise) are suitable authoratative sources. The java specifications although adequate are far from precise in the adherence to definitions in computer science, or even in the definition of java itself.Well, do you want authoritative sources, right? How about this:
    [_CLDC HotSpot Implementation Architecture Guide Chapter 10_|http://java.sun.com/javame/reference/docs/cldc-hi-2.0-web/doc[_CLDC HotSpot Implementation Architecture Guide Chapter 10_|http://java.sun.com/javame/reference/docs/cldc-hi-2.0-web/doc/architecture/html/VFP.html]
    +The 1.1.3 release of CLDC HotSpot Implementation included limited VFP support. This feature was supported only when running in interpreted mode. In this release, full vector floating point support is provided when the virtual machine is running in compiled mode.+
    [_Java Virtual Machines_|http://java.sun.com/j2se/1.4.2/docs/guide/vm/index.html]
    +Adaptive compiler - Applications are launched using a standard interpreter, but the code is then analyzed as it runs to detect performance bottlenecks, or "hot spots". The Java HotSpot VMs compile those performance-critical portions of the code for a boost in performance, while avoiding unnecessary compilation of seldom-used code (most of the program). The Java HotSpot VMs also usesthe adaptive compiler to decide, on the fly, how best to optimize compiled code with techniques such as in-lining. The runtime analysis performed by the compiler allows it to eliminate guesswork in determining which optimizations will yield the largest performance benefit.+
    [_CLDC HotSpot Implementation Architecture Guide Chapter 4_|http://java.sun.com/javame/reference/docs/cldc-hi-2.0-web/doc/architecture/html/DynamicCompiler.html]
    +Two different compilers are contained in the CLDC HotSpot Implementation virtual machine: an adaptive, just-in-time (JIT) compiler and an ahead-of-time compiler. The JIT compiler is an adaptive compiler, because it uses data gathered at runtime to decide which methods to compile. Only the methods that execute most frequently are compiled. The other methods are interpreted by the virtual machine.+
    [_Java Tuning White Paper_|http://java.sun.com/performance/reference/whitepapers/tuning.html]
    +One of the reasons that it's challenging to measure Java performance is that it changes over time. At startup, the JVM typically spends some time "warming up". Depending on the JVM implementation, it may spend some time in interpreted mode while it is profiled to find the 'hot' methods. When a method gets sufficiently hot, it may be compiled and optimized into native code.+
    [_Frequently Asked Questions About the Java HotSpot VM_|http://java.sun.com/docs/hotspot/HotSpotFAQ.html]
    +Remember how HotSpot works. It starts by running your program with an interpreter. When it discovers that some method is "hot" -- that is, executed a lot, either because it is called a lot or because it contains loops that loop a lot -- it sends that method off to be compiled. After that one of two things will happen, either the next time the method is called the compiled version will be invoked (instead of the interpreted version) or the currently long running loop will be replaced, while still running, with the compiled method. The latter is known as "on stack replacement", or OSR.+
    [_Java Technology Fundamentals Newsletter Index - Making Sense of the Java Classes & Tools: Collection Interfaces, What's New in the Java SE 6 Platform Beta 2, and More_|http://java.sun.com/mailers/newsletters/fundamentals/2006/July06.html]
    +Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture neutral, portable, high- performance, multithreaded, dynamic language.+

  • Compiled language with similar feel to php?

    I have written several utilities for my album program in php,
    but this means
    that if I give them to anyone else they have to install php
    before they can use
    them on their own computers.
    I have never used C++, but the philosophy behind php seems to
    be very similar to
    that behind it (as I remember it from one or two lectures
    about 40 years ago),
    so I thought Visual C++ might be the way to go. However the
    discussions on
    several of the C++ newsgroups I have looked at recently seem
    to be coming from
    another planet.
    Can anybody suggest which language would be most suitable for
    this purpose? The
    last high-level language I was recently proficient in was
    Fortran.
    Clancy

    Clancy wrote:
    > I have written several utilities for my album program in
    php, but this means
    > that if I give them to anyone else they have to install
    php before they can use
    > them on their own computers.
    The same would be true for most compiled languages. If you
    used Java,
    for instance, they would need to install the JVM.
    > Can anybody suggest which language would be most
    suitable for this purpose? The
    > last high-level language I was recently proficient in
    was Fortran.
    If you want to display images, you might want to investigate
    ActionScript 3.0, the language used by Flash, Flex, and AIR
    (Adobe
    Integrated Runtime):
    http://labs.adobe.com/technologies/air/
    ActionScript 3.0 is an object-oriented language, which is
    compiled into
    bytecode, and runs in the Flash Player or AIR. Of course, it
    means that
    your friends would need to install the Flash Player or AIR,
    but both are
    easy to install (basically, click and you're done).
    Learning ActionScript 3.0 to display a photo gallery might
    seem like
    overkill, but I get the impression that you're more
    interested in
    building your own application, rather than using an
    off-the-shelf
    product. I have been using ActionScript 1.0 and 2.0 for
    several years
    (even written books about it), but ActionScript 3.0 is
    completely
    different. It contains a huge number of built-in classes, so
    can feel
    overwhelming to start with. However, the syntax is very easy,
    as
    everything is written in plain English, and it uses the same
    looping and
    conditional structures as PHP.
    The best way to work with ActionScript is with Flex Builder
    (a new
    version, Flex Builder 3, is due out later this year, but you
    can try it
    out as a 30-day free trial to see if it appeals to you). The
    best way to
    learn ActionScript 3.0 is with "Essential ActionScript 3.0"
    by Colin
    Moock. It has just been published by O'Reilly. I'm reading
    it, and it's
    excellent.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Suddenly, my java programs won't compile : Class not found error

    Hello, the strangest things happened on my win xp pro computer...
    My java-files wo'nt compile anymore. The compiler (javac) is complaning about classes he can't find. But these classes are in the same directory....
    Can anyone help me?

    generally female version are more complaining then the male versions!!
    if the male version is complaining then it must be something wrong in your path or classpath!!
    1) have you tried before to complie? and it has been complied successfully in past?
    2) check out your classpath.. is it containing "." ( a dot)? if not then just put a ".;" in starting of your classpath & start compiling your code in new command prompt...
    hope now your compiler will not complain... :)

  • Java is 100% pure OOPS Language or not

    Hi Everyone!
    I want to know that Java is 100% pure OOPS Language or not??
    If yes or no, then why?
    Plz reply

    Use the search window on the right side of this page. This absolutely meaningless question has been asked, and answered (argued about really) hundreds of times on this forum already.
    @mods, please lock this thread.

  • Automatic created Java file error when compile JSP file

    I got the following error message when i try to load the JSP file given below (FlightSearch.jsp). Given also below the JAVA files (flightsearch$jsp.java) created by the compiler.
    Thanks for your help
    Susan
    Error message
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:320: 'catch' without 'try'.
    } catch (Throwable t) {
    ^
    C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:328: 'try' without 'catch' or 'finally'.
    ^
    C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:328: '}' expected.
    ^
    3 errors, 1 warning
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:536)
    FlightSearch.jsp
    <%@page import="java.util.*" errorPage="ErrorHandler.jsp"%>
    <%@page import="com.client.entity.Flight"%>
    <%@page import="com.client.wsclient.FlightServiceClient"%>
    <H3>Available Flight List</H3>
    <br>We have found the following Available flight(s) : </br>
    <table border="0" cellpadding="0" cellspacing="0" width="100">
    <tr>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Flight Company</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Flight Number</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Depart From<font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrive</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Departure Date</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Departure Time</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrival Date</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrival Time</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Adult Fare</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Child Fare</font></b></td>
    </tr>
    <%
    //Get the search information
    String des = request.getParameter("DFrom");
    String arr = request.getParameter("DTo");
    String fy = request.getParameter(FYear.value);
    String fm = request.getParameter(FMonth.value);
    String fd = request.getParameter(FDay.value);
    String f1 = fy + "-" + fm;
    String FDat = f1 + "-" + fd;
    String ty = request.getParameter(TYear.value);
    String tm = request.getParameter(TMonth.value);
    String td = request.getParameter(TDay.value);
    String t1 = ty + "-" + tm;
    String TDat = t1 + "-" + td;
    String type;
    if( request.getParameter(type[0].checked))
    type = "Return";
    else
    { type = "OneWay";
    String clas;
    if(request.getParameter(clas[0].checked))
    {clas = "ECO";
    else
    {clas = "BUSS";}
    String adult = request.getParameter(Adult.value);
    String child = request.getParameter(Child.value);
    //Get the server Flight Search Service URL
    // ServerFlightSearchBO SFSBO = new ServerFlightSearchBO();
    // ServerFlightSearch FlightSearch = SFSBO.getFlightSearchURL();
    // FlightSearchServiceClient FSearchServiceClient = new FlightSearchServiceClient
    String ServerFlightServiceURL = "http://localhost:7080/AServer/services/FlightService";
    //Find available Flight
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(des, arr, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    %>
    <tr>
    <td width= "10%"><%=flt.getFlightComp()%></td>
    <td width= "10%"><%=flt.getFlightNum()%></td>
    <td width= "10%"><%=flt.getDestination()%></td>
    <td width= "10%"><%=flt.getArrive()%></td>
    <td width= "10%"><%=flt.getFrDate()%></td>
    <td width= "10%"><%=flt.getFlightDptTm()%></td>
    <td width= "10%"><%=flt.getToDate()%></td>
    <td width= "10%"><%=flt.getFlightArrTm()%></td>
    <%
    int adt, chld;
    int far_A, tot_A, far_C, tot_C;
    adt = Integer.parseInt(adult);
    far_A = flt.getAdultFr();
    tot_A = adt * far_A;
    chld = Integer.parseInt(child);
    far_C = flt.getChildFr();
    tot_C = chld * far_C;
    %>
    <td width= "10%"><%=tot_A%></td>
    <td width= "10%"><%=tot_C%></td>
    </tr>
    <%
    if(type = "Return")
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    %>
    <tr>
    <td width= "10%"><%=flt.getFlightComp()%></td>
    <td width= "10%"><%=flt.getFlightNum()%></td>
    <td width= "10%"><%=flt.getFlightDpt()%></td>
    <td width= "10%"><%=flt.getFlightArr()%></td>
    <td width= "10%"><%=flt.getFlightDptDt()%></td>
    <td width= "10%"><%=flt.getFlightDptTm()%></td>
    <td width= "10%"><%=flt.getFlightArrDt()%></td>
    <td width= "10%"><%=flt.getFlightArrTm()%></td>
    <%
    int adlt, chd;
    int fare_A, totA, fare_C, totC;
    adlt = Integer.parseInt(adult);
    fare_A = flt.getAdultFr();
    totA = adlt * fare_A;
    chd = Integer.parseInt(child);
    fare_C = flt.getChildFr();
    totC = chd * fare_C;
    %>
    <td width= "10%"><%=totA%></td>
    <td width= "10%"><%=totC%></td>
    </tr>
    <%
    %>
    </table>
    flightsearch$jsp.java
    package org.apache.jsp;
    import java.util.*;
    import com.client.entity.Flight;
    import com.client.wsclient.FlightServiceClient;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import org.apache.jasper.runtime.*;
    public class flightsearch$jsp extends HttpJspBase {
    static {
    public flightsearch$jsp( ) {
    private static boolean jspxinited = false;
    public final void jspxinit() throws org.apache.jasper.runtime.JspException {
    public void _jspService(HttpServletRequest request, HttpServletResponse response)
    throws java.io.IOException, ServletException {
    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    String _value = null;
    try {
    if (_jspx_inited == false) {
    synchronized (this) {
    if (_jspx_inited == false) {
    jspxinit();
    jspxinited = true;
    _jspxFactory = JspFactory.getDefaultFactory();
    response.setContentType("text/html;ISO-8859-1");
    pageContext = _jspxFactory.getPageContext(this, request, response,
    "ErrorHandler.jsp", true, 8192, true);
    application = pageContext.getServletContext();
    config = pageContext.getServletConfig();
    session = pageContext.getSession();
    out = pageContext.getOut();
    // HTML // begin [file="/client/flightsearch.jsp";from=(0,59);to=(1,0)]
    out.write("\r\n");
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(1,43);to=(2,0)]
    out.write("\r\n");
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(2,58);to=(19,0)]
    out.write("\r\n\r\n<H3>Available Flight List</H3>\r\n<br>We have found the following Available flight(s) : </br>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100\">\r\n <tr>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Flight Company</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Flight Number</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Depart From<font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrive</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Departure Date</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Departure Time</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrival Date</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrival Time</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Adult Fare</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Child Fare</font></b></td>\r\n </tr>\r\n");
    // end
    // begin [file="/client/flightsearch.jsp";from=(19,2);to=(66,0)]
    //Get the search information
    String des = request.getParameter("DFrom");
    String arr = request.getParameter("DTo");
    String fy = request.getParameter(FYear.value);
    String fm = request.getParameter(FMonth.value);
    String fd = request.getParameter(FDay.value);
    String f1 = fy + "-" + fm;
    String FDat = f1 + "-" + fd;
    String ty = request.getParameter(TYear.value);
    String tm = request.getParameter(TMonth.value);
    String td = request.getParameter(TDay.value);
    String t1 = ty + "-" + tm;
    String TDat = t1 + "-" + td;
    String type;
    if( request.getParameter(type[0].checked))
    type = "Return";
    else
    { type = "OneWay";
    String clas;
    if(request.getParameter(clas[0].checked))
    {clas = "ECO";
    else
    {clas = "BUSS";}
    String adult = request.getParameter(Adult.value);
    String child = request.getParameter(Child.value);
    //Get the server Flight Search Service URL
    // ServerFlightSearchBO SFSBO = new ServerFlightSearchBO();
    // ServerFlightSearch FlightSearch = SFSBO.getFlightSearchURL();
    // FlightSearchServiceClient FSearchServiceClient = new FlightSearchServiceClient
    String ServerFlightServiceURL = "http://localhost:7080/AServer/services/FlightService";
    //Find available Flight
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(des, arr, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(66,2);to=(68,18)]
    out.write("\r\n<tr>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(68,21);to=(68,40)]
    out.print(flt.getFlightComp());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(68,42);to=(69,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(69,21);to=(69,39)]
    out.print(flt.getFlightNum());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(69,41);to=(70,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(70,21);to=(70,41)]
    out.print(flt.getDestination());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(70,43);to=(71,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(71,21);to=(71,36)]
    out.print(flt.getArrive());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(71,38);to=(72,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(72,21);to=(72,36)]
    out.print(flt.getFrDate());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(72,38);to=(73,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(73,21);to=(73,41)]
    out.print(flt.getFlightDptTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(73,43);to=(74,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(74,21);to=(74,36)]
    out.print(flt.getToDate());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(74,38);to=(75,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(75,21);to=(75,41)]
    out.print(flt.getFlightArrTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(75,43);to=(76,1)]
    out.write("</td>\r\n ");
    // end
    // begin [file="/client/flightsearch.jsp";from=(76,3);to=(87,1)]
    int adt, chld;
    int far_A, tot_A, far_C, tot_C;
    adt = Integer.parseInt(adult);
    far_A = flt.getAdultFr();
    tot_A = adt * far_A;
    chld = Integer.parseInt(child);
    far_C = flt.getChildFr();
    tot_C = chld * far_C;
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(87,3);to=(88,18)]
    out.write("\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(88,21);to=(88,26)]
    out.print(tot_A);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(88,28);to=(89,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(89,21);to=(89,26)]
    out.print(tot_C);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(89,28);to=(91,0)]
    out.write("</td>\r\n</tr>\r\n");
    // end
    // begin [file="/client/flightsearch.jsp";from=(91,2);to=(100,0)]
    if(type = "Return")
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(100,2);to=(102,18)]
    out.write("\r\n<tr>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(102,21);to=(102,40)]
    out.print(flt.getFlightComp());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(102,42);to=(103,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(103,21);to=(103,39)]
    out.print(flt.getFlightNum());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(103,41);to=(104,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(104,21);to=(104,39)]
    out.print(flt.getFlightDpt());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(104,41);to=(105,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(105,21);to=(105,39)]
    out.print(flt.getFlightArr());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(105,41);to=(106,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(106,21);to=(106,41)]
    out.print(flt.getFlightDptDt());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(106,43);to=(107,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(107,21);to=(107,41)]
    out.print(flt.getFlightDptTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(107,43);to=(108,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(108,21);to=(108,41)]
    out.print(flt.getFlightArrDt());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(108,43);to=(109,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(109,21);to=(109,41)]
    out.print(flt.getFlightArrTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(109,43);to=(110,1)]
    out.write("</td>\r\n ");
    // end
    // begin [file="/client/flightsearch.jsp";from=(110,3);to=(120,1)]
    int adlt, chd;
    int fare_A, totA, fare_C, totC;
    adlt = Integer.parseInt(adult);
    fare_A = flt.getAdultFr();
    totA = adlt * fare_A;
    chd = Integer.parseInt(child);
    fare_C = flt.getChildFr();
    totC = chd * fare_C;
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(120,3);to=(121,18)]
    out.write("\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(121,21);to=(121,25)]
    out.print(totA);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(121,27);to=(122,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(122,21);to=(122,25)]
    out.print(totC);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(122,27);to=(124,0)]
    out.write("</td>\r\n</tr>\r\n");
    // end
    // begin [file="/client/flightsearch.jsp";from=(124,2);to=(126,0)]
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(126,2);to=(127,8)]
    out.write("\r\n</table>");
    // end
    } catch (Throwable t) {
    if (out != null && out.getBufferSize() != 0)
    out.clearBuffer();
    if (pageContext != null) pageContext.handlePageException(t);
    } finally {
    if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);

    i am very glad and appreciate for your help, but i would like to know how to get the value of a radio button.
    like in another JSP file i have :
    <input type="radio" name="type" value="Return" checked>
    Return
    <input type="radio" name="type" value="OneWay">
    One Way
    and when i try to get the value which is checked, i put
    String type = request.getParameter(type.checked);
    but this doesn't work,
    i would be very appreciate for your help. Thank you

  • Is Java 100% Object oriented programming language?

    Hi,
    Is java 100% Object orinented programming language?
    If not then what is the reason?
    Thanks in advance

    Object oriented paradigm of programming says that everything in a programming world should felt like object mean: - "Abstract and Encapsulated" The paradigm is not completely satisfied by Java. Some of the feature that makes such violation are 1. Existence of primitives, which are manipulated in ordinary style. 2. Existence of mathematical operator handled also not like objects. These two essential characteristics make Java somewhat what is the question. But here again Java is big winner to make presence of wrapper classes to wrap up this difficulty or adaption. Moreover in Java 1.5 you will feel more free because of auto-boxing feature that make auto conversion of object to primitive and primitive to object.
    Regards,
    Mohd.Rafi Ansari
    Jamia Hamdard
    MCA
    09213626363

  • Exception in thread "main" java.lang.Error: Unresolved compilation problem

    The following code:
         public boolean find(MusbachJ_Person person,BstNode node)
              //p.l(person);p.l(node.intData);
              if(node.intData.compareTo(person)==0)
                   return true;
              if( node.leftNode != null ) find(person,node.leftNode );
              if( node.rightNode != null ) find( person, node.rightNode);
              else
                   return false;
         }returns the following compilation error:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         This method must return a result of type boolean
         at MusbachJ_TreeNode.find(MusbachJ_TreeNode.java:32)
         at MusbachJ_PeopleTree.main(MusbachJ_PeopleTree.java:91)
    But I don't understand, the else statement is right there, what more does it want? Thanks! :)

    John_Musbach wrote:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: Unresolved compilation problem is an error that you'll only ever see if you're using an IDE. If you used the javac compiler, then you would have seen that the code doesn't even compile.
    The reason (as others have pointed out) is, that some paths through your method don't return a value.
    I'll re-write your code in the code-style that I usually use, because then it might be easier for you to see the problem:
    public boolean find(MusbachJ_Person person,BstNode node)
         if(node.intData.compareTo(person)==0) {
              return true;
         if( node.leftNode != null ) {
              find(person,node.leftNode );
         if( node.rightNode != null ) {
              find( person, node.rightNode);
         else {
              return false;
    }There are two prolbems. I'll spell out the first and let the other one for you to find:
    1.) you don't do anything with the return-values of the find-methods you are calling. What do you want to do with them?
    2.) What do you return if the current node is not the one that you want and you've got a right node?

  • Do java programms after giving compilation error generates .class file?

    Do java programms after giving compilation error generates the .class file?
    Do any outer class may have the private as access modifier?
    If someone asks you that -do any program in java after giving a compilation error gives the .class file -do any class except(inner class)
    be defined as private or static or protected or abc or xxx Now type the
    following program
    private class test
    public static void main(String s[])
    System.out.println("Hello!How are You!!");
    -Compile it.... You must have
    received this error test.java:1:The type type can't be private. Package members are always accessible within the current package. private class
    test ^ 1 error
    Here please notify that compiler has given the
    error not the warning therfore .class file should not be created but now type
    >dir *.class
    ___________ and you will see that the
    test.class file existing in the directory nevertheless this .class file
    is executable. if you will type __________________ >java test
    it will
    wish you Hello! and suerly asks you that How are You!! ________________!
    You can test it with the following as acces modifiers and the progrm will run Ofcourse it will give you compilation error.
    protected
    xxx
    abc
    xyz
    private
    Do you have any justification?

    Hmm,
    I've been working with different versions of jdk since, if I'm not mistaken, jdk1.0.6 and never was able to get *.class with compilation errors. It was true for Windows*, Linux, and Solaris*.
    About the 'private'/'protected' modifier for the type (class) - it makes perfect sence not to allow it there: why would anyone want to create a type if no one can access it? There should be a reason for restricting your types - let's say, any inner class can be private/protected.
    For ex., you shouldn't have compile problems with this:
    class Test
    public static void main(String s[])
    System.out.println("Hello!How are You!!");
    private class ToTest{}
    Sorry, but I don't really know where you can read up on that.

  • Finding java version used from compiled code

    Is there a way to find the java version used to compile the java file from the compiled files,i.e., class files?

    that information is encapsulated within the .class file, I don't think so.
    The class file has a minor_version/major_version field.
    However using jikes and sun jdk 1.3.1 both produce a version number of 45.3. According to a footnote in the JVM spec that corresponds to a class file format for java of 1.0.2. And both obviously are newer than that version of java.
    Based on that I don't think one can expect those numbers to changed based on the java version but rather on any changes in the class file itself.

  • Java.io.IOException: JDT compilation error!

    Dear All,
    I am trying to deploy my ejb 3.0 jar application into Weblogic 10.3 server. I getting the following exception.
    An error occurred during activation of changes, please see the log for details.
    Exception preparing module: EJBModule(JDOL_DOLServerAdmin) Unable to deploy EJB: JDOL_DOLServerAdmin.jar from JDOL_DOLServerAdmin.jar: There are 1 nested errors: java.io.IOException: JDT compilation error! at
    weblogic.ejb.container.ejbc.CompilerForJDT.compile(CompilerForJDT.java:66) at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:357) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:552) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:519) at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:393) at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:715) at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:618) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1154) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:425) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    JDT compilation error!
    My working environment :
    Eclipse with Weblogic server 10.3 / XP
    Please help me to solve these issue.
    regards
    Muruganandam.n

    Maybe your EJB have static methods. Remove the 'static' modifier and retry.

  • Why would you think java is a better beginner language then c/c++ ???.

    Why would you think java is a better beginner language then c/c++.That is if you think it is

    1.)because it stear's you towards useing oop style programing.
    since nearly everything relate's to object oriented programing.
    2.)this forum alone. is a reason thier are comprehensive example's for beginers. and so many people many very freindly and dont mind answering a question. Other beginners are here also who share what they know with each other.
    3.)learing curve for useing the language and geting started immediately is good.
    4.)once you learn java and then goto c++ you have another probably better perspective on how to code.
    5.)codeing in java avoids deconstructors pointers and direct manipulation of reference's. which can be very confuseing for beginers
    and deals with variables that directly point to the computer's memory.
    and proper deallocation of memory.
    though im just a begginer myself i started trying c++ and switched to java.
    however thier are somethings in java that can be as complex as c++
    when pointers or reference's are needed but not available.

  • Java JDK versions and compilation levels

    Hi,
    I have a question about differents java versions and the compilance level. As far as I know, if I am developing an application, for example a swing application or a JSF web project, that will be deployed to run in a JVM 1.6, I must compile my code with similar JDK, in this case, I must compile my code with a 1.6 JDK.
    But, for example, can I use JDK 1.7 with compilance level 1.6 to run code under 1.6 virtual machine?
    Suppose a JSF web project compiled with JDK 1.7 and source level 1.6 can be deployed on a tomcat that run in a 1.6 VM?
    If that is correct, I think that I should always get the last JDK version installed in my computer and choose the different compilance level (example 1.4, 1.5, 1.6 or 1.7) to compile my code based on the target JVM, is that correct?
    Thanks for your help, regards.

    kerule wrote:
    If my project will be executed on a JVM 1.4, I must have installed in my computer a JDK 1.4 and the project must be compiled with 1.4 JDK
    If my project will be executed on a JVM 1.6, I must have installed in my computer a JDK 1.6 and the project must be compiled with 1.6 JDK
    If my project will be executed on a JVM 1.7, I must have installed in my computer a JDK 1.7 and the project must be compiled with 1.7 JDK
    Correct?Yes, and NO: the problem with what you said is "must be". If you compile with 1.7, but use objects that are backwardly compatible with 1.4, then it will work in 1.4 onward, but if you use features of 1.7 that are not compatible or possibly not available in 1.4, then you will not run in 1.4.
    Your statements:
    If my project will be executed on a JVM 1.4, I must have installed in my computer a JDK 1.4 and the project must be compiled with 1.4 JDK
    If my project will be executed on a JVM 1.6, I must have installed in my computer a JDK 1.6 and the project must be compiled with 1.6 JDK
    If my project will be executed on a JVM 1.7, I must have installed in my computer a JDK 1.7 and the project must be compiled with 1.7 JDKare safe, except where/if inconsistancies exist between versions.

  • Java 1.4.2 shows language for system

    Hi
    Java 1.4.2_01 chooses the language for the system and not for the user.
    After installing Java 1.4.2 on my Japanese Windows 2000 professional system all the menus show up in Japanese.
    I have chosen English as my local user language and would expect the language to change to that.
    The compiler output is also in Japanese.
    Any ideas on how to change that back to English like in the version before 1.4.2??
    Regards,
    Lars

    I looks as if someone already enter a bug in the bug parade for this.
    http://developer.java.sun.com/developer/bugParade/bugs/4886939.html
    Does anyone have some status updated on when this will be fixed?
    Are there any other bugs like this one reported?
    Lars

  • Custom Compiler Language

    I create my own texteditor,the plan is i want to trap the error message that generate from the java compiler to my language, so i can display the error message with my own words (not an exception errors)..
    What should i do, to solve this?
    Thanks...

    Learn English first and then try to word your question in gramatically and syntactically correct language.Maybe then someone will understand what you're trying to achieve.
    I think u dont have skills to solve this? i think u're not an good answer on every forum you joined, am i right?
    My question is, When u're compiling your program, and there's error on your code, java compiler generates an error message, is that anyway or how to change this message or how to trap this message, so i can change into my own words? understood....
    if u dont, i dont know how to speak with the alien language....
    thanks to everyone who tried answer this...
    Bonjour....

Maybe you are looking for