Where to put the class?

Ok EasyIn class can help me convert a string into an int, I will need it for this problem.
The code for EasyIn is as follows, and i need to put it into my AirplaneListTester class, but where do I put it?
EasyIn class
// EasyIn.java
import java.io.*;
public abstract class EasyIn
static String s = new String();
static byte[] b = new byte[512];
static int bytesRead = 0;
public static String getString()
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
s=s.trim();
ok = true;
catch(IOException e)
System.out.println(e.getMessage());
     return s;
public static int getInt()
int i = 0;
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
i = Integer.parseInt(s.trim());
ok = true;
catch(NumberFormatException e)
System.out.println("Make sure you enter an integer");
catch(IOException e)
System.out.println(e.getMessage());
return i;
public static byte getByte()
byte i = 0;
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
i = Byte.parseByte(s.trim());
ok = true;
catch(NumberFormatException e)
System.out.println("Make sure you enter a byte");
catch(IOException e)
System.out.println(e.getMessage());
return i;
public static short getShort()
short i = 0;
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
i = Short.parseShort(s.trim());
ok = true;
catch(NumberFormatException e)
System.out.println("Make sure you enter a short integer");
catch(IOException e)
System.out.println(e.getMessage());
return i;
public static long getLong()
long l = 0;
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
l = Long.parseLong(s.trim());
ok = true;
catch(NumberFormatException e)
System.out.println("Make surre you enter a long integer");
catch(IOException e)
System.out.println(e.getMessage());
return l;
public static double getDouble()
double d = 0;
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
d = (Double.valueOf(s.trim())).doubleValue();
ok = true;
catch(NumberFormatException e)
System.out.println("Make sure you enter a decimal number");
catch(IOException e)
System.out.println(e.getMessage());
return d;
public static float getFloat()
float f = 0;
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
f = (Float.valueOf(s.trim())).floatValue();
ok = true;
catch(NumberFormatException e)
System.out.println("Make sure you enter a decimal number");
catch(IOException e)
System.out.println(e.getMessage());
     return f;
