Making a java program on network

Hi,
I am not an expert in java. So far all my small programs were for fun but now I am thinking of making a small CRM program to help my friend in his business.
His office has two computers which are networked. So this small program which I am going to make for him to record phone calls, should be of networking program type. This is one the reason why I want to do this, because I have never done this before.
Users from both the computer will be using the program simultaneously.
Can you please give me some idea how to get started for some thing like this? I mean, I just dont know any thing about making a program run over network.
Thank you,

First you need to find a decent little database... the JavaDB would be fine for this or pretty much any DBMS. I prefer Oracle implementations. Then you need to find out how JDBC works and how to work with multiuser Databases.
I also strongly recommend you spend some time HERE, learning more about Java.

Similar Messages

  • Running a java program over network

    Hi,
    How a java program on a machine can be run without having JRE on the same machine, rather interpreting bytecode over network having JRE on another machine?

    Rahul.Kumar wrote:
    well, so my java program is running on x. Initialy X had JRE and on invoking java program from command prompt, it had looked for JRE at path, set in environmental settings. Now I moved JRE to another machine Y and connected these two machines (X and Y). You have two machines X and Y.
    "Connected" or not has nothing to do with this discussion.
    In X path is set to the JRE on Y. The path on X has absolutely nothing to do with anything on Y.
    Now execute java program on X, theoretically it should work or what is wrong with this?This makes no sense. Presuming you meant Y in the above then the following must be true.
    1. You must have a JRE on Y.
    2. You must have a java application on Y (or one accessible via the file system on Y.)
    3. You must be on Y and start the JRE passing the java application that is on Y to it.
    Notice in the above there is no mention of X. There can be no mention of X.

  • Making a java program work on windows xp  platforma without developer kit

    hi to you all!
    I've written some programs in java but until now I only had to compile and run them on my machine so there were no problems until now.
    I need now to write a little very easy program for a friend of mine and some other people who could need to use it. My friend said he wants a very "user-friendly" program so no command in ms dos prompt or stuff like that. I'm trying to make a .exe of my java program using "exe4j", is that good?
    second question: many of the people who will use my program have no idea of what java programming is and I don't think they want to download jdk and jre cause they won't be of any use to them, so how can I avoid this?
    is it possible?
    Thank you very much.

    Put the jre folder from your JDK install in your app folder.ok, but in this way he doesn't have to download jre
    but I have to add it to the app folder so that an
    application large just some kilobytes would become
    some megas bigger... unless I have misunderstood what
    you're suggesting me of course.Yeah, that's the downside. However, 17 MB isn't very large by todays standards.
    jre\javaw -cp <your classpath> <your main class><your classpath> is the class i need to be run's path
    or my classpath?
    jre\javaw has to be written like this or preceeded by
    the path of jre directory?As long as you point 'start in' to the correct directory, I don't believe you have to worry about that. That path you have there isn't quite right (neither was mine) but I think you've got that under control.
    You can give anm explicit path, then you can have different users with different start-in values and store their properties there automatically.

  • Making a java program run in Windows and Linux via web applets

    Hello, this is my first post at java.sun.com
    I made an application in Linux, using Jbuilder Fundation 2005. I used the JDBC MySQL connector for Linux, and I used Mandriva as a distro. What I did is a program that allows me to connect remotely to my server, in order to update the news.
    However I want to create an applet, in which you could click a button, and the main frame of the program will load. I have no idea how to do this, since this program runs great on my linux machine, and from what I know it uses the MySQL JDBC jar that's installed on my machine, and a lot of classes from the Jbuilder program directory.
    How could I upload this program to a webpage (with the applet idea that I mentioned earlier) so that both Linux and (especially) Windows clients could use it?
    It will also be nice to know how to create a .jar file that has all of the required classes in it, I know that Jbuilder enterprise does this, but I don't have that version or plan buying it.
    Thanks in advance

    Put the jre folder from your JDK install in your app folder.ok, but in this way he doesn't have to download jre
    but I have to add it to the app folder so that an
    application large just some kilobytes would become
    some megas bigger... unless I have misunderstood what
    you're suggesting me of course.Yeah, that's the downside. However, 17 MB isn't very large by todays standards.
    jre\javaw -cp <your classpath> <your main class><your classpath> is the class i need to be run's path
    or my classpath?
    jre\javaw has to be written like this or preceeded by
    the path of jre directory?As long as you point 'start in' to the correct directory, I don't believe you have to worry about that. That path you have there isn't quite right (neither was mine) but I think you've got that under control.
    You can give anm explicit path, then you can have different users with different start-in values and store their properties there automatically.

  • Making a Java Program run by itself

    Hi all I was wondering if there is anyway for me to make my game run by itself without using my java compiler bluej.
    Here is some information on my program I think will be helpful
    Its a Class
    I save highscores to a notepad file
    I use a lot of images
    I have audio within it
    I also have classes out side of it that runs inside of it like Emeny, Item
    Edited by: Quickfingers90 on Jun 11, 2009 4:21 AM

    Quickfingers90 wrote:
    I used Bluej to make my jar file from my message from above could someone post the code in a very simple format that any programmer can understand it.What are you asking? How to deploy your application in a JAR? [http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
    edit: I don't know if you've heard of idea, but many people in this forum swear by it: start simple and do things one step at a time. For example:
    Doing something new like JARring an application?
    Start with a "hello world"-type program. You may not have a console window when running the JAR, so you should write to a file, or use a JOptionPane.
    Try accessing a resource, like an image or sound file zipped in the JAR. Hint: don't use file paths or File objects -- the resource is part of a JAR, now. See:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getresource]

  • How can java programs execute automatically when it connects to network

    Good Day dears...
    How can java programs execute automatically when it connects to network.
    Thanks in Advance friends Shackir

    884924 wrote:
    Good Day dears...
    How can java programs execute automatically when it connects to network.What is "it"? That is, execute when what connects to the network?
    Your computer? If that's what you mean, this is not a Java question. It's an OS operational/administrative question. Executing any program, whether written in Java or not, based on some system event has to do with that system, not with the program. If it's possible to do this, you'd do it exactly the same way for a Java program as you would for any other program.
    Or is "it" the program itself? If this is what you mean, then it's a nonsensical question. For the program to connect to the network and detect that it has connected to the network, it must already be executing, so asking how to execute it at that point is meaningless.
    Finally, I'll point out that "connecting to the network" is a pretty meaningless phrase. Or rather, it has so many potentially valid meanings that it's impossible to know which one you're referring to when you use that phrase. And I'd be willing to bet you don't have a clear picture of that yourself.

  • Networking a java program

    I'm interested in creating a java program that will run on a webserver and will be used by 4 different people interactivly, like a card game. I have created java programs before but never for a network environment and never used by more than one person at a time. could anyone point me in the right direction as to what i need to do to create this interactive network program?
    thanks

    well ur looking at two things. First of all, u need threading for ur program to have the ability to be used simulaneously by more than 1 person. and then u need to learn how to network program I can only suggest some books to learn network programming and I am sure you can find a lot on threading in most java books. Let me know if you wanna know the books, i can't remember the names at this point

  • What is the  best money making java program?

    what is the best money making java program?
    any of them are in fact very "simple"? - say in fact can be develop by a middle- level programmer.

    public class MoneyMaker {
       public static void main(String[] args) {
          while (true) {
             System.out.println("+-----------------------------------------------+");
             System.out.println("| 10        RESERVE BANK OF INDIA \"93T 872468\"  |");
             System.out.println("|                                               |");
             System.out.println("|   ______                                   10 |");
             System.out.println("|  /      \\             __          ____        |");
             System.out.println("|  |      |        /|  /  \\        /  __\\       |");
             System.out.println("|  |      |         | |    |       0_o  \\\\      |");
             System.out.println("|  |      |         | |    |      /      ||     |");
             System.out.println("|  |      |         |  \\  /       `==    ||     |");
             System.out.println("|  |      |        ===  **         \\    /       |");
             System.out.println("|  |      |                        /\\--/        |");
             System.out.println("|  \\______/                       /______   /\\  |");
             System.out.println("|                                           \\/  |");
             System.out.println("| \"93T 872468\"                                  |");
             System.out.println("+-----------------------------------------------+");
             System.out.println("");
    }

  • Making batch files to execute java programs in windows

    In my comp sci class, i found a folder with a batch file, an application file, and all class files necessary to run the program.
    how do i take my java program and make a batch file to run it (in dos) like that program in my comp sci class?

    Okay, here are your steps for running a java program from a batch file:
    1) Open Notepad
    2) type the following:
    set JAVA_HOME=C:\j2sdk1.4.0_03 // specify the path where your jdk is
    set path=%JAVA_HOME%\bin;.
    javac {-classpath .;one.jar;two.jar} YourProgramName.java
    java {-classpath .;one.jar;two.jar} YourProgramName
    The stuffs inside {} is not necessary if your program doesnt use any .jar files.
    3) Save the notepad as mybatch.bat in the directory where your Java program is located.
    4) In the DOS prompt, go to the directory where you have .java and .bat files
    (use 'cd' command)
    5) Now, type mybatch.bat and press ENTER.
    Thatz it. Your program runs like a charm now!!!
    (provided the compiler is pleased with ur code :)
    -- layman's pal

  • Makeing java programming friends

    hi,thanks for focus on this.
    i am a chinese guy,working for a federal software company,having about half and one years java programming studying and working experience,which are mainly about jsp and j2ee programming. i am not very good at english ,but i am working on it. so i wanna more communication .and i think,maybe ,to java beginner, my experiense can make some help,Surely,i am a beginner.so hope to meet many friends.
    my msn is: [email protected]
    my freqently used email is: [email protected]
    Best Regards.
    Ryan Zhang

    Then go over to the JSP forum and try answering some
    questions. Even if you do not feel that your English
    is good enough, still see if you can find an answer.
    You do not have to actually post the answer. But if
    you are confident in your answer, go ahead and post
    it. Nobody will complain about your English skills.
    Only if the answer is wrong, will people complain.That's a very good advice. I'm answering questions because I want to become better in English, and I have learnt many new words since I started answering, but I have to admit that most of the new words and expressions comes from the off topic threads, and from Annies posts :)
    /Kaj

  • Help me making java program by Jcreator

    1. reversing an integer problem:
    a. write a program that allows a user to enter an integer up to 4 digits in length. The program should then reverse the order of the integer. The new number should have it's full decimal value (e.g. 432 is really 3*100 + 2*10+ 1*1)
    Enter number:123
    The reversal is 321
    Enter number:1005
    The reversal is 5001

    OK the specification said smth. about decimal extension, here it is:
    EXPLANATION:
    I am just a 'medium-advanced' Java programer and do this because I wan't to
    write more code and gather experience.
    And if I just write code but don't show it to any body it would get wasted...
    OK , ok now on I Stop helping Trolls and laymen.
    * @author melhiah
    public class ReverseAnInteger {
        private static final int MAX_INT_LEN = 6;
        public static void main(String[] args) throws Exception {
    /*        if(args.length < 1) {
                System.out.println("Usage: java ReverseAnInteger <integer-value>");
                System.exit(0);
            //String parsedIntegerString = args[0].substring(0, MAX_INT_LEN);
            String testIntegerString = "1234567890";
            String parsedIntegerString;
            if(testIntegerString.length() < MAX_INT_LEN) {
                parsedIntegerString = testIntegerString.substring(0,
                        testIntegerString.length());
            } else {
                parsedIntegerString = testIntegerString.substring(0, MAX_INT_LEN);
            String reversedIntegerString = showDecimalExtension(
                    reverseInt(parsedIntegerString));
            System.out.println(reversedIntegerString);
        private static String reverseInt(String intString) {
            char[] charString = intString.toCharArray();
            char[] resultString = new char[charString.length];
            int top = charString.length;
            for(int i = 0; i < charString.length; i++) {
                resultString[i] = charString[--top];
            return new String(resultString);
        private static String showDecimalExtension(String intString) {
            StringBuffer buffer = new StringBuffer();
            StringBuffer sb = new StringBuffer(); sb.append("1");
            for(int i = 1; i < intString.length(); i++) {
                sb.append("0");
            String decim = sb.toString();
            for(int i = 0; i < intString.length(); i++) {
                String str = intString.charAt(i) + "*" + decim + " + ";
                decim = decim.substring(0, decim.length() -1);
                buffer.append(str);
            String result = buffer.substring(0, buffer.length() -3); // to get rid of the trailing '+'
            return result;
    }

  • Error in ONS logs while implmenting FCF on oracle RAC from java program

    I have java prog on client machine that uses properties from a property file.While making the connection to the ONS port on the oracle RAC server to implement FCF the program is throwing error as below:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    and when i checked the ons logs for that node the logs are as follows:
    Connection 5,199.xxx.xxxxxx,8200 header RCV failed (Connect
    ion reset by peer) coFlags=1002a
    These logs are generated only when java program tries to connect else the daemon started without any errors.
    But sometime it connets and gives the desired output.
    Please advice and do let me know in case you need more information.
    Java program on the client machine is as follows..
    * Oracle Support Services
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Enumeration;
    import java.util.Properties;
    import java.util.ResourceBundle;
    import oracle.jdbc.pool.OracleConnectionCacheManager;
    import oracle.jdbc.pool.OracleDataSource;
    public class FCFConnectionCacheExample
    private OracleDataSource ods = null;
    private OracleConnectionCacheManager occm = null;
    private Properties cacheProperties = null;
    public FCFConnectionCacheExample() throws SQLException
    // create a cache manager
    occm = OracleConnectionCacheManager.getConnectionCacheManagerInstance();
    Properties props = loadProperties("fcfcache");
    cacheProperties = new java.util.Properties();
    cacheProperties.setProperty("InitialLimit", (String)props.get("InitialLimit"));
    cacheProperties.setProperty("MinLimit", (String)props.get("MinLimit"));
    cacheProperties.setProperty("MaxLimit", (String)props.get("MaxLimit"));
    ods = new OracleDataSource();
    ods.setUser((String)props.get("username"));
    ods.setPassword((String)props.get("password"));
    ods.setConnectionCachingEnabled(true);
    ods.setFastConnectionFailoverEnabled(true);
    ods.setConnectionCacheName("MyCache");
    ods.setONSConfiguration((String)props.get("onsconfig"));
    ods.setURL((String)props.get("url"));
    occm.createCache("MyCache", ods, cacheProperties);
    private Properties loadProperties (String file)
    Properties prop = new Properties();
    ResourceBundle bundle = ResourceBundle.getBundle(file);
    Enumeration enumlist = bundle.getKeys();
    String key = null;
    while (enumlist.hasMoreElements())
    key = (String) enumlist.nextElement();
    prop.put(key, bundle.getObject(key));
    return prop;
    public void run() throws Exception
    Connection conn = null;
    Statement stmt = null;
    ResultSet rset = null;
    String sQuery =
    "select sys_context('userenv', 'instance_name'), " +
    "sys_context('userenv', 'server_host'), " +
    "sys_context('userenv', 'service_name') " +
    "from dual";
    try
    conn = null;
    conn = ods.getConnection();
    stmt = conn.createStatement();
    rset = stmt.executeQuery(sQuery);
    rset.next();
    System.out.println("-----------");
    System.out.println("Instance -> " + rset.getString(1));
    System.out.println("Host -> " + rset.getString(2));
    System.out.println("Service -> " + rset.getString(3));
    System.out.println("NumberOfAvailableConnections: " +
    occm.getNumberOfAvailableConnections("MyCache"));
    System.out.println("NumberOfActiveConnections: " +
    occm.getNumberOfActiveConnections("MyCache"));
    System.out.println("-----------");
    catch (SQLException sqle)
    while (sqle != null)
    System.out.println("SQL State: " + sqle.getSQLState());
    System.out.println("Vendor Specific code: " +
    sqle.getErrorCode());
    Throwable te = sqle.getCause();
    while (te != null) {
    System.out.print("Throwable: " + te);
    te = te.getCause();
    sqle.printStackTrace();
    sqle = sqle.getNextException();
    finally
    try
    rset.close();
    stmt.close();
    conn.close();
    catch (SQLException sqle2)
    System.out.println("Error during close");
    public static void main(String[] args)
    System.out.println(">> PROGRAM using JDBC thin driver no oracle client required");
    System.out.println(">> ojdbc14.jar and ons.jar must be in the CLASSPATH");
    System.out.println(">> Press CNTRL C to exit running program\n");
    try
    FCFConnectionCacheExample test = new FCFConnectionCacheExample();
    while (true)
    test.run();
    Thread.currentThread().sleep(10000);
    catch (InterruptedException e)
    System.out.println("PROGRAM Ended by user");
    catch (Exception ex)
    System.out.println("Error Occurred in MAIN");
    ex.printStackTrace();
    Some of the info i have deleted intensionally as this is confidential
    Property file is as follows
    # properties required for test
    username=test
    password=test
    InitialLimit=10
    MinLimit=10
    MaxLimit=20
    onsconfig=nodes=RAC-node1:port,RAC-node2:port
    url=jdbc:oracle:thin:@(DESCRIPTION= \
    (LOAD_BALANCE=yes) \
    (ADDRESS=(PROTOCOL=TCP)(HOST=RAC-node1)(PORT=1521)) \
    (ADDRESS=(PROTOCOL=TCP)(HOST=RAC-node1)(PORT=1521)) \
    (CONNECT_DATA=(service_name=RAC_SERVICE)))

    Hi;
    Please check below note:
    Link Errors While Installing CRS & RAC Database software [ID 438747.1]
    Codeword File $TIMEBOMB_CWD,/opt/aCC/newconfig/aCC.cwd Missing Or Empty [ID 552893.1]
    Regard
    Helios

  • Running a Java Program for every shut down of system

    Hi
    I have a java program that sends an email to the Admin of my network.
    But this is program i just want to execute for every shutdown and on of my system
    Please Tell me how to execute my java program at system shutdown time and on time..
    Thanks

    Despite your objective, this is not a Java issue. The real question is "How does one run a program just before system shutdown?"
    How you execute such an application is system dependent. Java doesn't know when the system shuts down, only when the JVM shuts down. Unless you're willing to have JVM running the entire time the system is up, you'll need native code to detect system shutdown & launch the notification app.

  • How do I establish a connection to another Java program on the net?

    Hi all,
    I have been reading the java tutorial to find a solution to my problem but I havent really found what Im looking for.
    I want to establish a connection that allows a client to get a copy of an object from a running java-application on a server on the internet.
    I have read about the Socket-class but the tutoral advices only to use it on a locale network. I know IDL and RMI only by name - is this what I should be reading about?
    If one of you guys have a source-code example on how to make java programs communicate over the net, please post it!
    Regards Albert

    Assuming this is "wide area" stuff, not just on a local area network, your best bet is to stick to http connections. You need a web server, probably Tomcat.
    Your client can connect using URL.openConnection().
    As to protocols you could use SOAP. It has the advantage that you can get the code for it for free, but it can be pretty complicated to configure. In particular it only knows how to transmit a limited set of object types and if you want to go beyond them you have to write converters. SOAP servers typically run under an web server anyway. SOAP converts all the data to XML for transmission.
    However it may be simpler to use Java's built in serialisation facility and send your data as an ObjectStream.
    In the set up you're talking about the message going to the server seems a lot simpler than the response. It may make sense to send your data as normal keyword parameters of a POST transaction but to have the server respond with an Object stream. That's well within the normal operation of a web server.

  • Using a UNIX shell script to run a Java program (packaged in a JAR)

    Hi,
    I have an application (very small) that connects to our database. It needs to run in our UNIX environment so I've been working on a shell script to set the class path and call the JAR file. I'm not making a lot of progress on my own. I've attached the KSH (korn shell script) file code.
    Thanks in advance to anyone who knows how to set the class path and / or call the JAR file.
    loggedinuser="$(whoami)"
    CFG_DIR="`dirname $0`"
    EXIT_STATUS=${SUCCESS}
    export PATH=/opt/java1.3/bin:$PATH
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIR
    java -classpath $
    EXIT_STATUS=$?
    cd $OLDDIR
    echo $EXIT_STATUS
    exit $EXIT_STATUS

    Hi,
    I have an application (very small) that connects to
    our database. It needs to run in our UNIX environment
    so I've been working on a shell script to set the
    class path and call the JAR file.
    #!/bin/sh
    exec /your/path/to/java -cp your:class:paths:here -MoreJvmOptionsHere your.package.and.YourClass "$@"Store this is a file of any name, e.g. yuckiduck, and then change the persmissions to executechmod a+x yuckiduckThe exec makes sure the shell used to run the script does not hang around until that java program finishes. While this is only a minor thing, it is nevertheless infinite waste, because it does use some resources but the return on that investment is 0.
    CFG_DIR="`dirname $0`"You would like to fetch the directory of the installation out of $0. This breaks as soon as someone makes a (soft) link in some other directory to this script and calls it by its soft linked name. Your best bet if you don't know a lot of script programming is to hardcode CFG_DIR.
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIRVery bad technique in UNIX. UNIX supports the notion of a "current directory". If your user calls this program in a certain directory, you should assume that (s)he does this on purpose. Making your application dependent on a start in a certain directory ignores the very helpful concept of 'current directory' and is therefore a bug.
    cd $OLDDIRThis has no effect at all because it only affects the next two lines of code and nothing else. These two lines, however, don't depend on the current directory. In particular this (as the cd above) does not change the current directory for the interactive shell your user is working in.
    echo $EXIT_STATUS
    exit $EXIT_STATUSEchoing the exit status is an interesting idea, but if you don't do this for a very specific purpose, I recommend not to do this for the simple reason that no other UNIX program does it.
    Harald.

Maybe you are looking for

  • Apple TV Gen 3? Video issues

    Recently on 11-29-2014 I purchased a brand new Apple TV from Target. I finally had some time to set it up today 12-4-14. I bought a pack of brand new HDMI cables and hooked the Apple TV up to the nice new LG 40" LED TV that I have in my room. I plugg

  • DeadLocks on Query Notifications with SQL Server 2008 SP3

    Hello, according to this article https://support.microsoft.com/kb/975090 the issue with deadlocks on query notifications should be fixed with SQL Server 2008 SP3 (10.0.5500.0). But we still get deadlocks in the following manner: <resource-list> <keyl

  • How do I transfer the music from my phone to iTunes?

    Need help with transferring my music and pictures into my iTunes that doesn't have them there already.

  • Fireworks CS6 trial is very slow on Windows 7

    I'm not sure what's going on, but it's bound to be fixable. I've downloaded and installed the Fireworks CS6 trial and it's stalling after performing simple tasks. The only way I know to describe it is like this -- here are a few examples: Try to crea

  • IWeb not updating site changes, even overnight!

    Hi iWeb-experts, Having problems with iWeb and have waded through the site and other forums and yet to find a solution. Site is marccheckley.com. I successfully moved the site before MobileMe closed shop and made updates to the site a few months back