HOW TO WRITE A DESKTOP APPLICATION IN JAVA

Hi guys
I am new to JAVA.Doing my garduation.
I want to write a desktop application in java, not browser based applet based.
I am stuck at some points
1)like how can i make the application run like the same way we run an .exe file
2)about the database connection
"For example, what are the issues in running a
Java application from a local C: drive on an Intel PC
that needs to access a local database or Excel file? "
Please guide me
Thanks
Tinu Joseph

Hi guys
I am new to JAVA.Doing my garduation.
I want to write a desktop application in java, not
browser based applet based.
I am stuck at some pointsLike how to write Java properly at all?
1)like how can i make the application run like the
same way we run an .exe fileWrite a .bat or .cmd file and have it start your Java app. Or Google for tools to create .exe for you.
2)about the database connection
"For example, what are the issues in running a
Java application from a local C: drive on an Intel PC
that needs to access a local database or Excel file?
"Better learn JDBC. Google for "JDBC tutorial".
%

Similar Messages

  • How to write a Timer application and deploy on an application server?

    Hello Everyone,
    How to write a Timer application which can be triggered according to a
    specified timetable and deploy on an application server?
    I know JMX(Java Management Extension) support Timer service, but my context
    is the service execute according to a tabletime
    user specified,not periodically. Do u know what i mean?
    Thanks in advance.
    Nov 4,2002

    Woodsonli,
    What about using a third party J2EE scheduler like Kronos
    See the following link
    http://www.indcon.com/
    Would that suit your needs?
    Chuck Nelson
    DRE
    BEA Technical Support

  • How to call a VB application from Java

    Hi,
    does anybody know how to call a VB application from java.
    Would appreciate if you can provide me with an example.
    thanks

    try exec()ing the cad program with the name of the file as a command line parameter...
    Runtime.getRuntime().exec("CADProg.exe Test.prt");
    i have no clue if this will work but it seems like it's worth a try.

  • How to create Remote Desktop Application in C# or port it from HTML5/JS project ?

    Hi
    How can create Remote Desktop Application in C# template ? I were searching on google but not found example or API for this.
    If can, please suggest for me some solution, example and document.
    And I have JavaScript project template Remote Desktop Application. Can i port it to c# ? Or use Webview to show it ?
    I were create demo use webview to show it but it not run. Maybe i do some mistake or can't be do it.
    Thanks.

    I have no other options.  We already provide the RDP plug-in for JavaScript. I'm not sure what else is needed for this.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with
    undefined objects and unknown namespaces.
    My project needs work with C# Windows Store. So I need RDP on C#, not JS. If we don't support C#, do we have a RDP spec on Windows 8.1 so that we can follow that spec to implement with native code to support RDP?

  • How to write a messenger with using java?

    May I know how to write a messenger with using java? The messenger need included two functions which are file transfer and add users to join the conversation.
    Thank you.

    Ok, so you need to start from the beginning, the requirements, is it a swing (i.e. GUI) app, web app, console, etc...?
    As stated by sprizor making an IM client is no easy task, you need to both implement the server side and the client side, which both communicate with each other, file transfers are also quite complex, and even maintaining a multi-user chat can be quite difficult.
    If you are after a Web Based app, then you will need to look into Push technologies, like Grizzly Comet which is a nice wrapper for the NIO java stuff:
    https://grizzly.dev.java.net/
    Good luck...

  • How to run a remote application (Non Java) from a Java program

    Could you please tell me how to run a remote application (Non-Java) from a Java program without using RMI. Please tell me know the procedure and classes to be used.
    Cheers
    Ram

    what do you mean remote application.In the other pc or in your pc just apart from you application?
    If the application is in your pc,the method which the upper has mentioned is
    a good one!
    But if the application you want to run is not in your computer,the method can't do. And you can use socket with which you can build an application listening some port in the pc which contains the application you want to run .When you want to run that application ,send the Start_Command to the listening application.Then listening application will run the application with the help of the method the upper mentioned.

  • Commercial Desktop applications in Java

    Hey all,
    Could someone give me some good examples of commercial desktop applications (except IDE's) written in Java?
    A friend of mine needs to convince his boss that Java is a feasible language for serious desktop applications.
    (It's so hard to convince some people that Java is not just 'web development'...)
    Thanks a lot,
    D

    Hi,
    www.deal4free.com
    Select a product (Spreadbet, CFD or Forex) and click
    on the Download Software Trial.
    Enter the registration details and you will receive an
    email providing you with log on details. You can also
    download the software from there.
    What is it?
    Marketmaker� V5 is an online, commision free trading
    platform, providing Spreadbetting, Contract For
    Difference (CFD) and Foreign Exchange trading. (Thats
    the marketing buff anyway)
    Basically its a Swing Application used by thousands of
    people daily. These people are effectively
    trading/betting with there own money, so if it didn't
    do what they wanted, they wouldn't use it.
    nes
    This reminds me, the Intercontinental Trading Exchange (Atlanta) has a Java API and also a ready-built application for trading commodities (Natural Gas, Oil, Jet Fuel etc). Millions of dollars are traded each day with this program. But you can't use/see/try it without a security login etc... So you'll just have to trust me. :-)

  • How to write select statement directly in java file instead of using vo

    Hi,
    I have written the following code in my java file:
    if(empvo==null)
    empvo=worklistamimpl2.createViewObject("InvoiceVO", "xxetfc.oracle.apps.icx.icatalog.shopping.server.InvoiceVO");
    if(empvo!=null){
    OAViewObject oaviewobject2 = (OAViewObject)worklistamimpl2.findViewObject("InvoiceVO");
    OAViewObjectImpl oaviewobjectimpl = (OAViewObjectImpl)oapagecontext.getApplicationModule(oawebbean).findViewObject("InvoiceVO");
    oaviewobject2.setWhereClause("Invoice_num="+" ' " + s + " ' ");
    oaviewobjectimpl.executeQuery();
    String abc = (String)oaviewobjectimpl.first().getAttribute("Invoice_id");
    It is giving me error as
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select invoice_id from ap_invoices_all) QRSLT WHERE (Invoice_num='ERS15022012_3')
    1. Why is this error coming.. how to solve this
    2. Instead of using vo how can i write select statement directly in the above code
    Thanks,
    Edited by: user10873676 on Apr 9, 2012 1:18 AM
    Edited by: user10873676 on Apr 9, 2012 1:21 AM

    it says java.sql.SQLSyntaxErrorException: ORA-00904: "INVOICE_NUM": invalid identifier
    where as invoice_num column is present in my table

  • How to write JDBC code in a java thread? for network programming

    Hii guys, i am new to java network programming. I developed small swing application for stock controlling in a shop, so i need to run the database in a server. i try the peer to peer scenario, but the response is too late and the application get stuck. there i wl put my data base java class
    please help me for this, how can i change this java class to networked JDBC
    import com.mysql.jdbc.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class ConnectionSet {
    private String severIp = "localhost";
    private String severPort = "3306";
    private String userName = "root";
    private String password = "123";
    private ResultSet rs;
    public void setSeverIp(String Ip) {
    severIp = Ip;
    public void setSeverPort(String Port) {
    severPort = Port;
    public void SetUserName(String Name) {
    userName = Name;
    public void setPassword(String passWord) {
    password = passWord;
    public ResultSet getResult(String url) throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection cc = (Connection) DriverManager.getConnection("jdbc:mysql://" + getSeverIp() + ":" + getSeverPort() + "/suriyalanka", getUserName(), getPassword());
    Statement s = cc.createStatement();
    rs = s.executeQuery(url);
    // java.sql.ResultSet rs = (ResultSet) DriverManager.getConnection("jdbc:mysql://"+getSeverIp()+":"+getSeverPort()+"/suriyalanka",getUserName(), getPassword()).createStatement().executeQuery(url);
    return rs;
    public Connection getConnection() throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection cc = (Connection) DriverManager.getConnection("jdbc:mysql://" + getSeverIp() + ":" + getSeverPort() + "/suriyalanka", getUserName(), getPassword());
    return cc;
    public void setResult(String url) throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection cc = (Connection) DriverManager.getConnection("jdbc:mysql://" + getSeverIp() + ":" + getSeverPort() + "/suriyalanka", getUserName(), getPassword());
    Statement s = (Statement) cc.createStatement();
    s.executeUpdate(url);
    public String getSeverIp() {
    return severIp;
    public String getSeverPort() {
    return severPort;
    public String getUserName() {
    return userName;
    public String getPassword() {
    return password;
    please help me for this, how can i change this java class to networked JDBC
    Edited by: 798670 on Sep 29, 2010 6:04 AM

    Have you verified that your mysql allows network connections?
    In order to allow network connections you have to comment or remove line "skip-networking" in my.ini(windows) or my.cnf(unix) configuration files of your mysql instance.
    Or if you have the mysql administrator installed
    MySQL Administrator / Startup Variables / Disable networking (uncheck)
    By!

  • How to write a SQL query in Java

    Hi, I'm writing a program that pulls all data from the database with a simple "SELECT * FROM [TABLE NAME]. The problem is that I don't know how to set it up properly. My code will only connect to the database but not execute the query. Please help.
    {code}import java.sql.*;
    import java.util.Properties;
    import java.sql.*;
    public class DatabaseSelect {
    public static void main(String[] args) {
    System.out.println("Connected to the database!");
    Connection conn = null;
    String url = "jdbc:oracle://localhost:1571/";
    String dbName = "jdbc";
    String driver = "com.oracle.jdbc.Driver";
    String userName = "HR";
    String password = "database";
    String query = "SELECT * FROM HR";
    try {
    Class.forName(driver).newInstance();
    conn = DriverManager.getConnection(url+dbName,userName,password);
    System.out.println("Connected to the database");
    } catch (Exception e) {
    e.printStackTrace();
    }{code}

    pbsacct_1 wrote:
    I added it between my System.out statement and the catch exception. This is what I put, but I'm getting the same result. I looks like a lot of errors. The only thing that prints is the "Connected to database".
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    ResultSet srs = stmt.executeQuery("SELECT * FROM HR");Here is what displays in the console.
    Connected to the database!
    java.lang.ClassNotFoundException: com.oracle.jdbc.Driver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at Discussion10.DatabaseSelect.main(DatabaseSelect.java:26)You are not connecting.
    Because you aren't even loading the driver.
    To be honest if you can't decipher a stack trace with "java.lang.ClassNotFoundException" on your own you are not ready for JDBC anyway.

  • How to write as XML file using java 1.5

    hi all,
    i am trying to create an XML file using java 1.5. I took a XML creating java file which was working with java 1.4 and ported same file into java 1.5 with changes according to the SAX and DOM implmentation in java 1.5 and tried to compile. But while writing as a file it throws error "cannot find the symbol."
    can any body help me out to solve this issue.......
    thankx in advance
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.NamedNodeMap;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.DocumentHandler;
    import org.xml.sax.InputSource;
    import org.xml.sax.helpers.ParserFactory;
    import java.io.*;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();                   
                   dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();                   
    Document xmlDoc =  db.newDocument();
    // this creates the xml document ref
    // parent node reference
    Element rootnd = (Element) xmlDoc.createElement("ALL_TABLES");
    // root node
    xmlDoc.appendChild(rootnd);
    Element rownd = (Element) xmlDoc.createElement("ROW");
    rootnd.appendChild(rownd);
    Element statusnd = (Element) xmlDoc.createElement("FILE_STATUS");
    rownd.appendChild(statusnd);
    statusnd.appendChild(xmlDoc.createTextNode("Y")
    FileOutputStream outpt = new FileOutputStream(outdir + "//forbranch.xml");
    Writer outf = new OutputStreamWriter(outpt, "UTF-8");
    //error is occuring here Since write method is not available in the Document class
    xmlDoc.write(outf);
    outf.flush();

    Hi,
    when I look in the JDK1.4.2 specification I don't see any write method in the Document interface.
    However, your solution is the Transformer class. There you transform your DOM tree into any output you need. Your code sould look something like this:     TransformerFactory tf = TransformerFactory.newInstance();
         // set all necessary features for your transformer -> see OutputKeys
         Transformer t = tf.newTransformer();
         t.transform(new DOMSource(xmlDoc), new StreamResult(file));Then you have your XML file stored in the file system.
    Hope it helps.

  • How to build a small application using Java API

    Hai expertise,
         I want to retreive MDM repository info using JAVA API, i am following these blogs:
    /people/andreas.seifried/blog/2006/03/26/performing-free-form-searches-with-mdm-java-api
    /people/udi.katz/blog/2005/08/21/retrieving-data-from-mdm-server-using-the-mdm-java-api
    /people/udi.katz/blog/2005/07/17/mdm-connectivity-to-java-application
    <b>where to get the jar and sda files to build the application??
    In Developer Studio.. Windows -> Preferences -> Java -> Classpath variables. Is this the only place where we need to give the jar file path??
    Are there any other configurations to do(except setting container variable to MDM4J jar file) to connect my java application to MDM repository???</b>
    Regards,
    Chand.

    Hi Govada,
    (1)You need to add the MDM4j and other JAR files at:-
    right click on project -> Java Build Path -> Libraries -> Add External JARs
    (2)If the project is Web Dynpro project one
    then right click on project -> Web Dynpro Reference -> Library Reference -> and add sap.com/com.sap.mdm.tech.mdm4j
    Are you using JAVA API 1 or 2???
    Thanking you
    Namrata Dixit

  • How to write c or c++ or Java languages in abap

    dear sir,
           i want to capture the screen and attach with mail content while  creating the support message in R/3 system .. i dont know how to capture the print screen button in ABAP .. but  i know in C , C++ and Java . i am having that code .. now i want to how to embed that code in ABAP editor .. Whether it is possible or not ..
    Please reply,
    Regards,
    kumar

    Hi kumaresan,
    though you can compile and execute JAVA script from ABAP , there is no compiler provided in ABAP for C / C++. You can have a look at the class - CL_JAVA_SCRIPT.
    if you are trying to capture and send a particular screen shot - possibly you need to create a ActiveX control - which will capture the screen and create the image file for you.  And at the same time it needs to pass back the binary streams for the image. SAP allows external call to Activex controls via OLE framework ( u ll getsamples for calling Excel, Custom Container etc ). may be u can try at that line.
    Bottom line is if you r  looking for C, C++ or Java compilers inside ABAP - i am afraid - its not possible..

  • How can I invoke JavaFX application in Java project

    I want to set an actionlistener on a button.When I click the button,it will run the JavaFX application.
    Any idea?Thanks in advance.

    A program that launches JavaFX programs? Something like this might work:
         * Launches the given JNLP file.
         * @param jnlpFileURL The url to the JNLP file of the JavaFX application we are launching.
        public void launchFXApplication(String jnlpFileURL) throws Exception {
            //Retrieve the runtime.
            Runtime runtime = Runtime.getRuntime();
            //Create the commands we will be executing.
            String[] commands = new String[] {
                System.getProperty("java.home") + File.separator + "bin" + File.separator + "javaws",
                jnlpFileURL
            //Execute it.
            final Process process = runtime.exec(commands);
            //Need to read the input.
            final BufferedReader errorReader = new BufferedReader(
                new InputStreamReader(process.getErrorStream()));
            final BufferedReader outputReader = new BufferedReader(
                new InputStreamReader(process.getInputStream()));
            //Input MUST be read and should be done in separate threads.
            Thread errorThread = new Thread(new Runnable() {
                public void run() {
                    String line;
                    try {
                        while ((line = errorReader.readLine()) != null) {
                            //Examine it if you like. Optional.
                        errorReader.close();
                    } catch (IOException ex) {
                        ex.printStackTrace();
            Thread outputThread = new Thread(new Runnable() {
                public void run() {
                    String line;
                    try {
                        while ((line = outputReader.readLine()) != null) {
                            //Doing something with the input is optional.
                        errorReader.close();
                    } catch (IOException ex) {
                        ex.printStackTrace();
            //Run the separate threads.
            errorThread.start();
            outputThread.start();
            //Wait until it's done.
            process.waitFor();
        }This code will of course need to be signed if you intend to launch it as an applet or via webstart.
    Edited by: aidreamer on Aug 14, 2011 8:35 PM

  • How to write call specs for a java stored procedure that takes a nested obj

    Example Class :
    public class B {
    int number;
    String str;
    public class A {
    private B[] _childern;
    public B[] getChildern(){
    return _children
    public static void saveAll(A a) throws SQLException {
    B[] children = a.getChildern();
    for(int i=0; i<children.length; i++){
    saveChild(children);
    public static void saveChild(B ch)throws SQLException {
    // do something
    What would be the call specification for the method A.saveAll(A)? Your help will be apprecited.
    Thank you
    Ajmal

    In other words, How to pass a Java Object from a Java stored procedure to a Java client ???
    Hello,
    I don't know to deal with a Vector object that has been generated from a stored procedure.
    Should I create first in the JDBC client and pass it as argument to the procedure ?
    Thanks in advance. Here is an extract ...
    On the client side :
    <<
    Vector buffer = new Vector();
    CallableStatement call =
    con.prepareCall ("{call my_procedure_run (?, ?)}");
    call.registerOutParameter(2, java.sql.Types.JAVA_OBJECT );
    call.setString (1, "bla bla bla");
    call.setObject (2, buffer);
    call.execute ();
    buffer = (Vector)call.getObject (2);
    >On the Java stored procedure
    <<
    public class my_procedure
    public static void Run(String input_value, Vector buffer)
    // ??? Vector buffer = new Vector();
    try
    while ( true )
    buffer.addElement(...) ;
    catch(Exception ex) { }

Maybe you are looking for

  • The option 'Display Credit Balance with negative sign" was not activated.

    I've encountered with a huge problem after load opening balance. I forgot to tick the  option 'Display Credit Balance with negative sign" It makes my client's Chart of Account  uncommon such as credit balance in Cash Account, AR ..... However, I've s

  • Problem with getting Dreamweaver CC to support ASP and ASPX

    My company and our developers have been using Dreamweaver for more than 10 years and over that time have used DW to build an ASP and SQL server based system with a code base of over 200 programs and literally thousands of web pages in many, many curr

  • OEM not working properly

    i have installed OEM 10g in windows2000. it is working normally untill yesterday. yesterday i keep playing with the import/export because it is not working properly. And all of a sudden, the OEM seems to slow down. Especially when i click on somethin

  • Spinning circle (not signed in)

    Since skype updated to 7.6 something the other day, I have been unable to sign in. I literally star the program and it just shows the spinning circle of dots, doesn't even get to the point where I can put in my log in details. I have been at this sin

  • HTML, JavaScript, Applets possible in Web-Dynpro Applications?

    Hello Community, I'm developing a JEE5-Application using Web-Dynpro for the User-Interface. Web-Dynpro works fine for the most functions and processes of the application. But there are some special requirements i don't know to implement them using We