public static char getChar()
char c = ' ';
boolean ok = false;
while(!ok)
try
bytesRead = System.in.read(b);
s = new String(b,0,bytesRead-1);
if(s.trim().length()!=1)
System.out.println("Make sure you enter a single character");
else
c = s.trim().charAt(0);
ok = true;
catch(IOException e)
System.out.println(e.getMessage());
return c;
public static void pause()
boolean ok = false;
while(!ok)
try
System.in.read(b);
ok = true;
catch(IOException e)
System.out.println(e.getMessage());
public static void pause(String messageIn)
boolean ok = false;
while(!ok)
try
System.out.print(messageIn);
System.in.read(b);
ok = true;
catch(IOException e)
System.out.println(e.getMessage());
AirplaneListTester class sorry for the indentations the message box has messed it up
import javax.swing.JOptionPane; //indicates that the compiler should load class JOptionPane for use in this application.
public class AirplaneListTester
     public static class AirplaneList
          //Attributes for the AirplaneList
          private String flight = "No plane" ; //Airplane's name
          private int total = 0;     //initial total
          private boolean Empty = true; //initially the list is empty
          private boolean     Full = false; //The list initially has no entries therefore it is not full
          // Constructor method
          public AirplaneList()
               total = 0;
          public void add(String Airplane) // allows the user to add an airplane to the list, it returns a boolean value
               flight = Airplane; // The airplane object will be "flight"
          }     //add()
          public void remove(int inti) // allows the user to remove an airplane from the list, it returns a boolean value
               total = inti;
          }     //remove()
          public boolean isEmpty() // allows a user to check if the list is empty
               Empty = true;
               Full = false;
               return Empty;
          public boolean isFull() // allows a user to check if the list is full
               Empty = false;
               Full = true;
               return Full;
          public void item(int inti) // returns the airplane's flight number on the list
               total = inti;
               System.out.println(flight+ "is number ");
               System.out.println(total+ "");
          public void Total() // returns the total number of airplanes on the list
               JOptionPane.showMessageDialog(null,total+ " Airplanes are on the list" );
               if (isFull())
               JOptionPane.showMessageDialog(null,"The list has also reached its maximum number of planes" );
          public void getInt()
          //Start main()
               public static void main (String[] args)
          throws java.io.IOException
               char choice; //Words choice and size are the names of variables
               int size; //This declaration specifies that the variable are of data type char and int
               //size = EasyIn.getInt(); // Converts a string and makes it an Int
               Char - a variable that may only hold a single lowercase letter, a single uppercase letter, a single digit or a           
               special character (such as x, $, 7 and *)
               AirplaneList plane = new AirplaneList(); // Declare AirplaneList variables
               //The code below creates a dialog box for the user to input a choice
               String inputcode;
               inputcode = JOptionPane.showInputDialog("A: add an airplane from the list\n" +
                              "B: remove an airplane from the list\n" +
                              "C: check if the list is empty\n" +
                              "D: check if the list is full\n" +
                              "E: display the list\n" +
                              "F: quit\n" );
               The null first argument indicates that the message dialog will appear in the center of the screen. The 2nd is the      
               message to display
               do
                         // get choice from user
                         choice = inputcode.toUpperCase().charAt(0);
                         //process menu options
                         switch(choice)
                    case 'A':               
                         addingplanes(plane); // Adds a plane to the list
                         break;     //done processing case
                    case 'B':
                         removingplanes(plane); // Removes the plane
                         break;     //done processing case
                    case 'C':
                         islistempty(plane); // Checks if plane is empty
                         break;     //done processing case
                    case 'D':
                         islistfull(plane); // Checks if plane is full
                         break;     //done processing case
                    case 'E':
                         displaylist(plane);      // Displays the list of planes
                         break;     //done processing case
                    case 'F':
                         JOptionPane.showMessageDialog(null, "You have chosen to quit the program");
                         break;     //done processing case          // Quits the program
                    default:
                         JOptionPane.showMessageDialog(null, "Invalid entry!, Please choose another option");
                         if (choice!= 'A'||
               choice!= 'B'||      
                         choice!= 'C'||
                    choice!= 'D'||
                    choice!= 'E'||
                    choice!= 'F');
                         inputcode = JOptionPane.showInputDialog("A: add an airplane from the list\n" +
                              "B: remove an airplane from the list\n" +
                              "C: check if the list is empty\n" +
                              "D: check if the list is full\n" +
                              "E: display the list\n" +
                              "F: quit\n" );
                              break;     //done processing case
               }while (choice!= 'F' ); //end AirplaneList tester
          System.exit(0); //end main()
               //add Airplane
               public static void addingplanes(AirplaneList plane)
                    String flight;
               flight = JOptionPane.showInputDialog("Please enter airplane filght number" );
                    create an Airplane object to add to list          Airplane flight = new Airplane();
                    add string to list if the list is not full
                    access the 'add(Airplane)' method from the AirplaneList class;
               if the list is full, return a statement to the user indicating that no more plane can be added onto the list
               //remove airplane
               public static void removingplanes(AirplaneList plane)
               //get position of item
               /*     string enterpos;
                    enterpos = JOptionPane.showInputDialog("Please enter position to remove" );
                    System.out.print(":")
                    int plane = Easyln.getint();
                    // delete item if it exists
                    //access the 'remove(Airplane)' method from the AirplaneList class;
                    //if the user enter an invalid number for the position, returen a statement
               */     //indicating that there is no such posititon.
               //check if empty
               public static void islistempty(AirplaneList plane)
                    String inputcode;
                    if (plane.isEmpty())
                    JOptionPane.showMessageDialog(null, "The list is empty");
                    else
                    JOptionPane.showMessageDialog(null, "list is not empty" );
               //check if full
               public static void islistfull(AirplaneList plane)
                    String inputcode;
                    if (plane.isFull())
                    JOptionPane.showMessageDialog(null, "list is full" );
                    else
                    JOptionPane.showMessageDialog(null, "list is not full" );
               //display list
               public static void displaylist(AirplaneList plane)
                    if (plane.isEmpty())     //no need to display if list is empty
                    JOptionPane.showMessageDialog(null, "list is empty, there is no list to display!" );
                    else
                    plane.Total();
                    //loop through list
}//Ends the AirplaneListTester class

First of all we have some code formatting options in this board.
If you wrap your code in [[b]code] it will be a whole lot easier to read for all of us.
Next put your class into a library path since you're going to use it in more than one project I guess.
Then simply import your class in the project you're currently working on and you can use it's methods.

