How many classes

Hello
I would like to have some informations concerning the number of classes (and tables) usually used in projects (not precises numbers, but some idea...).
Could you give me theses numbers, with the scope of the project? (ERP, banks, ...)
many thanks
Uron.

Hello!
Evidently itdepends on the project, and especially on the lines of code included in every class. In order that you should do an idea I will say to you that I am in a project of 3 months (10 persons) and already we are over all 1000 classes and more than 50 tables!!
Regards!
Ppito's

Similar Messages

  • [urgent please] How many Classes in jdk

    Hi Can some body answer my simple Question
    How many total NUMBER OF CLASSES were there in
    1)JDK1.2
    2)jdk1.3
    3)jdk1.4
    Thanx in advance
    with regards
    Karthik

    Please do not post 3 times the same question.
    As for the number of classes, download the JDKs, decompress the jars and use the explorer to get the .class count.

  • How many classes should a .java file contain?

    Are there any general guidelines on how many Java classes should be contained in a single .java file? I've been creating a new .java file for each class I write but see examples in Sun's Java tutorial where there are at least two classes in a single .java file. One such case is the TableDemo example at
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/TableDemo.java
    Thanks.

    The example you point to isn't really more the one class in one java file. It makes use of an inner class. An inner class is something different! As far as I understand it, it is mainly used to implement some behaviour (in this case AbstractTableModel behaviour). If the MyTableModel was in a separate class file, it couldn't access the variable of the main TableDemo class. So they use an inner class.
    So unless you need inner classes, this example is no reason to put more than one class in a .java file. In general, just put one class in a .java file. It's easier for everybody.

  • How many classes are there in the java kit?

    i figured this was the most "general" forum to post this question in. and im curious to know, how many packages/classes/functions are there in the java sdk? like, all the prebuilt ones. ive looked but cant seem to find any info on it. anybody happen to know?
    Thanks!

    there are at least 4142 classes in the 1.4.2.x distribution ...Is that the number of files which end in .java? There's bound to be a lot more
    classes, when you u consider inner classes and especially anonymous
    inner classes.It was just a rough estimation ... and I wrote 'at least' 4142 classes ...
    and I was wrong: there are alse 4 .h files in the src.zip file, so that makes 4138
    classes at least :-)
    kind regards,
    Jos

  • How many classes in Java?

    I'm new to Java.
    Does anyone have a link or know the exact number of classes and methods in the java programming language that we use and their classifications (e.g. how many number of classes are used only for drawing rectangular objects on a form and the names of those classes)
    I need to see ALL the possible classes and categories they apply to.
    Is there a source I can access to view such information?
    Appreciated.

    wow.... now about that zipped file with so many class definitions, maybe an extra strap and a java programmer to sit on the thing to prevent it from exploding.
    thanx for your help people.
    Regards,
    Zeeshan

  • How many classes are used in java versions?...

    sun microsystems have released many java version...
    how many build in classes are used java version 1.2 ,1.3 etc ...

    Arun02006 wrote:
    sun microsystems have released many java version...
    how many build in classes are used java version 1.2 ,1.3 etc ...No idea why you should want to know... Anyway, download them and look inside the zip file that holds the source codes.
    You can download older Java versions here: [http://java.sun.com/products/archive/]

  • Can someone tell me how many seconds the cross fade is when running your nano in that mode? I teach spin class and want to know how much time I'm losing in that mode.

    can someone tell me how many seconds the cross fade is when running your Ipod 6th Gen nano in that mode? I teach spin class and want to know how much time I'm losing in that mode.

    You aren't losing any time in that mode, but I believe it is a 10 second fade out/fade in.

  • How to complie an application with many classes?

    I build an application with many classes,
    java palm.database.MakePalmApp -v -version "1.0" -icon 1.bmp -bootclasspath %j2meclasspath% -networking -classpath output %1
    this only works with only one class, I do not know if I have an application with several classes how can I convert them into a prc??

    Take a look at the mksample.bat file that came with
    midp4palm:
    java -jar MakeMIDPApp.jar -version 1.0 -type Data -creator mJav -nobeam -v -o ManyBalls_new.prc -JARtoPRC ManyBalls.jar example.manyballs.ManyBalls
    You will need to create a jar file consisting of the
    classes for your application, and then run it through
    a statement like above.
    Perry

  • How many tasks can I have in NI-DAQmx system?

    I am working out of the office this week - please send your response to [email protected] as well as my normal email [email protected].
    I am designing a new test platform that will run on C# (because we like object oriented text based programming and because the IDE is free).  For hardware we'll use your PXI modules (because your hardware is ultra-reliable).  I'm starting with the following PXI modules 6259, 4072, 6509, 2575, and 2569, but we made add other modules later as future requirements demand.  I am doing the system software architecture now.  I've done some dabbling with Ni_daqmx, and I loathe "tasks" and "channels", but am determined to make them work.
    The difficulty I'm having revolves around the overhead with setting up tasks and channels and with the concept of tasks and channels.  Help hasn't helped much.  Tasks seem to work great if you intend to always collect the same large amount of data from many sources and always will do it in exactly the same way. 
    We want something much more akin to random access memory.  We'll have UUTs of different kinds coming on and off at random times.  Sometimes a test will need a simple DC voltage, and other times another test will need 2 seconds worth of data at 1MS/s.   It can cost around 150msec to make that change (stop the current task, creat another one, configure anohter channel, start up a new task, blah, blah, task this, channle that - for the life of me I can't understand what this damn taks concept does for me but make matters more complicated and bog down my system).
    I can just barely glean from the help that I can have only one analog input task at once, but I can have sevferal taks of several different kinds running at the same time ( a digital output task and another task for digital input, and another task for analong input, etc.) .  It does seem that I can set realys without having to put them into a channel and a task (Thank goodness for that - I just wanna turn on a relay I have no idea what a relay "channel" might be.)
    In the PXI system I described above I'll have two devices that are analog input devices, the DMM and the Daq.  Even with two devices, can I only have one analog input task running?  Does that mean I've got to waste 150msec just to switch from the DMM to the Daq? (Do you understand my frustration with "tasks"? - I should be able to say "read DMM" and turn around and say "read Daq channel 0" without having to jump thru task and channle hoops and waste a bunch of time doing it).
    I'll also have Daq digital IO and two 6509 digital io modules.  Do I have to cram all of that into some "task" concept too?  The Daq card has got many other kinds of wonderful capability (frequency measurement, counters, analog output).  How many tasks can I have for that stuff?  On the DMM card I can measure capacitance amoung other things.  Will I have a capacitance task?  The idea of a "capacitance task" hurts my head.
    Golly I hate tasks.  Please help.
    I am working out of the office this week - please send your response to [email protected] as well as my normal email [email protected].
    Dave

    Dave,
    Thanks for posting to the NI Forums.
    For the good of the community we like to keep conversations that start of the forums on the forums rather than moving to email.  If you want to move to email support I recommend contacting NI through the email route.
    I will answer your questions here.  If you need more direct contact please feel free to contact us through [email protected].
    For some the concept of tasks may seem daunting, however, for many applications it makes life a lot more simple.  A task at a very fundamental level is simply a collection of channels with a single type (AI, DI, DO, etc.)  and a single timing configuration (sampling rate, continuous vs. finite, etc.).  It is a way to organize configuration data.  
    The concept of a task is an abstraction like OO programming.  Like OO programming it may take some time to understand but can be a time saver in the end.  Also like OO programming it does add some initial programming overhead.  It is much more simple to simply type a printf statement in C than to have to create a bunch of classes just to output text to the screen. You can accomplish the same thing not using OO programming, but in the end OO programming is extremely useful, because it groups useful information and methods together in one place.
    With very simple applications OO programming sometimes does not make sense.  But as a program gets more and more complex OO programming becomes more and more useful.  It takes some learning but it is worth it.
    I believe the concept of a task does the same thing.  It does not change the actual functionality of the device or add excessive overhead.  It is just an abstraction that pulls configuration data about a specific "task" and methods the task can perform into a single logical place.
    Unlike the entirely abstract concept of an Object, a Task is run on a physical device and therefore has physical limitations.  You can create multiple tasks of the same type, but you can only run a one timed task of each type on a single board at a time.  In other words you can have multiple AI tasks running at the same time but they need to run on different boards or only one can be timed (have a rate).  You can also have multiple timed AI tasks configured for a single board but only one can actually be running at a time.
    The reason you can only have a single timed task running at a time is because the M-Series boards (and many other boards as well) have a single timing engine for each type of acquisition or generation.  There is a single timing engine for AI, one for AO, and so forth.  You cannot have channel 1 running at 1 MS/s and another running at 50 kS/s.
    However, tasks can exist even when they are not being actively run.  You can create all the tasks you need at the beginning of your program and simply start and stop them as you need.  After the task is stopped you do not need to clear the task until the end of your program.  You can further increase performance by moving the Task into the latest state possible without actually starting the task.  This can be done by calling myTask.Control(TaskAction.Action).  The Task states are further explained in the NI-DAQmx Help Manual.
    The concept of a  task will need to be used with any device that is being programmed using NI-DAQmx.  The 6259 and 6509 will need to be programmed using DAQmx.  With the 2575 and 2569 you have the choice of either using the NI-DAQmx API or the NI-SWITCH API.  The SWITCH API does not use the concept of tasks.  For the 4072 you will need to use the NI-DMM API.  This API also does not use the concept of tasks.
    Hopefully this information is helpful.  Let me know if you have any additional questions or concerns.
    Regards,
    Neil S.
    Applications Engineer
    National Instruments

  • How many cpus on server are allocated to client

    hello,
    its not an issue rather doubt which is hunting me from last 2-3 days.
    My 10gR2 Oracle database running on
    Widows server 2008 R2 Enterprise
    Processor ----> intel Xeon cpu [email protected] GHz (4 processor)
    RAM------>8GB
    its a dedicated server.
    Actually i was going through the AWR report whn one of the client came to me with slow database performance during some time interval.
    when i had a look at the Top 5 Timed Events in Report it showed me the
    Sql*net message from client      834.35si told them to run their query so that i can have trace of that.
    then time event showed me something nearer to above and our database was taking only 15 sec to carry out the task.
    i told them that
    "you application/client is taking 834 sec to tell our database to do something.But once the database got your application's request to carry out something, the database is taking only 15 sec to provide you with the result"
    so they asked me to justify that the problem is with application side/machine side.
    After digging in a lot on the internet ground, chatting with my colleges on cell phone and running through many threads specially Asktom.oracle.com, i got really confused.
    They came up with varied opinions which kept me thinking again & again over the same thing.
    In one of his(Thomas kyte) thread the discussion was as follows.
    The output of tkprof when the developers run the same program on their PC shows a big difference in
    SQL*Net message from client.
    The SQL*Net message from client from my tkprof is almost 4-5 times theirs.
    Could you please advise what might be the cause of that?
    Thanks
    Followup   August 25, 2009 - 9am Central time zone:
    that could mean.....
    your machine is slow (their desktop cpus blow your server cpus away) as much as anything.
    since their code is not instrumented, try SQL*Net trace (with TIMESTAMPS) can be helpful to check out the time in the network between the client and server. See Note 16658.1 - see if you experience radically different response times on the various machines.
    4 stars   August 25, 2009 - 2pm Central time zone
    Bookmark | Bottom | Top
    Reviewer: Jaklin Ekdawi
    My Database server is T5120 with 4 core 1.2 GHz Ultra SPARC T2 processor (from O/S it is seen as 32
    CPU * 1.2 GHz).
    Their PC has 2 CPU * 4 Ghz.
    Based on the above, How come their PC is more powerful than my server?
    The ASH Report for the execution period of the program shows ¿CPU + Wait for CPU¿ is the top event,
    however, tkprof shows ¿SQL*Net from client¿ is the top event waited on.
    Top User Events
    Event        Event Class    % Activity    Avg Active Sessions
    CPU + Wait for CPU     CPU             81.66        0.14
    log file sync             Commit             5.92        0.01
    db file scattered read     User I/O     2.37        0.00
    Can you please explain why there is a difference between tkprof and ASH report?
    Thank You
    Followup   August 25, 2009 - 8pm Central time zone:
    I only care about a single cpu, your client program is not using more than one.
    I often downloaded stuff from my big bad sparc to my desktop because my desktop was many times faster than the sparc.
    look further down in the ash report - sqlnet message from client is an idle wait, we tend to ignore it as it is the time we spent WAITING FOR THE CLIENT.
    Their pc looks a lot faster than your server since you are only using a single cpu - your client is not multi-process. It only uses a single cpu.
    4 stars   August 25, 2009 - 2pm Central time zone
    Bookmark | Bottom | Top
    Reviewer: Jaklin Ekdawi
    Sorry, I forgot to say that during the execution time the cpu on the server was 98-99% idle based
    on (using top and sar).
    Thanks
    Followup   August 25, 2009 - 8pm Central time zone:
    I agree, because you could not use 31 out of 32 cpus, I would expect it to be almost idle.
    97% idle would mean a single cpu was 100% used. So, it sounds like you were using almost 100% of that single cpu you had access to.
    and it isn't as fast as their pc.
    4 stars   August 25, 2009 - 10pm Central time zone
    Bookmark | Bottom | Top
    Reviewer: Jaklin Ekdawi
    The tkprof from the developer's PC is below
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      122      0.39       0.68          0        403          0           0
    Execute    122      0.00       0.00          0          0          0           0
    Fetch      396      0.09       0.11          0      25354          0         274
    total      640      0.48       0.80          0      25757          0         274
    Misses in library cache during parse: 122
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                     763        0.00          0.00
      SQL*Net message from client                   763       14.71        312.91
      SQL*Net more data to client                   122        0.00          0.00
    The tkprof for the running the same process on Solaris DB Server
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      124      0.06       0.03          0          0          0           0
    Execute    124      0.04       0.01          0          0          0           0
    Fetch      400      0.07       0.10          0        802          0         276
    total      648      0.17       0.15          0        802          0         276
    Misses in library cache during parse: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                     774        0.00          0.00
      SQL*Net message from client                   774       43.65        964.23
    - On Solaris DB server, the CPU is 0.17, however, "SQL*Net message from client" is 964.23.
    - On the developer¿s PC, the CPU is 0.48, however, "SQL*Net message from client" is 312.91.
    Based on that, how I can approve it is CPU issue?
    Followup   August 26, 2009 - 7pm Central time zone:
    how about this.
    have the developers write something that mimics what they do without the database in it. Same sorts of loops and processing they do in the code in the client.
    run it on their machine
    run it on yours
    You'll find your big bad server has cpu's that are extremely slow compared to the desktop machine.
    Hence - the time spent waiting for sqlnet message from client is - time spent in YOUR client on YOUR server processing the data returned from the database.
    saying "the cpu 0.17 on one and 0.48 on the other" is meaningless, they are completely different cpus with completely different performance characteristics.
    And that you have 32 of them - no use to you, you use one..
    It looks like your server is about 2-3 times slower then their test machine.
    5 stars SQL*Net Message from client may not be an issue from the app   May 28, 2010 - 8am Central time zone
    Bookmark | Bottom | Top
    Reviewer: Thierry B from Paris, France
    Hi,
    I just read your post as I experienced the exact same problem. I found something that fixed this
    problem for me, my sqlnet.ora contained that line after an oracle upgrade:
    TRACE_LEVEL_CLIENT=16
    I don't know how it came there. But it was the cause of my problem (too long idle time). I simply
    removed it and no more wait events.
    I hope it can be of any help for anyone.
    Followup   May 28, 2010 - 8am Central time zone:
    that is a client side issue though, isn't it. It is an application side issue, not a database side issue.
    5 stars   April 15, 2011 - 10am Central time zone
    Bookmark | Bottom | Top
    Reviewer: A reader in this thread Tom insisted that the client has access to only 1 CPU on the server even though the questioner told him that his machine is having around 32 CPU'S.
    so this thread was the source of my confusion.
    i kept asking myself "if the client application has access to one cpu out of 32 cpu's on the server on which the database server is running,then What is the use of multiprocessor? my oracle/client application has access to only one cpu on the server(like Tom said), what other 31 cpu's on the server machine are upto?if one cpu is getting exhausted by the client Application request, then what the other processor are doing ? are they not meant for load balancing?"
    when i had a chat on cell phone with my colleagues regarding the oracle access to the cpu's on the server, then they told me that if there are more number of cpu's then the the response time would be fast cause workload is divided among the multiple processor to carry out the task in parallel.
    Again i got confused with the deferring opinion..
    so just want to have clarification on
    * how many processes do i have access to on server machine where my oracle is installed?*
    how many processes do the client applicaiton S/W/client machine have access to out of 32 processors?
    is workload devided among the cpus on the server ,in case of huge request from the client application?
    thanks & i hope my doubt would be cleared

    Look at it in basic terms (forgetting for the moment about Oracle and SQL*Net and specific s/w itself).
    A process is loaded into memory. This process contains machine code instructions. How many CPUs can execute these instructions?
    Only 1.
    Simplistically. The process has a single execution pointer and set of CPU registers. A single CPU executes the instruction (as indicated by the execution pointer). The registers are used and updated.
    The same CPU may not be used each time around. So a single process can during its lifetime, be executed by a number of CPUs. But a single CPU at a time.
    A process can thread. This basically means that a second copy of the execution pointer and registers set are created. Each such copy will be executed by by a single CPU at a time.
    An Oracle client is serviced by an Oracle server process (either dedicated or shared). On Linux/Unix systems, this will be a unique physical process. On Windows, it will be a unique thread.
    This process is executed by a single CPU. Thus that client is serviced by a single CPU.
    This changes when Oracle can use parallel processing and there are PX slave processes available. In that case, the client is serviced by a single process - but that process has in turn enlisted the assistance of helper processes. Thus the client is now serviced by multiple processes (or threads on Windows) and thus by multiple CPUs.
    However, it is not that simple either. It is "cheaper" for the kernel to run threads on the same CPU than on different CPUs. The reason is the same memory is used by both and access to that memory by different CPUs is more complex (and thus more expensive and slower) than from the same CPU.
    So depending on a number of factors, that client may still be serviced by a single CPU despite the fact that PX slaves are used. And from a client process perspective, this does not really matter. The crux of the issue in this regard is the CPU utilisation/footprint of that client process on the server.
    If the clock time for a client process says "+running for 60s+" and the server says "+CPU time is 10s+", you cannot say that the process was not serviced by multiple CPUs. You do not know whether than 10s CPU time was for 5 processes each spending 2s to service that client.
    However, when the server says "+CPU time is 70s+" - a longer period that the wall clock time of the client, then it is reasonable to assume that multiple server processes (and thus CPUs) are servicing that client process.
    As for exactly how many CPUs are in fact used by the server? That has no real bearing on this. It does not change client-server behaviour.
    Even Oracle does not know and does not care which CPU is servicing it. The correct piece of s/w to deal with that, is the kernel. Yes, you can bind a thread or process to a specific server CPU, but the reasons for this is quite technical and is always an exception. Let the kernel deal with which CPU to use. It is of no concern to the server s/w (like Oracle), and even less to the client process being serviced by that server s/w.

  • WoL across subnets, how many helpers can you use?

    Been going through the searches on this and I can't find an answer to my question. We are implementing Dell KACE and are deploying WoL campus wide. I'm following the referenced doc and in our test environment its working well.
    http://www.cisco.com/en/US/customer/products/hw/switches/ps5023/products_configuration_example09186a008084b55c.shtml#diag
    My question is this part --------v
    I get the need for the bolded helper addresses on the server VLAN. However, I have nearly 150 target networks to deal with. We are on a Class A 10.x.x.x.x, Is there a better way to break this down or do I have to put a target entry for each subnet like the example. I don't want to combine networks because I don't want to broadcast that traffic over that many networks and hosts. Any ideas.
    L3(config-if)#
    interface vlan 3
    ip address 172.16.3.1 255.255.255.0
    ip helper-address 172.16.2.255
    ip helper-address 172.16.4.255

    I do not believe that there is a limit on how many helper addresses can be configured on a router. I am not sure if the same is true on a layer 3 switch (and I assume that what you are showing us is a layer 3 switch). You might just configure it will all the helper addresses and see if it works.
    It might be possible to implement some hierarchal approach. If your 150 networks were in 10 regions each of which had 15 networks, then it might be possible to put 10 helper addresses on the router/layer 3 switch where the WOL server is located with each helper address going to a region. On the subnet at each region there could be another router/layer 3 switch with 15 helper addresses to send the broadcast out to the networks in that region.
    HTH
    Rick

  • On how many devices can I download and watch a purchased movie

    My teacher in school is looking for the cheapest way for all of our class to have access to a movie we are studying. I would like to know how many devices can be linked with one itunes account, so if our teacher created an account and purchased the movie could all/some of our class download it from icloud and watch it. Any help would be greatly appreciated!

    Hello honor7,
    Thanks for using Apple Support Communities.
    Please see the following information for the limit of devices that can be associated with a single Apple ID.
    Your Apple ID can have up to 10 devices and computers (combined) associated with it, with a maximum of 5 computers at any time.
    iTunes Store: Associating a device or computer to your Apple ID
    http://support.apple.com/kb/ht4627
    Take care,
    Alex H.

  • How to check a single method is overriden in how many subclasses in ABAP.

    Hi Experts,
    I have a global superclass which had benn inherited by many other global subclasses. Is there any way to find out quickly (may be in a table ) in how many subclasses a particular method of the superclass is overriden?

    Hi Manuish,
    You can use the class CL_OO_CLASS to achieve the above, below is a sample code.
    DATA: lcl_oo_class TYPE REF TO cl_oo_class,
          lw_seoredef  TYPE seoredef.
    TRY.
        CREATE OBJECT lcl_oo_class
          EXPORTING
            clsname = 'Y_TEST_CHEN_CLASS_SUB1'.
      CATCH cx_class_not_existent .
    ENDTRY.
    WRITE: 'Class', '                              ', 'Refclass', '                         ', 'Over written method', /.
    LOOP AT lcl_oo_class->redefinitions INTO lw_seoredef.
      WRITE: lw_seoredef-clsname,'         ',
             lw_seoredef-refclsname,'         ',
             lw_seoredef-mtdname,'         ', /.
    ENDLOOP.
    Alternatively you can look up the table "SEOREDEF" directly.
    Regards,
    Chen
    Edited by: Chen K V on May 4, 2011 12:37 PM

  • How many images per sec can I get from ImageIO.read(url) ??????

    Hello,
    In my program I read images from a url...I'm wondering how many images I can get with ImageIO.read(url) per second..
    Hereby is the code that I'm using:
    import java.awt.*; //Contains all of the classes for creating user interfaces and for painting graphics and images
    import java.awt.event.*;//Provides interfaces and classes for dealing with different types of events fired by AWT components
    import java.awt.image.*;//Provides classes for creating and modifying images
    import java.io.*;//Provides for system input and output through data streams, serialization and the file system
    import java.net.URL;
    import javax.imageio.*;//The main package of the Java Image I/O API.
    import javax.swing.*;//Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    import java.text.*;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    public class getPic extends Component{
    private BufferedImage img;
        static int n=0;
        private URL url;
        private DateFormat dateFormat;
        private Date date;
        private String s;
        private String str1= ".jpeg";
        private String str2="C:\\Users\\";
        private String str3;
        private String str4;
          public getPic() {
         try {
                  url = new URL("http://"); //a url that gives a real-time image
                  img = ImageIO.read(url);
                } catch (IOException e) {
               System.err.println("Unable to read file");
    public void savePic(){
    try{
    n++;
    str3=str2.concat(Integer.toString(n-1));
                        str4=str3.concat(str1);
                        ImageIO.write(img, "jpeg" , new File(str4));
                    } catch(IOException e) {
                      System.err.println("Unable to output results");
    @Override
        public Dimension getPreferredSize() {
            if (img == null) {
               return new Dimension(100,100);
            } else {
               return new Dimension(img.getWidth(), img.getHeight());
        @Override
          public void paint(Graphics g) {  //http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Paint.html
            g.drawImage(img, 10, 10, null);//http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Graphics.html
        public static void main(String[] args) throws IOException {
           JFrame f = new JFrame(" Image without processing!!");
           f.addWindowListener(new WindowAdapter(){//http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/WindowListener.html
                @Override
                    public void windowClosing(WindowEvent e) {
                        System.exit(0);
        int i=0;
        for( ; ; ){
            i++;
            getPic pi = new getPic();
            pi.savePic();
            f.add(pi);
            f.pack();  //Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
            f.setVisible(true);
         try
            Thread.sleep(1000);
            }catch (InterruptedException ie)
            System.out.println(ie.getMessage());
    }Thank you in advance for your answers
    Joan

    Finally I solved my problem(getting as many images as possible from a url infinitely) using the above code:
    import java.net.*;
    import java.io.*;
    public class UserApplication {
        private static int n=0;
        String url;
      public void UserApplication(){
        public static void main(String[] args) throws Exception {
            UserApplication app= new UserApplication();
            for(;;){
            app.urlStr();
        private void urlStr(){
            try{
                url= "http://mplamplampla/frame.php/";
                HttpURLConnection con=(HttpURLConnection) ((new URL(url).openConnection()));
                BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream("C:\\Users\\mpla\\Desktop\\" + n + ".jpeg"));
                con.setDoInput(true);
                con.setDoOutput(false);
                con.setRequestMethod("GET");
                BufferedInputStream in = new BufferedInputStream(con.getInputStream());
                int bt = 0;
                byte[] buffer = new byte[4096];
                while ((bt = in.read(buffer, 0, 4096)) > -1) {
                  out.write(buffer, 0, bt);
                in.close();
                out.close();
                System.out.println("Image " + n + " saved");
                n++;
                } catch (Exception e) {e.printStackTrace();}
    }

  • How do I keep track of how many times a method is called inside anthr clas?

    I am writing code for a program that solves a Knight's Tour. A Knight's Tour is a path a Knight Chess piece can take around the board starting at any spot, touching every square once, and only once. I have to write 2 classes and one is provided. The provided class is encrypted and written by our professor. All I know that it does is simulates the game using the two classes I write and provides a print out and prompts to ask the user which square they want to move to next.
    The square class I have to write consists of a constructor that makes a square object that keeps track of its color (white/black) and its status (whether it has been visited, is occupied by the knight, or is free and has not be visited).
    The GameBoard class I have to write is what I am having problems with. I am writing a method that determines how many squares have been visited. The previous mentioned class that my professor wrote for me contains a method moveKnight();. The way the program works is that every time moveKnight() is called a square's status is changed to occupied and therefore visited later. moveKnight() will only work if the move requested by the user is a valid move.
    SO! My main problem (sorry for all the explaining, just trying to give you all the information) is that I don't know how to keep track of how many times moveKnight() is called by the program. If i can figure this out it should be simple. I'm new to java but i believe...
    if(moveKnight() is called)
    {count++;} //count is a member variable already initialized
    return count;
    the moveKnight() is called section within the if() statement is what I am unclear how to do. Please help.
    Thanks, Veritas

    in your case you want 'count' to be a class attribute rather than a local variable. But yes, incrementing it each time that the method is called will serve your purpose.

Maybe you are looking for

  • Trading partner on Business Area Clearing Account

    Hi, I have configured business area wise financial statements for my client. But when doing cross-company code postings, the BA is not getting transferred to the company code clearing accounts. Is there a way to get it to transfer automatically ? In

  • How do I fix Firefox "untrusted websites" issues due to time change?

    I'm on the east coast of the United States. Since the time change, firefox refuses to let me surf to a majority of my websites. I can't use Google because every time I search on something, the "new" google page (the link with the search terms) comes

  • Creative zen to

    I have a zen touch, and it doesnt want to switch on. I think the battery is dead, it is out of warranty. where can i buy a new battery for it

  • Need to have a separate iCloud account for daughter's iPod touch

    I would like to manage all my iOS devices under one appleID, but with separate icloud accounts for my two daughters, each with their own iPod.  How do I retain my Apple ID on daughter's iPod but have a separate iCloud address so that she doesn't rece

  • Ciscoworks LMS 4.0 – Fault Device Details Issue

           We currently use Ciscoworks LMS 4.0 but when I go into,  Monitor > Fault Settings > Setup > Fault Device Details           I get the following message (see attached document with screenshot) and being a LMS newbie am unsure what to do? As have