Java batch program with wakeup

I am interested in developing a batch java program which will hopefully perform the following I need to know how to get started with a timed-event.
Application description:
I would like the java batch program to wakeup at 7:00 am each morning and read a database and fire an email with the resultset of the database query. I can handle the database query portion. I am looking for a solution for the wakeup at 7:00 am and the email.
Any direction would be helpfull.

Look up java.util.Timer, and java.util.TimerTask. It does exactly what you need in terms of a batch event running at 7:00am every morning. Alternatively, you can do it up as a simple program, and create a cron job.
As for e-mail, JavaMail isn't really that difficult. Look it up :)

Similar Messages

  • Batch program with COR1

    Hi :
    I want to create a batch program using call transaction for process order COR1.
    I need an example for this, by creating a recording " shbd " using COR1.
    Thanks.
    Rag

    hi,
    Go to SHDB transaction.
    Enter New Recording nameand Transaction Name as 'COR1', start new Recording
    You will get the First Screen: with Material No, Production Plant, Planning Plant,
    PO type etc, Enter the Mandatory fields, enter you will get the second screen , again enter the Mandatory fields in that SAVE the recording.
    Then go to PROGRAM in the Menu.It will create a Program  automatically.
    Then You have to modify that program littlebit as per your requirements, similar to a common BDC program.
    Hope this helps.
    Regards,
    Anji

  • Is it possible to create java standalone programs with java ME 8

    Hi,
    Comparing java ME to java SE, I have the impression that midlets are similar to applets.
    When working with java SE, I usually make standalone programs.
    Now, I wonder if it is also possible to create also standalone programs for java ME, if the classes are only  using java ME API's.
    I already noticed that netbeans does not allow to build a project that does not contain a midlet, but maybe, it is possible to create a jar file
    using the javac and jar commands. Or is there a specific reason why netbeans does not allow to build a project without midlets?
    The reason for asking is, that I often make small tools in java that ae then called from a linux script. I imagine that this might be useful on the raspberry pi as well.
    Thanks in advance
    Jef

    Hi Jef -
    Comparing java ME to java SE, I have the impression that midlets are similar to applets.
    Sort of - similar life cycle methods - so conceptually, yes.
    Now, I wonder if it is also possible to create also standalone programs for java ME, if the classes are only  using java ME API's.
    In a way, yes. If you build an project, you will notice a JAD file and JAR file in the dist directory of the project.  JAD is the descriptor for a MIDlet - in mobile devices, the JAD
    file is loaded first to determine if the MIDlet has enough privileges to load and run, before the corresponding JAR file is downloaded.
    However, the JAD file can also be included in the Manifest of the JAR and the JAR copied to the embedded device manually and run there.
    I already noticed that netbeans does not allow to build a project that does not contain a midlet, but maybe, it is possible to create a jar file
    using the javac and jar commands. Or is there a specific reason why netbeans does not allow to build a project without midlets?
    You can build JAR files and include them into Java ME Embedded projects, but just like Applets, to use the Application Management System (AMS) on the Raspberry Pi, you must have a MIDlet to run.
    Perhaps you mean that you would like to launch the AMS and load a MIDlet from the command line on the Pi?
    If so, take a look at this section of the Getting Started Guide for the Raspberry Pi.
    Tom

  • Can't run java program with GUI

    My computer can run java program properly.
    However, for those program with GUI (using swing),
    my computer is unable to display the GUI.
    What's wrong with it? Is there any PATH I need to set before running GUI program?
    Thanks
    icedgold

    Cut, copy, paste then compile and run this;-import java.awt.*;
    import javax.swing.*;
    public class MyJFrame extends JFrame {
      public MyJFrame() {
          super("My first JFrame");
          Container c  = getContentPane();
          JPanel panel = new JPanel();
          panel.setBackground(Color.white);//  (new Color(255, 255, 255));
          JLabel jl = new JLabel("Yes it works");
          panel.add(jl);     
          c.add(panel);
      public static void main(String[] args) {
        MyJFrame frame = new MyJFrame();
        frame.setSize(180,120);
        frame.setLocation(200, 300);
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.setVisible(true);
    }

  • Can i create an exetutable (.exe) program with java???????

    I would like to learn how i can create an exetutable (.exe) program with java.
    Is there any additional package which i should download or buy it?
    Also i would like to write files into CD's direct from my application.
    Is there any library which i must download or buy?
    Thanks!

    check out the free open source GNU gcj native compiler for Java to see if it will do what you want.
    http://gcc.gnu.org/java/
    for writing data files you could use java.io.BufferedWriter. For sound files, look in the javax.sound package

  • Never programmed with Java

    Hello
    I have never programmed with Java, and dont know, what i can do, I use PHP, but, i am only a novice at it.
    I was wondering, is it possable to get data from a page, and put it into an image? if there is no data from the page, it will ask for the data to be added, and this will update every so often?
    Also, Most of you know about google maps, where you can search for something, well, can i do this same thing in java, have a map, not of the earth, but for a game, and make it easy to add different parts, so that we can search for it, and people can find it easy to look for what they are looking for?

    I think Google Maps is programmed in JavaScript using AJAX (short for Asynchronous JavaScript and XML) and is what as known as a web application. Google has released an API (still in beta) for working with Google Maps. The webpage for this API is http://www.google.com/apis/maps/. More about the development facilities Google provides can be found at http://code.google.com/.
    I've never read the source code to Google Maps before (a lot of which is available by just viewing the source code of the Google Maps webpage, which can be done by clicking, View > Source in Internet Explorer and View > Page Source in Mozilla Firefox), however I don't think it is a terribly complex application (this does not mean, however, that the source code is easy to read). I think the way it works is by requesting individual images as needed from the Google server and piecing them together on the client side (i.e. in the browser). Basically what you would need to do to use their existing code is to replace all requests made to the Google server with requests to a server of your own and have the server return the corresponding images. This might not be particularly easy to do.
    In my opinion, a better approach is just to write your own custom application (probably in Java) which simply mimics the behavior of Google maps, except with your own custom images. This way, you don't have to reverse engineer an entire web application before beginning to write one.
    Writing your own application for this purpose is not as difficult as it sounds, especially not in Java. Once understanding the basics, you will not be too far off from being able to write your application.
    Let's start with the most basic program (this program would be located in a file called Program.java):
    public class Program {
       public static void main(String[] args) {
    }This program simply starts, does nothing, and exits. I will explain this piece of code line by line, but first, I would like to gauge how much you already know to figure out how best to explain this. Have you used classes in PHP before?

  • Why can't I run my Java program with just the JRE, the JDK is required?

    I've recently written 3 programs in Java using the Netbeans IDE with JDK 1.6 as the default Java platform. The compile-time libraries include the Swing Application Framework. I use BuildDesk from ProductiveMe to package the each program into a Windows installer.
    When I install the programs on a new computer without a JRE or JDK being present, and attempt to run them I get an error (as expected) stating that there is no JVM. The messages says that I need to install JDK 1.3 or higher. I downloaded the latest JRE onto the new computer and attempted to run the programs and I get the same error message. My question is, why can't I run these programs with just the JRE installed? Why do I need the JDK? When I install the JDK, the programs run fine. The typical user may not have the JDK on their system, but they likely have the JRE if they've run Java programs before.
    Is the answer as simple as there must be library functions being used by the programs that belong to the JDK, but not the JRE? I'd rather a user not have to install the JDK verses the JRE because they may also have to update some Windows environment variables.
    Thank you for any help on this issue.

    915088 wrote:
    Thanks for your replies. I further investigated BuildDesk and found an option which allows a JVM check but that check needs the JDK. I stopped the JVM check and rebuilt using BuildDesk and it now only requires the JRE to run the programs. The reason why I use BuildDesk is to package more than just the jar file for the user. BuildDesk allows me to create a installation folder structure as well as include any other files in the build. I could just as well zipped all this together for the user but decided against that method.I don't think anyone will question your usage of an installer tool; that is entirely up to you. But what is questionable is that you have problems with that installer tool and then go look for help in a Java programming forum. The next time, go look for help at the source. If there is no way to acquire help (support, a forum, a mailinglist, anything) then that is a very good reason to not use the product in question.

  • Interfacing a java program with hardware

    I need to be able to interface a java program
    with data in the parallel or serial ports of the computer.
    I have no idea how to go about this, could someone please help me.
    Thanks

    http://java.sun.com/products/javacomm/

  • OSX 10.4.10, Net beans and Sams Programing with JAVA

    I am brand new to Java so I downloaded Net Beans on my MAC. I bought a copy of Teach Your Self Programing with Java in 24 hrs.
    So far I got the first three programs to compile on Net Beans but got stuck when they started to talk about arguments. The following will not compile. Starting at line 2
    1) System.out.println("The " + arguments [0]
    2) + " " + arguments[1] + " fox "
    3) + "jumped over the "
    4) + arguments[2] + " dog. ")
    I get the little red x on each line.
    Is the book wrong or am I missing something?
    All the tutorials talk about Javac. I can't seem to find it or get to it on my computer. How do I know if I even have it?
    And is there such a thing as a "command line" on a MAC?

    Hi, you should put any code you post in between code brackets like this:
      code here   I dont use a mac or netbeans but javac is the java compiler, you would not have been able to compile the first two. The .exe (or whatever mac executable is) is usually located in the lib folder in the java directory. It comes when you download JDK. As for the code, it would help me if you posted the first couple lines of the error message. It looks fine to me, but I would need to see your whole class in order to help you further
    and yes there is a command line on a mac...i think its called terminal and usually looks like a little computer
    Edited by: jaredL on Sep 20, 2007 7:45 PM
    Edited by: jaredL on Sep 20, 2007 7:47 PM

  • Controling another program with java

    hi. i have some problems about java. i'm trying to control a program with my java codes.i'm trying to explain that i will write a program and this program will send some keys to another choosen program. forexample i will say my program that i want you to send "A" key to a game for 500 times and at the game my program will write AAAAAAA....... .i look for some examples in c++. c++ uses findwindow and postevent methods for this work but i couldn't find anything.
    so i want some help about this
    what can i do or where can i find some help
    sorry about my little english.
    thanks...

    look up the Robot object in Java 1.31 (I think) or later.

  • How can i run my java program with out java language

    Hai to every one ..Iam new to java language ...am using windows xp operating system , i did not installed java language in my system .. how can i run a java program with out installing java language... Which files is requied to run java program..?
    any one can help me??

    Hai to every one ..Iam new to java language ...am
    using windows xp operating system , i did not
    installed java language in my system .. how can i run
    a java program with out installing java language...
    you ... can ... not ... do ... this
    Which files is requied to run java program..?
    any one can help me??a JVM. Download it from sun's website.
    [url http://java.sun.com/javase/downloads/index.jsp]Download JavaSE here

  • How to run a standalone java program with JRC to display/run a report

    Hi All,
    I am new to this forum.
    I am trying to run a java program developed using JRC to run a report created using Crystal Report XI. I stucked because not knowing how to run that java program.
    Can anyone help me? or
    can give a simple java code to do the same.
    Thanks in advance.
    Saravanakumar.

    Hi Saravana
    For the steps to run a standalone application java program with JRC to display/run a report ,please refer the following link.
    http://support.businessobjects.com/communityCS/TechnicalPapers/cr_xi_r2_jrc_deployment.pdf.asp
    You can get the sample code for standalone/desktop applications from the following link.
    http://support.businessobjects.com/communityCS/FilesAndUpdates/crxi_r2_jrc_desktop_samples.zip.asp
    Please do revert in case of any queries.
    Thanks
    Soni

  • Using RDF XML output with custom java concurrent program.

    Hi, I started investigating the java API and did not find the way to use RDF XML output ? The goal is to use the Bursting engine to send out PDF generated from a "RDF XML" and a RTF template.
    Is there someone that could help be with this ?
    Thanks

    Hi Jacky
    Im looking to write a paper on this subject.
    Basically you can write a java conc program that will take the XML output from the Oracle Report and burst it. So you could tackle it a couple of ways.
    1. Have the JCP call the Oracle Report, sit and wait for it to complete then call the bursting engine with the XML and the control file. this has the advantage that its a single step for users to submit the report on the other hand you'll be writing a JCP specifically for that report.
    2. Write a generic JCP that can burst any XML, a little tougher to write but will have applications all over the Apps suites.
    Regards, Tim

  • Making a Java Server program talk with Word97

    Hi
    I realise that this is slightly off topic but I am now getting desperate, and would appreciate some help.
    I need help with how to get some info transfered from a java server
    program that is listening on a given port into my Word97.
    The idea is for the Word to send a request to the server and get a
    simple short text response back.
    I can handle the Java side of things OK, just how do I get word VBA to
    send a request to a given URL and get a response back. Word can get
    web pages so I would guess it should be able to do this. I have looked
    for other ways to do this transfer (eg CORBA) and so far no joy.
    thanks
    Efran

    HI
    Yes I did try a few of the vbs forums first since as you say they are more appropiate, but zero response!
    And now the deadline looms and still no solution, All I need to do is make Word and a Java programme communicate. Either with the Java as a Server or even a simple RTF copy and paste from Java to Word. But the problem with the one is when I paste it pastes as simple text. I have read the java tutorials on RTF and cpy/paste and the code given pastes as std text not RTF.
    Any help would be appreciated
    & thanks for the help
    cya

  • Starting Java Program with a bash Shell script

    Hi !
    I know this is a Linux query but I am putting it on this site to get different answers.
    I want to start my Java program with a shell script. Can anybody give me a proper script to start my Java program?
    I am using RH Linux 7.3 and JDK 1.4.
    Can I start the Java program without starting the terminal? Just like the Sun One Studio4 'runide.sh' script.
    Please help.
    Bye Niteen

    assuming you have your PATH and CLASSPATH variables set correctly, your script should look like this:
    #!/bin/bash
    cd <project_dir>
    java <class> &
    example:
    #!/bin/bash
    cd ~/projects
    java project1.main_package.MainClass &
    of course you could add some more elaborated stuff like compiling files before running the program, etc.
    if you dont like terminals, try running "nautilus" (it's like Windows Explorer). i never use nautilus (especially for running scripts), so i cant guarantee it will work, although i dont see why it shouldnt...

Maybe you are looking for

  • Java dc use another java dc with java.lang.NoClassDefFoundError

    Dear All: I've created 2 java dc. I assinged the second dc as a used dc for the first dc. I've created a web dynpro dc and add the first dc as used dc. I can build those three dc without any error, but when I deploy to server and run I got an excepti

  • Update with EAP SIM

    Free Mobile, provider in France, uses now Eap-sim on his network Free Wifi! The request of this compatibility will be now important from french customers! I see that Xperia S has this Eap-sim while it is absent in Android 4! So it is Sony who has add

  • SAP Portal changes not reflect in all the  servers without  reboot?

    Dear  SDN Members We have  one sap ep 7.0 eh1  main instance   and  4 other portal instances.every time  we tranport any  portal develpment work  such as epa packages, we need to restart all the instances to reflect the new changes.can you please sug

  • Ip ospf cost

    I will implement using OSPF cost higher for the best path, How does impact the OSPF network if increased value ip ospf cost, effect on latency & bandwidth?? below existing configuration. All interface Gigabits default cost "1", what is recommended co

  • Function: alm_me_notification_change

    Hi experts, i need to change cost center and wbs element in trans. iw22. i try to use this function without succeed.(i call this function and than i do commit) The sy-subrc = 0 and the "return" value is empty. thanks in advanced, Michal. Edited by: m