Similar Messages

  • Where to put the class file

    i am using tomcat 4.1.27 server and i created a UserData.java file as a bean; i have placed the class file in the WEB-INF/classes folder. still i get the following error:
    ==============================================================
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 21 in the jsp file: /ics334/Javanese/name7.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\ics334\Javanese\name7_jsp.java:60: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.name7_jsp
    UserData user = null;
    ^
    An error occurred at line: 21 in the jsp file: /ics334/Javanese/name7.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\ics334\Javanese\name7_jsp.java:62: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.name7_jsp
    user = (UserData) pageContext.getAttribute("user", PageContext.SESSION_SCOPE);
    ^
    An error occurred at line: 21 in the jsp file: /ics334/Javanese/name7.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\ics334\Javanese\name7_jsp.java:65: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.name7_jsp
    user = (UserData) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserData");
    ^
    3 errors
    Apache Tomcat/4.1.27
    ===============================================================
    the structure of the jsp file is as
    <%@ page contentType="text/html" %>
    <%@ page import="java.sql.*,java.util.*" %>
    <%@ page import ="javax.servlet.*"%>
    <%@ page import ="javax.servlet.http.*"%>
    <html dir="rtl">
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>
    <body>
    <p dir="ltr">
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    <font size="5">Your Name is :<%= user.getUsername() %> <BR></font>
    </p>
    </body>
    </html>
    can anyone help plz?

    I am also facing the same problem. Try placing ur
    class files in tomcat's /common/classes folder.
    Sometimes it works. How ever it did not work in my
    case. Hope it works in your!!This ain't a right way of doing it... when creating a web-app, the files should be contained in it.
    The problem is can be resolved by packaging the class in say beans. Then place that class in WEB_INF/classes/beans.
    Cheers!
    ***Annie***

  • Architecture question...where to put the code

    Newbie here, so please be gentle and explicit (no detail is
    too much to give or insulting to me).
    I'm hoping one of you architecture/design gurus can help me
    with this. I am trying to use good principals of design and not
    have code scattered all over the place and also use OO as much as
    possible. Therefore I would appreciate very much some advice on
    best practices/good design for the following situation.
    On my main timeline I have a frame where I instantiate all my
    objects. These objects refer to movieClips and textFields etc. that
    are on a content frame on that timeline. I have all the
    instantiation code in a function called initialize() which I call
    from the content frame. All this works just fine. One of the
    objects on the content frame is a movieClip which I allow the user
    to go forward and backward in using some navigation controls.
    Again, the object that manages all that is instantiated on the main
    timeline in the initialize() function and works fine too. So here's
    my question. I would like to add some interactive objects on some
    of the frames of the movieClip I allow the user to navigate forward
    and backward in (lets call it NavClip) . For example on frame 1 I
    might have a button, on frame 2 and 3 nothing, on frame 4 maybe a
    clip I allow the user to drag around etc. So I thought I would add
    a layer to NavClip where I will have key frames and put the various
    interactive assets on the appropriate key frames. So now I don't
    know where to put the code that instantiates these objects (i.e.
    the objects that know how to deal with the events and such for each
    of these interactive assets). I tried putting the code on my main
    timeline, but realized that I can't address the interactive assets
    until the NavClip is on the frame that holds the particular asset.
    I'm trying not to sprinkle code all over the place, so what do I
    do? I thought I might be able to address the assets by just
    providing a name for the asset and not a reference to the asset
    itself, and then address the asset that way (i.e.
    NavClip["interactive_mc"] instead of NavClip.interactive_mc), but
    then I thought that's not good since I think there is no type
    checking when you use the NavClip["interactive_mc"] form.
    I hope I'm not being too dim a bulb on this and have missed
    something really obvious. Thanks in advance to anyone who can help
    me use a best practice.

    1. First of all, the code should be:
    var myDraggable:Draggable=new Draggable(myClip_mc);
    myDraggable.initDrag();
    Where initDrag() is defined in the Draggable class. When you
    start coding functions on the timeline... that's asking for
    problems.
    >>Do I wind up with another object each time this
    function is called
    Well, no, but. That would totally depend on the code in the
    (Draggable) class. Let's say you would have a private static var
    counter (private static, so a class property instead of an instance
    property) and you would increment that counter using a
    setInterval(). The second time you enter the frame and create a new
    Draggable object... the counter starts at the last value of the
    'old' object. So, you don't get another object with your function
    literal but you still end up with a faulty program. And the same
    goes for listener objects that are not removed, tweens that are
    running and so on.
    The destroy() method in a custom class (=object, I can't
    stress that enough...) needs to do the cleanup, removing anything
    you don't need anymore.
    2. if myDraggable != undefined
    You shouldn't be using that, period. If you don't need the
    asset anymore, delete it using the destroy() method. Again, if you
    want to make sure only one instance of a custom object is alive,
    use the Singleton design pattern. To elaborate on inheritance:
    define the Draggable class (class Draggable extends MovieClip) and
    connect it to the myClip_mc using the linkage identifier in the
    library). In the Draggable class you can define a function unOnLoad
    (an event fired when myClip_mc is removed using
    myClip_mc.removeMovieClip()...) and do the cleanup there.
    3. A destroy() method performs a cleanup of any assets we
    don't need anymore to make sure we don't end up with all kinds of
    stuff hanging around in the memory. When you extend the MovieClip
    Class you can (additionally) use the onUnLoad event. And with the
    code you posted, no it wouldn't delete the myClip_mc unless you
    program it to do so.

  • I changed my iPhone lately but i can't restore my last backup since it keeps saying "itunes could not restore backup because the password was incorrect" but I don't know where to put the password to make it happen... Any suggestions?

    Hey guys,
    I just bought a new iPhone but i can't restore my backup files beacuse it keeps saying "itunes could not restore backup because the password was incorrect" but I really don't know where to put the password to restore it. I really have some files that are meaningful for me so I really need help. Any suggestions anyone?

    Select your iDevice in the iTunes.
    Choose the Summary screen (tab) and scroll to the bottom of the screen.
    Then un-select Encrypt iPhone backup.
    iTunes will then prompt you to “Enter the password to unlock your iPhone backup”, enter the password you set originally.

  • Where to put the commit in the FORALL BULK COLLECT LOOP

    Hi,
    Have the following LOOP code using FORALL and bulk collect, but didnt know where to put the
    'commit' :
    open f_viewed;
    LOOP
    fetch f_viewed bulk collect into f_viewed_rec LIMIT 2000;
    forall i in 1..f_viewed_rec.count
    insert into jwoodman.jw_job_history_112300
    values f_viewed_rec(i);
    --commit; [Can I put this 'commit' here? - Jenny]
    EXIT when f_viewed%NOTFOUND;
    END LOOP;
    commit;
    Thanks,
    - Jenny

    mc**** wrote:
    Bulk collect normally used with large data sets. If you have less dataset such as 1000-2000 records then you canot get such a performance improvent using bulk collect.(Please see oracle documents for this)
    When you update records Oracle acquire exclusive lock for that. So if you use commit inside the loop then it will process number of records defined by limit parameter at ones and then commit those changes.
    That will release all locks acquired by Oracle and also teh memory used to keep those uncommited transactions.
    If you use commit outside the loop,
    Just assume that you insert 100,000 records, all those records will store in oracle memory and it will affect all other users performance as well.
    Further more if you update 100,000 records then it will hold exclusive lock for all 100,000 records addtion to the usage of the oracle memory.
    I am using this for telco application which we process over 30 million complex records (one row has 234 columns).
    When we work with large data sets we do not depends with the oracle basic rollback function. because when you keep records without commit itb uses oracle memory and badly slowdown all other processes.Hi mc****,
    What a load of dangerous and inaccurate rubbish to be telling a new Oracle developer. Commit processing should be driven by the logical unit of a transaction. This should hold true whether that transaction involves a few rows or millions. If, and only if, the transaction is so large that it affects the size constraints of the database resources, in particular, rollback or redo space, then you can consider breaking that transaction up to smaller transactions.
    Why is frequent committing undesirable I hear you ask?
    First of all it is hugely wasteful of rollback or redo space. This is because while the database is capable of locking at a row level, redo is written at a block level, which means that if you update, delete or insert a million rows and commit after each individual statement, then that is a million blocks that need to go into redo. As many of these rows will be in the same block, if you instead do these as one transaction, then the same block in redo can be transacted upon, making the operation more efficient. True, locks will be held for longer, but if this is new data being done in batches then users will rarely be inconvenienced. If locking is a problem then I would suggest that you should be looking at how you are doing your processing.
    Secondly, committing brings into play one of the major serialization points in the database, log sync. When a transaction is committed, the log buffer needs to be written to disc. This occurs serially for multiple commits. Each commit has to wait until the commit before has completed. This becomes even more of a bottleneck if you are using Data Guard in SYNC mode, as the commit cycle does not complete until the remote log is notified as written.
    This then brings us two rules of thumb that will always lead a developer in the right direction.
    1. Commit as infrequently as possible, usually at the logical unit of a transaction
    2. When building transactions, first of all seek to do it using straight SQL (CTAS, insert select, update where etc). If this can't be easily achieved, then use PL/SQL bulk operations.
    Regards
    Andre

  • I wanted to know explain my problem down package cc2014 where I put the serial number of the problem that I have is that when you open the program asks me start of session in which he put it and go but back inside and it drives me to request the start of

    I wanted to know explain my problem down package cc2014 where I put the serial number of the problem that I have is that when you open the program asks me start of session in which he put it and go but back inside and it drives me to request the start of session and I take 3 weeks or more with this problem if they can support me solve it was the number of seire wearing this being installed at a private university

    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Some general information for a Cloud subscription
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page

  • Hello there, am new here and very stressed, i have an Imac core i3 which is logging off itself after a few seconds of login, it goes back to the login menu where i put the password. I have tried to repair the os but my pioneer rom is not reading the disk.

    Hello there, am new here and very stressed, i have an Imac core i3 which is logging off itself after a few seconds of login, it goes back to the login menu where i put the password. I have tried to repair the os but my pioneer rom is not reading the disk. I press the :c" button on startup but its not picking up the disk in the rom, i have tried to put the disk in an external rom but same answer, am starting to think that my os disk is bad. Please help me.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this exercise is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login. Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, or if a firmware password is set, you can’t boot in safe mode.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Where to put the Transform.xsl File

    Good evening!
    I am trying to execute a bpel:doXslTransform(xslURI,$a) and i dont know where to put the transform.xsl file for this operation.
    Can anybody tell me?
    Greetz,
    RaRu

    It needs to be in the same folder as the .bpel process - the bpel folder of your project.
    Hope this helps,
    Shanmuhanathan Thiagaraja

  • Where to put the Bean class in a html- Bean- JSP setup

    Hi,
    The setup is simple, the front end is a html form, there is a Java Bean with set/get methods and finally a jsp which accesses the bean and prints the result.
    The problem is that it cannot locate the Bean class. I have compiled the bean class and stored the .class file in webapps/ROOT/WEB-INF/classes dir. The jsp and html files are located in the webapps/ROOT dir. Iam using tomcat 5.0.28, with ROOT context enabled. Is this because I need to set the CLASSPATH for Tomcat? Any pointers?
    Thanks

    No you don't need to set CLASSPATH.
    You need to put your bean in a package.
    As of java1.4, JSPs can not access beans that are in the default/unnamed pacakge.
    package mypackage
    public class MyClass
    and then the class would compile to
    WEB-INF/classes/mypackage/MyClass.class

  • Jdbc where to put the postgresql.jar [postgresql 7.4]

    I am running tomcat-5.0 with postgres. I downloaded the correct version of pg74jdbc.jar.
    But my JSP stops and says it can't find the class in the postgres.jar with a stack trace in the browser at the following code,
    Class.forName("org.postgresql.Driver");
    it think this comes because it can't find the postgres.jar file. I have put it in /usr/local/pgsql/share/java/postgres.jar with no success then restarted the server moved it to /usr/lib/java/jre/lib tried it with no success, tried it setting in both paths with no success. I have set the CLASSPATH with the corresponding names also.
    Where do I have to put this file?

    you using linux?? you should not have to restart server, but restart services.
    put postgresql.jar in /tomcat5/common/lib

  • Where to put the properties file

    I am a new user of NetBeans6.0, I am making a simple application for user registration. I have coded everything but when I run project I get error caused by the dao.properties file load problem.
    I have put the dao.properties file inside the classes directory(where all java class files are build after running the project) of my web application directory( I didn't create this directory though, it is automatically created by IDE), I think there is a problem with its path.
    where should I put the dao.properties file so that when I run the project the Tomcat automatically find it and also, what the settings I should do?
    actually, I have referred to BalusC'd  DAO tutorial: the data layer but that comes in use when we are working off the IDEs, In my case since I am using Netbeans so it may be different from that one.
    if someone already done that then please let me know

    ok, but will it work if I upload the project in a remote host?
    lets talk besides IDE, as in your DAO tutorial you have instructed to put the properties file somewhere in root of the classpaths. ok, it will work on a local computer cause there is classpath setting but since remote host doesn't know about that property file and we cant set classpath at remote host(I am not sure though if we can) then how will it work at remote host.
    how the server at remote host comes to know about that property file?
    In my case since I have made the project using IDE and everything regarding classpaths have been set automatically(IDE done itself), but at remote host these sort of settings are not done then how the project will run?
    if I have described my problem incorrectly then please consider it as it is supposed to be.

  • Where to put the .txt file in order to read it

    think ur prog can read the data.. but it said
    java:9: unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown
    FileInputStream sStream = new FileInputStream("data.txt");
    so where to paste the .txt file if i want to read it
    same folder with my .java file?

    u must put the .txt file in order to read it as an
    argument to java command at runtime this code may help
    u out
    import java.io.*;
    class Demofin     
    {public static void main(String[] args) throws
    IOException
         int i;
         FileInputStream fin;
              try
                   fin=new FileInputStream(args[0]);
              catch (FileNotFoundException e)
              {System.out.println(" file not found");
              return;
              catch (ArrayIndexOutOfBoundsException e)
                   System.out.println("usage demofin filename.txt");
                   return;
              do
              {i=fin.read();
              if(i!=-1)System.out.print((char) i);
              while (i!=-1);
                   fin.close();
    }Use tags..

  • In HELLO Where doI put the email address of a contact.

    I must be very stupid (admitted) but I cannot get Hello to work for me. Where do I put the email adddress of a person I wish to contcact.

    Hi Brad,
    I really appreciate your taking the effort to help - I must be the greatest of idiots or someting is wrong with my system. I click on the Hello button at the top of my screen and this brings up a panel stating "conversation 1" and below that "Start a conversation" in a blue box. I cannot see the two tabs you refer to "one for chat and other for contacts."
    Unfortunately I am going away for a few days and will not be able to respond, but certainly will when I return.
    Thank you for your interest.

  • How to put the ".class" file in Memory with Javac?

    The J2SE 6 RC have an tool : javax.tools.JavaComplier. I can use it to compile the source code in memory( I implemented an JavaFileObject).
    But the compiler aways put the output file(.class) to file system. It;s not my want to do . I am writing an IDE ,I use javac to determine the code error after the user's typing. So complier is used a lot , writing to file system is a time consuming job.
    I also want to use the byte code(".class" file) for reflection , so if the JavaCompiler can put the output file in memory and then I can reflect it.
    My current solution is puting the output file to file system then use Class.forName() to reload it in memory then reflect it. It seems a useless IO operation with file system.
    How can I do with it?
    Thanks!

    Those 'useless' I/O operations are one or two out of thousands that are implied by compiling a Java source file.
    I wouldn't worry about it.

  • Where to place the class file of the java bean when using the packager

    I am using the activex bridge in j2se 1.5.0_06
    now i have created the jar file for my bean but where do i place the class file?
    i.e the bean..if i keep it in jdk\bin the packager gives me an error..i created a folder in my public jre jre\axbridge\bin and placed the class file there too but even this didnt work
    Kindly tell me what is the fully qualified package bean name if i have placed all my files under jdk\bin..

    D:\Java\jdk1.5.0_06\bin>packager -reg d:\java\jdk1.5.0_06\bin\PersonBean.jar Per
    son
    Processing D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\\Person.idl
    Person.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\oaidl.idl
    oaidl.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\objidl.idl
    objidl.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\unknwn.idl
    unknwn.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\wtypes.idl
    wtypes.idl
    Registration failed:
    The packaged JavaBean is not located under the directory <jre_home>\axbridge\bin
    this is the error i get

Maybe you are looking for

  • Pricing date in delivery document and billing document

    Hi All, Pricing date in billing document can be controlled by copy control between order and billing document. This config is done in the field Pricing source. If i its set as "order", then my pricing date in billing doc will be same as that of order

  • HT204053 Why is my Apple ID not verifing on icloud

    I am trying to set up iCloud on my iPad and iPhone but it says my apple ID cannot be verified? Why am I doing something wrong, I am using my normal apple ID that I use to go onto iTunes, etc.

  • In iMovie 10.0.2 Why can't I find iMovie projects or events to transfer to external harddrive?

    I am trying to backup my iMovie Projects and all of the media for a number of events. I have been having trouble with iMovie 10.0.2, but it could also be my computer. I am running a Mid 2010 MacBook Pro with Maverick. I have a MacMini that I would li

  • Pdf files in Dremweaver 4

    I've created a pdf file from a newspaper article which I would like linked to my website. Having uploaded to my server it will not go to the link and comes up with an error message. Any ideas please? p.s. I am stilla novice at this kind of thing and

  • Pacman fails on incoming? [Fxd]

    Hi I have added incoming to pacman.conf....but get this when I pacman -Suy warning: failed to get filesize for incoming.db.tar.gz failed downloading incoming.db.tar.gz from ftp.archlinux.org: 550 incoming.db.tar.gz: No such file or directory failed t