Import a java file?

Hi,
I created a StockTablePanel.java file, and then compiled it fine.
Then, I wrote in a new file, StockTableTabPanel.java, the followings:
//top:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
// Import our other components
import StockTablePanel;
(other code)
It failed in compile, and the error is:
'.' expected
import StockTablePanel;
^
What is the problem and its solution?
Thanks a lot.

the correct syntax is:
import your.domain.name.projectname..StockTablePanel;and you also have to store your class StockTablePanel in this package:
package your.domain.name.projectname; //define package name for this class
public class StockTablePanel {
}See also the chapter "Packages" in the Java Language Specification: http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#60384

Similar Messages

  • Imports (importing other java files)

    Hi there. this is sorta urgent.
    It works at uni, but not here, don't know why.
    I am using JDK 1.4.1_01 and jcreater lite as an IDE
    I have made a program, its for the course, but everytime I compile it says that the packages could not be found.
    for example:
    import Date.java;
    import Calander.java;
    public class mainapplication {
         public static void main(String[] args)
    ..It gives me an error:
    C:\coursework2\mainapplication.java:16: package Date does not exist
    import Date.java;
    ^
    C:\coursework2\mainapplication.java:17: package Calander does not exist
    import Calander.java;
    ^
    C:\coursework2\Date.java:15: package Calander does not exist
    import Calander.java;
    ^
    3 errors
    And if I take out the .java; from the imports commands, then it still won't compile, saying it's expecting a '.'!
    What should I do? I even tried going into MSDOS and typing javac mainapplication.java but i still get the same errors
    Please help, I know it's a simple solution, but need your help.
    Thanks

    It works at uni, but not here, don't know why.
    It does not work at uni, if you don't believe me go test it.
    The "import" statement only gives you the option to use short names for classes. Thanks to it you don't need to type the fully qualified class name, such as "javax.security.auth.kerberos.KerberosKey", every time you want to use the class ("KerberosKey"). It only exists to help you, the programmer, write shorter code and type less.
    That said, you cannot "import java files". It just makes no sense.
    Date and Calendar are both in the package java.util, maybe you want to "import java.util.Date" and "import java.util.Calendar".
    Hi there. this is sorta urgent.
    I hate people who use that word...

  • JBuilder question on how to add a new .java file

    I am new to Java and even newer to JBuilder. I am creating the GUI for our school project and my other members are creating the networking and database parts of our program seperatly. I am at the point were I need to import their .java files into my project I created in JBuilder.
    Can someone tell me the steps I need to take to get those files into my project so I can start using the classes from my group they made up?
    Thanks,
    Scott

    You can use show_alert statement and then make a check on button that is pressed from the alert.
    Here is an example of show_alert built_in.
    DECLARE
      my_alert number;
      ALERT_TXT     VARCHAR2(200) := 'Do you want to delete record?';
    BEGIN
         set_alert_property('your_alert',ALERT_MESSAGE_TEXT,ALERT_TXT);
           my_alert := show_alert('your_alert');
           If my_alert = Alert_Button1 Then
             /** I choose to delete record **/
            -- here you can put your statements
           else
           -- I pressed NO button
           -- here you can put your statements
           end if;
    END;Hope it helps you,
    Fabrizio
    If this answer is helpful or correct, please mark it. Thanks.

  • Register a java file in apps

    Hi,
    I need to call a java file when i click on the function(responsibility-->menu-->function) in EBS.
    How?
    Best Regards,
    Palepu

    Hi,
    You have any oaframework page and from the link you want to call this java file,
    or directly from the menu - function you want to call the java file.
    In APPS normally there will not be any direct call to java file(.class), it will be called inside a OAFramework page file (click a link or button or inside some validation process)
    or have a simple .jsp file and import the java file and use it in that .jsp file.
    For the defn of .jsp file you can run the below query and get sample function defns.
    select function_name, web_html_call from fnd_form_functions
    where web_html_call like '%.jsp%' and web_html_call not like '%OA.jsp%'
    Thanks,
    With regards,
    Kali.
    OSSi.

  • Import tablesorter.java

    Hello,
    i'm a newbie and it is highly probable that it is easy for you. I will import some *.java-Files, but how can i do that?
    Thanks,
    Peter

    hi peter,
    Go through this
    /people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5996f
    Thanks&Regards
    SureshKumar T

  • Import statement in .java files and .jsp files

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import the class I want to use.That is i have to say
    <%@page import="one"%>
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.
    In this case the pSo I am wondering in JSP why it doesn't take the class I am looking for from the classpath .
    Help.

    You have to understand Java scoping rules. In the 1st scenario with the two Java files I am guessing neither one of them begins with a package statement. This means that they belong to the default package. When you compile the compiler uses the classpath to resolve method calls looking in the default package since there was no import statement specified in two.java. JSP is a little different. Now I just read this here in these forums a couple of days ago. Since the classfiles generated from the JSP files are not in the CLASSPATH they are loaded by a different classloader. This is why you have to import all references to all classes in the default package.

  • Import statement in .java files and .jsp files ..correction

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement in two.java I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import one.class in My.jsp .That is i have to say
    <%@page import="one"%>
    in My.jsp.
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder and MyJsp is compiled sucessfully.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.

    It has to do with packages. Most java classes are in a package, the name of which must conform to its place on the filesystem relative to the classpath. By that I mean that if you have com.mystuff.One.java, it must be in a folder com/mystuff where com is located somewhere in the classpath.
    What you've done is a little different. I'm assuming a couple of things:
    1. you have no package declaration at the top of one.java or two.java
    2. you have the current directory "." in your classpath.
    Java has the concept of the "default package", which covers classes without a declared package, and in your case is the current directory.
    So when you're in c:\sourcefolder and run the compiler, then "."="c:\sourcefolder", and that directory is part of the default package. No import statements are necessary for classes that are in the same package. This is why two.java can call methods in one.java without an import statement.
    When you run your jsp, the "current directory" part of your classpath is not c:\sourcefolder, but some other value (probably the directory you start your jsp engine from) You will have to import all non-java-library classes because the jsp itself becomes a java class, with a package that is determined by the jsp engine.

  • Cannot import self-defined .java files?

    Hi,
    I created a MouseHandler.java file that contains a class (without main() ). and I have another appletcode.java file that needs to import it:
    import MouseHandler;
    I tried to javac appletcode.java and it said it couldn't find the package MouseHandler but I didn't package it in the first place.
    I tried JBuilder to compile it and it too gave:
    "Class required but identifier found at line 1, column 1"
    How do I import my source file(if it is possible)?
    Thanks.

    As it stands, if the compiled .class file is in the
    same directory as your program, it should run fine
    without the import statement. Notice, the import is
    failing, but your references to it aren't?It's in the same directory. I took out the import statement and it gave error:
    class MouseHandler not found in class appletcode at line ..., column ..
    PS: this code is actually from Beginning Java 2 by Wrox. Since mine couldn't work, I downloaded their code. Their code didn't contain the import statement (which should work like you said), but when I compile their code, it gave the same error as above too.
    Assuming that code and directory is correct, is there any other possible reasons why this is happening?
    Thank you

  • Unable to import a java class in a jsp file

    Hi,
    I am trying to import a java class in my jsp.
    ------------------jsp---------------
    <jsp:useBean id="form" class="com.company.portlets.searchApps.object.SearchOBJ" scope="request" />
    <jsp:setProperty name="form" property="*" />
    <input type="TEXT" name="projectID" value='<%= form.getProjectID() %>'>
    When I run the above JSP, it says that class 'com.company.portlets.searchApps.object.SearchOBJ' cannot be found.
    Why?
    My project structure looks like this:
    Project
    +Application Sources
    ++com.company.portlets.searchApps.object
    +++SearchOBJ.java
    +Web Content
    ++htdocs
    +++searchappsportlet
    ++++SearchAppsPortletShowPage.jsp
    ++WEB-INF
    +++index.jsp
    +Resources
    ++SearchApps.deploy
    Please advice...thanks!

    The way that JDeveloper organized the files was like this:
    C:\jdev1012\jdev\mywork\WksSearchApps\Project\classes\com\company\portlets\searchAPPS\object\SearchOBJ.class
    I am assuming that JDeveloper puts the file where they are suppose to be...if not, how do I change that?
    thanks,
    hussain

  • Java File Missing while import

    Hi,
       When I try to import a project into the workspace, only one java file is missing(showing error : R3View does not exist).
       Before I import the project, the folder contains that java file in gen_wdp folder. but after import, it doesnt. It automatically got deleted. I dint know how it happens. I have taken one copy of that java file. So I have created a new java file(R3View.java) in gen_wdp folder and copied the code. Now it works fine. I have taken this backup folder.
      When I try to import it next time, the same problem exists. Actually the folder contains all the java files before import.
    Why this problem occurs? Kindly help me out.
    Regards,
    Kalai

    Hi,
    As abhilash stated the folder gen_wdp always have generated code based upon web dynpro metadata.
    You cann't contribute code by placing any souce file in this directory. That you have to do in some source directory that is generally "src\packages".
    If you place code in gen_wdp folder and reload the project, do a dc build, or simple project build ....... the file will get deleted.
    Regards,
    Ashwani Kr Sharma

  • Import Package problems and error in the Java file created in runtime

    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);

    You are missing a closing parens. You have :
    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()){Which opens two parens but you only have one closing parens
    </tr>
    <%
    %>
    </table>

  • Java 3d ...cannot import a 3ds file ..only works with a .obj

    Here is a world i have written in java 3d
    I can import a .obj file into this world but i want to import a file called Flipp.3ds but it keeps giving me an error
    Here is the complete class ..... Can anyone help
    Im pretty new to java 3d
            import java.io.*;
            import com.sun.j3d.utils.behaviors.vp.*;
            import java.net.URL;
            import java.net.MalformedURLException;
            import javax.media.j3d.*;
            import javax.vecmath.*;
            import java.awt.*;
            import java.awt.event.*;
            import com.sun.j3d.utils.behaviors.keyboard.*;
            import com.sun.j3d.utils.geometry.*;
            import java.applet.Applet;
            import java.awt.BorderLayout;
            import java.awt.event.*;
            import java.awt.GraphicsConfiguration;
            import com.sun.j3d.utils.applet.MainFrame;
            import com.sun.j3d.utils.geometry.*;
            import com.sun.j3d.utils.universe.*;
            import com.sun.j3d.utils.image.*;
            import com.sun.j3d.loaders.objectfile.ObjectFile;
            import com.sun.j3d.loaders.ParsingErrorException;
            import com.sun.j3d.loaders.IncorrectFormatException;
            import com.sun.j3d.loaders.Scene;
            import javax.vecmath.*;
            public class Assign2 extends Frame implements ActionListener {
                    protected Canvas3D myCanvas3D = new Canvas3D(null);
                    protected Button exitBt = new Button("Exit");
                    protected BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
                    private boolean spin = true;
                    private double creaseAngle = 60.0;
                    private String filename;
            // Lights
                   * This adds a continuous background sound to the branch group.
                   * @param b BranchGroup to add the sound to.
                   * @param soundFile String that is the name of the sound file.
                  protected void addBackgroundSound (BranchGroup b,String soundFile)
                            //Create a media container to load the file
                            MediaContainer droneContainer = new MediaContainer(soundFile);
                            //Create the background sound from the media container
                            BackgroundSound drone = new BackgroundSound(droneContainer,1.0f);
                            //Activate the sound
                            drone.setSchedulingBounds(bounds);
                            drone.setEnable(true);
                            //Set the sound to loop forever
                            drone.setLoop(BackgroundSound.INFINITE_LOOPS);
                            //Add it to the group
                            b.addChild(drone);
                  protected void addLights(BranchGroup b)
                            Transform3D dirLightsXfm = new Transform3D();
                            dirLightsXfm.set(new Vector3d(-1.5,0.0,0.0));
                            TransformGroup dirLights = new TransformGroup(dirLightsXfm);
                            dirLights.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
                            dirLights.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
                            // Create a bounds for the background and lights
                            // Set up the global lights
                            Color3f ambLightColour = new Color3f(1.0f, 1.0f, 0.4f);
                            AmbientLight ambLight = new AmbientLight(ambLightColour);
                            ambLight.setInfluencingBounds(bounds);
                            Color3f dirLightColour = new Color3f(0.0f, 1.0f, 0.0f);
                            Vector3f dirLightDir  = new Vector3f(-1.0f, -1.0f, -1.0f);
                            DirectionalLight dirLight = new DirectionalLight(dirLightColour, dirLightDir);
                            dirLight.setInfluencingBounds(bounds);
                            dirLights.addChild(ambLight);
                            dirLights.addChild(dirLight);
                            b.addChild(dirLights);
                            if (spin)
                                    Transform3D yAxis = new Transform3D();
                                    Alpha rotationAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE,
                                                                                      0, 0,
                                                                                      1500, 0, 0,
                                                                                      0, 0, 0);
                                    //attach to lights
                                    RotationInterpolator rotator =
                                         new RotationInterpolator(rotationAlpha, dirLights, yAxis,
                                                                                   0.0f, (float) Math.PI*2.0f);
                                    rotator.setSchedulingBounds(bounds);
                                    b.addChild(rotator);
                  // Content Branch
                  protected BranchGroup buildContentBranch()
                            //Create the appearance for the cube
                            Appearance app1 = new Appearance();
                            Appearance app2 = new Appearance();
                            Color3f ambientColour1 = new Color3f(0.0f,0.0f,1.0f);
                            Color3f ambientColour2 = new Color3f(0.0f,0.0f,0.0f);
                            Color3f emissiveColour = new Color3f(0.0f,0.0f,0.0f);
                            Color3f specularColour = new Color3f(1.0f,1.0f,1.0f);
                            Color3f diffuseColour1 = new Color3f(1.0f,1.0f,0.0f);
                            Color3f diffuseColour2 = new Color3f(1.0f,1.0f,0.0f);
                            float shininess = 10.0f;
                            app1.setMaterial(new Material(ambientColour1,emissiveColour,diffuseColour1,specularColour,shininess));
                            app2.setMaterial(new Material(ambientColour2, emissiveColour,diffuseColour2,specularColour,shininess));
                            //import the object...
                            filename = "Flipp.max";
                            int flags = ObjectFile.RESIZE;
                            ObjectFile f = new ObjectFile(flags,
                                      (float)(creaseAngle * Math.PI / 180.0));
                            Scene s = null;
                                    try
                                            s = f.load(filename);
                                    catch (FileNotFoundException e)
                                            System.err.println(e);
                                            System.exit(1);
                                    catch (ParsingErrorException e)
                                            System.err.println(e);
                                            System.exit(1);
                                    catch (IncorrectFormatException e)
                                            System.err.println(e);
                                            System.exit(1);
                            BranchGroup contentBranch = new BranchGroup();
                            addLights(contentBranch);
                            //Position the Woman
                            Transform3D groupXfm = new Transform3D();
                            groupXfm.set(new Vector3d(0.0,0.0,0.0));
                            TransformGroup group = new TransformGroup(groupXfm);
                            group.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
                            group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
                            // Adding to the Content Branch
                            group.addChild(s.getSceneGroup());
                            contentBranch.addChild(group);
                            BoundingSphere movingBounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 300.0);
                            BoundingLeaf boundLeaf = new BoundingLeaf(movingBounds);
                            KeyNavigatorBehavior keyNav = new KeyNavigatorBehavior(group);
                            keyNav.setSchedulingBounds(movingBounds);
                            group.addChild(keyNav);
                            Transform3D floorXfm = new Transform3D();
                            floorXfm.set(new Vector3d(0.0,-1.5,-1.4));
                            TransformGroup floor = new TransformGroup(floorXfm);
                            floor.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
                            floor.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
                            Box theFloor = new Box(3.0f,0.0f,3.0f,app2);
                            floor.addChild(theFloor);
                            contentBranch.addChild(floor);
                            return contentBranch;
                    // View Branch
                    protected BranchGroup buildViewBranch(Canvas3D c)
                            BranchGroup viewBranch = new BranchGroup();
                            Transform3D viewXfm = new Transform3D();
                            viewXfm.set(new Vector3f(0.0f,0.0f,10.0f));
                            TransformGroup viewXfmGroup = new TransformGroup(viewXfm);
                            viewXfmGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
                            viewXfmGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
                            BoundingSphere movingBounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 300.0);
                            BoundingLeaf boundLeaf = new BoundingLeaf(movingBounds);
                            ViewPlatform myViewPlatform = new ViewPlatform();
                            viewXfmGroup.addChild(boundLeaf);
                            PhysicalBody myBody = new PhysicalBody();
                            PhysicalEnvironment myEnvironment = new PhysicalEnvironment();
                            viewXfmGroup.addChild(myViewPlatform);
                            viewBranch.addChild(viewXfmGroup);
                            View myView = new View();
                            myView.addCanvas3D(c);
                            myView.attachViewPlatform(myViewPlatform);
                            myView.setPhysicalBody(myBody);
                            myView.setPhysicalEnvironment(myEnvironment);
                            return viewBranch;
                    // Exit Button - dispose of system
                    public void actionPerformed(ActionEvent e)
                                    dispose();
                                    System.exit(0);
                    public Assign2()
                            VirtualUniverse myUniverse = new VirtualUniverse();
                            Locale myLocale = new Locale(myUniverse);
                            myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
                            myLocale.addBranchGraph(buildContentBranch());
                            setTitle("John (Sean) Gleeson 100437719");
                            setSize(600,600);
                            setLayout(new BorderLayout());
                            Panel bottom = new Panel();
                            bottom.add(exitBt);
                            add(BorderLayout.CENTER, myCanvas3D);
                            add(BorderLayout.SOUTH, bottom);
                            exitBt.addActionListener(this);
                            setVisible(true);
                    public static void main(String[] args)
                              Assign2 demo = new Assign2();
            Thanks,
    Sean

    My guess is that you are using the ObjectFile loader, which is for a (don't remember which application) object (.obj) file, rather than using a 3ds loader, which would be for loading a .3ds file.
    You might want to go to this page: http://www.j3d.org/utilities/loaders.html and download the correct loader.

  • CVS imports Java files but they do not appear!!

    Hi all,
    I am starting to use CVS and was able to set up the server import the project and to check it out and everything seems to work fine !!! But unfortunatly the java files that are imported do not appear in the application navigator. The folder in which they are normally contained appears but it seems to be empty. Also when i run my pages the code contained in the java files is executed but i cannot go and modify it !
    do you have any advices? please
    Regards,
    Carl

    hi Brenden,
    thx again for your reply,
    I have tryied opening closing re-importing the project always unsuccesfully!
    I tried the Project Content setting for my project and i was able to have some of the files to appear. but it never goes into the sub-directories even if the option is checked I really find this weird. Just to know if i try the same project with the same options all the java files are there!! so it is related to CVS.
    Regards,
    Carl

  • Importing java files

    Hey all,
    I created two seperate objects in two seperate java files. Now I want to "#include" them into a third java object. How is this done in java?
    Thanks,
    Wali

    If they're in the same package, nothing. If they're in different packages, use the import statement; e.g.: import path.to.yourpackage.*;

  • Import a biar file into a specific folder in CMS through java sdk

    Hi,
    How to import a biar file into a specific folder in CMS through java sdk?
    Can anyone help.
    Regards,
    Kavitha S

    Hi Kavitha,
    Have a look at the sample available at
    http://scn.sap.com/docs/DOC-6006, for importing a biar file using java sdks.
    As far as I am aware of, you would not be able to import the contents of a biar file to a specific folder.
    Why would you want to use a biar file to import contents to a different folder?
    Organize>Move functionality from CMC/Infoview/BILaunchpad can work for this.
    -Prithvi

Maybe you are looking for

  • SAP userid password cracking tool?

    hi - can anyone confirm if SAP has a tool/utility they can use to crack a password - we have a situation where it is much easier for us if we could have them help us determine what a password is for an ALE user than changing it and aligning the new p

  • Blurred photos in imoview slideshow

    I am making a slide show in imovie (version 10.04).  Each photo displays for 4 seconds.  3 of about 60 photos appear blurred. However when I hit the spacebar to freeze the movie the blurred photo goes back into focus.  Can you help me ensure the phot

  • AME failed to install with my other Products

    I have the whole Adobe master Collection CS5 and i had uninstalled media encoder by mistake and now I cant re-install it. I'm getting "Error Code: U44M2P29 - Adobe Media Encoder CS5.5 has been moved or deleted improperly. Please launch or reinstall t

  • Mhtml web archieve format problem in gmail

    Hello all i have created a subscription which is sending a report as an email in mhtml web archive format because i wanted it to use in body  instead of attachment to web mail user.. Format displays in outlook and yahoo mail too. only problem in gmai

  • Migrate Songs from Old iPod to New

    Hi, Is it possible to buy an iPod 30GB, and move existing songs from an iPod Mini to the new iPod? (Or do it from the computer hard drive, recently switched from PC to iMac). I'm thinking of this as an option vs. buying an add-on battery, or sending