Java Programming Resources for starting out

Hey guys,
What are the best resources for starting out with Java. I did a bit of work with Java in my Uni course but it was about 2 years ago. I'd like to go over it from the start and get familar with everything again.
Can anyone suggest some good places to get Resources, Tutorials and Exercises for Java Programming?
Thanks in advance.

Getting Started With Java
[Sun's basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
[Sun's New To Java Center|http://java.sun.com/learning/new2java/index.html]
Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
jGuru
A general Java resource site. Includes FAQs, forums, courses, more.
[Yawmarks List|http://forums.devshed.com/java-help-9/resources-for-learning-java-249225.html]
[The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance]
[http://javaalmanac.com|http://javaalmanac.com]
Bruce Eckel's [Thinking in Java(Available online.)|http://mindview.net/Books/DownloadSites]
Joshua Bloch's [Effective Java|http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]
Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance ]
James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806]
Gosling is the creator of Java. It doesn't get much more authoritative than this.
Joshua Bloch and Neal Gafter [Java Puzzlers.|http://www.javapuzzlers.com/]

Similar Messages

  • Java programming guide for Sun ONE

    Where can I find the "Sun ONE LDAP SDK for Java Programming Guide" for version 5.2. ?
    I have the programming guide for Netscape Directory SDK 4.0 for Java. Will that do?
    Thanks for your help.
    [email protected]

    this to also create and manage the LDAP groups. We
    are using the Sun ONE 5.2 LDAP directory server. Are
    there significant advantages to using JNDI over the
    SunONE directory SDK, or vice versa?JNDI (bundled with J2SE) in combination with the Booster Pack release version 1.0, provides API support for accessing both static and dynamic Groups. It also provides API support for the new extensions and controls that are made available in Sun ONE DS 5.2.
    The Booster Pack can be downloaded from:
    http://java.sun.com/products/jndi/
    You can also check the LDAP trail of the JNDI Tutorial that contains detailed descriptions and examples of how to use JNDI . It is available at:
    http://java.sun.com/products/jndi/tutorial/ldap/index.html

  • How to start a java program as a start-up service in Linux?

    i sucessfully started a java program by adding a script to /etc/init.d,
    but in the script, i have to type the full path of the java laucher, the environment variables are not loaded on startup, what should be done to avoid the full path in the script? Any one has a similiar experience or got a solution to share?

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • Java Programming Exercises for Begginers?

    I am doing some self study on JAVA and looking for some programming exercises. If anyone could give me resources it would be a lot of help. thanks
    Message was edited by:
    the_atom

    Both these links are pretty good.
    http://www.freejavaguide.com/corejava.htm
    http://www.java.sun.com/docs/books/tutorial/

  • Accessing oracle DB from a java program - question for oracle driver

    Hi,
    I have Oracle 10 G under vista on my desktop. I am trying to write a simple java program to access/update database tables. I saw in one of oracle example to import 2 packages - namely --- import oracle.jdbc.driver.*; import oracle.sql.*;
    Where do I find these 2 packages. Also I read some documentation to download drivers. I would like to use 2 drivers, the thin driver and the OCI driver. Can someone tell me where I can find these drivers and where do I copy these two drivers - so javac and java command can recognize it.
    I will greatly appreciate the help. Julia
    My program is as follows
    (It was working few years ago but things have changed now and I have Vista because my old machine died):
    import java.sql.*; // JDBC package
    //import com.inet.tds.JDBCRowSet;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.*;
    public class HomeDB
    run as follows:
    C:\Documents and Settings\MMM>cd \jj
    C:\john>set CLASSPATH=.;c:\oracle9i\classes12;%CLASSPATH%
    C:\john>javac HomeDB.java
    C:\john>java HomeDB
    King: 24000.0
    Kochhar: 17000.0
    De Haan: 17000.0
    Hunold: 9000.0
    Ernst: 6000.0
    Austin: 4800.0
    public static void main(String[] argv)throws SQLException
    Connection conn=null;
    try // may throw a SQLException
    conn = getConnection();
    doQuery (conn);
    catch (SQLException e)
    System.err.println(e.getErrorCode() + ": " + e.getMessage());
    finally // make sure the connection is closed
    if (conn != null) try {conn.close();} catch (SQLException e) {};
    //out.close(); // close PrintWriter stream
    private static Connection getConnection() throws SQLException
    String username = "scott";
    String password = "tiger";
    String url = "jdbc:oracle:thin:@localhost:1521:newora";
    // "jdbc:oracle:thin:@localhost:1521:COCKYJOB";
    Connection conn = null;
    String driver = "oracle.jdbc.driver.OracleDriver";
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    } catch ( ClassNotFoundException cnfex ) {
    System.err.println(
    "Failed to load JDBC/ODBC driver." );
    cnfex.printStackTrace();
    }catch (Exception e){
    e.printStackTrace();
    //DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    conn = java.sql.DriverManager.getConnection(url,username,password);
    conn.setAutoCommit(false);
    return conn;
    private static void doQuery (Connection c) throws SQLException
    // statement to be executed
    String query = "SELECT ename, job, mgr FROM EMP";
    Statement st = null;
    ResultSet rs = null;
    try // make sure the close statements are executed (in the finally block)
    // create the statement
    st = c.createStatement();
    // execute the query
    rs = st.executeQuery(query);
    // process results
    while (rs.next())
    // get the employee last name
    String eName = rs.getString("ename");
    String eJob = rs.getString("job");
    String eMgr = rs.getString("mgr");
    System.out.println("Emp Name:" + eName +
    "Job: " + eJob +
    "MGR: " + eMgr);
    finally // make sure the close statements are executed
    // close the result set if it exists
    if (rs != null) try {rs.close();} catch (Exception e) {};
    // close the statement if it exists
    if (st != null) try {st.close();} catch (Exception e) {};
    Edited by: user455788 on Dec 19, 2008 9:13 PM

    You can download the drivers from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html.
    Note that oracle.jdbc.driver is desupported after 10.2, http://forums.oracle.com/forums/ann.jspa?annID=201, so you might want to consider using a DataSource to provide Connections.
    E.G.
    {message:id=2819114}

  • Transaction/Program/FM for finding out Total Expenditure of Project

    Hi Gurus,
    Can any one please tell me, is there any Transaction code/Program/FM to find out the
    <b>Total Expenditures on any particular project </b>
    Thanks in advance
    Warm Regards,
    Izhar Khan

    Hi Khan
    There are many reports which are available to check the cost of a particular project
    Project System->Financials->Information Systems->
    Or try TCode CJI3.
    Assign points.
    Regards,
    Suraj

  • Desktop java program: wait for page to load

    We're using a macro-builder which records actions and re-executes them via a java program. Basically, the program is supposed to open IE, go to a page, enter a username and password, and click a link within the new page that comes up after login. The issue at hand is that the second page takes too long to load, and the recorded "click" in the macro occurs to soon. Is there any way to identify when the page has completed loading before the app continues?
    Thanks,
    Jonathan

    Is there any way to identify when the page has
    completed loading before the app continues?Not in Java. Probably not even in Visual Basic (I wrote some VB programs that attempted to do that sort of thing several years ago and they never worked properly).

  • Java program to automatically fill out and submit a Web form

    I need to write a program to set the fields of a Web form and submit it automatically.
    Can anyone help?
    Thanks in advance!

    heres some code I have been messing about with
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.security.*;
    import java.net.*;
    /** Author :James Charles 20/03/2004
    This module handles the customer booking screen **/
    public class Bookings extends Applet implements ActionListener,   // sets up the initial display screen
    ItemListener
         Choice details;
         TextField name;
         TextField telephone;
         TextField email;
         TextField address;
         TextField postCode;
         Color webPage = new Color(0,128,255);
         Button btnClick;
         String nameOutput =" ",telephoneOutput=" ",emailOutput=" ",addressOutput=" ",postCodeOutput=" ";
         int jobNumber;
         int authorisationCode ;
         Font formEntry = new Font("SanSerif",Font.BOLD,15);
         Font dataDisplay = new Font("SanSerif",Font.PLAIN,16);
         boolean dataEntry = false;
         int position = 2;
         String[] detailsOutput = { "Choose a Subcontractor","Painter & Decorator","Electrician" };
         public void init(){
              readJobNumber(jobNumber);  // reads the las job number from file jobNumber.dat
              Button btnClick = new Button("Submit Details");
              setBackground(webPage);
              add(new Label("                           Name"));
              name = new TextField(30);
              add(name);
              add(new Label("                           Telephone"));
              telephone = new TextField(25);
              add(telephone);
              add(new Label("House No"));
              address = new TextField(3);
              add(address);
              add(new Label("Post Code"));
              postCode = new TextField(8);
              add(postCode);
              add(new Label("E-Mail address"));
              email = new TextField(35);
              add(email);
         public void start(){
              add(new Label("                                                                       Please choice the appropriate Tradesman that you require"));
                        // choice code set up
              details = new Choice() ;
              details.addItemListener(this);
              details.add("Choose a Sub Contractor");
              details.add("Painter & Decorator");
              details.add("Electrician");
              details.select(0);
              add(details);
              btnClick = new Button("Submit Details");
              btnClick.addActionListener(this);
              add(btnClick);
              btnClick.setEnabled(false);
         public void actionPerformed(ActionEvent e) {
              System.out.println("Was in action performed event =" + e);
              dataEntry = true;
              nameOutput = name.getText();
              telephoneOutput = telephone.getText();
              emailOutput = email.getText();
              authorisationCode = (int)(java.lang.Math.random() * 100000);
              if (dataEntry == true){
                   btnClick.setEnabled(false);
                   repaint();
                   System.out.println("In between paint and write");
                   WriteBookings(nameOutput,telephoneOutput,emailOutput);
         public void itemStateChanged(ItemEvent e) {
              position = details.getSelectedIndex();
              System.out.println("Position in itemStateChanged after getSeletedIndex = " + position);
              btnClick.setEnabled(true);
              repaint();
         public void WriteBookings(String nameOutput,String telephoneOutput,String emailOutput)   {               
                       writeJobNumber(jobNumber);
              try{     
                   DataInputStream in = new DataInputStream(new      FileInputStream("CustomerDetails.txt"));
                   char singleChar;          
                   DataOutputStream out = new DataOutputStream(new FileOutputStream("CustomerDetailsNew.txt"));
              /**     try {
                        jobNumber =in.readInt();            // this code reads last job number and increments it
                        singleChar = in.readChar();
                        jobNumber ++;
                        out.writeInt(jobNumber);
                        out.write('\n');
                        while (true){                           // this code
                             singleChar = in.readChar();
                             out.writeChar(singleChar);
                   catch (EOFException e) { }
              out.writeChars(nameOutput);
                    out.writeChar('\t');
              out.writeChars(telephoneOutput);
                    out.writeChar('\t');
              out.writeChars(emailOutput);
              out.writeChar('\t');
              out.writeInt(jobNumber);
              out.writeChar('\t');
              out.writeInt(authorisationCode);
              out.writeChar('\t');
              out.writeChars(detailsOutput[position]);
                    out.writeChar('\n');
              out.close();             
           catch (IOException e){
              System.out.println("Error: " + e);
              System.out.println("Close File"); //*********** End of read/write process, code below renames the new file to the input file
              File fileDelete = new File("CustomerDetails.txt");
              fileDelete.delete();
              try{     
                   DataInputStream in = new DataInputStream(new      FileInputStream("CustomerDetailsNew.txt"));
                   char singleChar;          
                   DataOutputStream out = new DataOutputStream(new FileOutputStream("CustomerDetails.txt"));
                   try {
                        while (true){
                             singleChar = in.readChar();
                             out.writeChar(singleChar);
                   catch (EOFException e) { }
               catch (IOException e){
              System.out.println("Error: " + e);
         public void readJobNumber(int JobNumber) {
                       StringWriter sw = new StringWriter();
                       PrintWriter  pw = new PrintWriter(sw);
              try {
                   //URL ftpUrl = new URL("ftp://j-charles:[email protected]/jobNumber.dat");
                            //InputStream inFile = ftpUrl.openStream();
                   URL ftpUrl = new URL("ftp://jim:evvcece@/jobNumber.dat");
                           InputStream inFile = ftpUrl.openStream();
                   BufferedReader in   =  new BufferedReader (new InputStreamReader (inFile));
                   String line = null;
                   while ((line = in.readLine()) != null) {
                   System.out.println(line);         }
                   in.close();     
                   catch (IOException e) {
                         System.out.println("Reading Job number error " + e);} // catches IO exception
         public void writeJobNumber(int JobNumber) {
              try {
                   URL ftpUrl = new URL("ftp://j-charles:[email protected]/jobNumber.dat");
                           URLConnection conn = ftpUrl.openConnection();
                   conn.setDoOutput(true);
                           OutputStream out = conn.getOutputStream();
                   System.out.println("writing job number" + jobNumber);
                           PrintWriter writer = new PrintWriter(out);
                           System.out.println("Writing to ftp");
                   writer.print(jobNumber);
                   writer.print('\n');
                           writer.close();
                   out.close();
                   catch (IOException e) {
                         System.out.println("Job number error " + e);} // catches IO exception
         public void paint(Graphics g){
              if (dataEntry == true){
                   System.out.println("Calling paint");
                   g.setFont(dataDisplay);
                   g.drawString("Our allocated " +  detailsOutput[position] + " will contact you within 24 hrs", 10,200);
                   g.drawRect(0,260,650,50);
                   g.drawString("Your details are as follows:", 10,280);
                   g.drawString(nameOutput, 10,300);
                   g.drawString(telephoneOutput, 200,300);
                   g.drawString(emailOutput, 400,300);
                   g.drawString( "Job#" + jobNumber, 10,400);
                   g.drawString("Authorisation Code:- " + authorisationCode, 200,400);
                   g.setFont(formEntry);
                   g.drawString("Please keep note of the job number and authorisation code to enable you to use the job tracker screen.",10,450);
              dataEntry = false;
    }

  • Recursive Java programming method for executing recursive SQL queries

    Anybody has a Java/JDBC example method to execute recursive SQL queries and print results? The method has to work for any number of queries and levels and the first query passes the parameter to the second query.
    Edited by: user4316962 on Jun 12, 2011 1:59 PM

    user4316962 wrote:
    Guys, the problem what I am trying to solve is much more complex and I don’t think SQL level recursion is enough. I am looking for Java solution with SQL queries in it to make it more flexible and DB independent.
    If you want to do recursion in SQL then it has nothing to do with Java.
    And if you want to do recursion in Java then the idiom itself has nothing to do with SQL.
    Other than that you have provided enough detail for anyone to even guess at what you are asking.
    As a start I am not even sure that you understand what recursion is nor how JDBC works. (But it could be that you are using the terms to mean something else.)
    And looking at your original post it could be nothing more than that you are looking for a design pattern - perhaps the interpreter.

  • Java tutorial/resources for writing a RSS agregator/reader

    Hi,
    I'm planning to write a simple java RSS reader/aggregator application and I'm would really appreciate it if someone would point out where I could find tutorials and the appropiate RSS java libaries/API's
    Thanks

    thanks for that - ive seen the rss utilities page on java sun but assumed that it was for writing apps in JSP !
    IAs far as i can tell the google link doesnt provide a tutorial on writing code for a desktop java application which can be used to read given rss feeds.
    Do correct me if im wrong.
    Thanks

  • Java programming standard for conditional statement

    Hi,
    Is it proper Java standard to use constants first in a conditional statement? I've never seen coding in this way, even when I was in college I never saw it in any of our books.
    example:
    String x = null;
    if (null==x){
    //Do some stuff
    }

    kevjava wrote:
    yawmark wrote:
    ...hence, more work.Not if "NAME_KEY" (i.e., the literal value) changes.
    ~If some wise guy resets it to null, then you've lost all benefit of making a constant out of it to begin withIf that happens, you've got some people problems to deal with! Anyways, if it's really a constant, it'll be final, right?
    .... and I was sort-of reiterating that it was a self-named constant... you're right, of course, but I guess I'm just peaved at having to see stuff like...
    private String JAN="JAN";
    private String FEB="FEB";
    // ...and on and on...
    // later...
    if (FEB.equals(month)) {
    // do stuff
    } else {
    // do stuff
    }Have you ever actually seen code like that in production? I wonder, what are you up to that a class needs its own, private, set of months?
    My point is that the three-letter abbreviation is always going to be "FEB" (yes, i18N and language specializations aside)Why put them aside, though? They're not exactly corner cases

  • Java Programming - Run Web Start App Through IDE Using Existing JNLP(s)

    I apologize for the cross post. I believe I mis-posted the first time. The thread belongs here.
    http://forums.sun.com/thread.jspa?threadID=5434826

    You might try pointing JaNeLA *(<- link)* at it, and fixing any errors it reports. Ignore any optimisations suggested. The optimisations are not properly debugged and would not cause the kind of errors you report.
    Oh, and a ++++ to that advice to to ensure the console pops open when encountering a web start app. Make sure the code is not [swallowing exceptions|http://pscode.org/javafaq.html#stacktrace] *(<- link)* at any stage.

  • Start java-Program when Tomcat starts

    I have a TimerTask, that should be executed every hour (war in webapp of Tomcat). If Apache Tomcat will be shut down and started again, Task won't be executed.
    Can I define somewhere, that some class should be executed when Tomcat server starts and after restart the tasks will be countinued.
    Can I, for example define it some where in web.xml or somewhere else?
    I can't controll when tomcat was turned off and started again.
    Thanks in advance.

    I have a TimerTask, that should be executed every
    hour (war in webapp of Tomcat). If Apache Tomcat will
    be shut down and started again, Task won't be
    executed.
    Can I define somewhere, that some class should be
    executed when Tomcat server starts and after restart
    the tasks will be countinued.
    Can I, for example define it some where in web.xml or
    somewhere else?
    I can't controll when tomcat was turned off and
    started again.
    Thanks in advance.My advice is to be:
    Making your TimerTask to be an application which will do something every 1 hour if it has nothing to do with the Tomcat Server .And tell us what do you want your TimerTask to do ???waiting for you .

  • Freelancing java programming, how to start?

    I'm having trouble starting and getting into new
    projects, basically because, I dont have a network
    to 'get my name' out there.
    So I'm trying different things so I could get at least one project, then if I make it well but not charging TOO MUCH, they may recommend my services.
    I tried ads on the paper but didnt seem to work, I only
    got one response and we still in negotiation but I think I'm losing
    I may try to make some 'informative papers' but I think most
    people just ignore them these days, so I made a website
    and I'm thinking about putting on google ad words, but
    that would be a little expensive and I'm not sure it will
    be enough. Could anyone give any tips on how to get
    the ball rolling, I think after getting two or three projects
    it will get a little bit easier because I will get in contact with
    a lot of people and if my make the right impression I may get more work.

    but then - I think this fellow is the one who announced to us that "Linux was a LIE" - so I am not sure how he/she might feel about Open Source in general...

  • Installer for a Java Program

    Hello, folks.
    I've written an application that I feel is ready to show to others, and would like to provide it with an installer.
    I need to check that JRE 1.4 is installed, install it if it isn't, install the application to a directory, set install/uninstall options in the control panel, and add a start menu item. (This will be a Windows-platform installer.)
    Could any of you suggest a free (not demo) installer system that I could use? I've heard that there are some good ones out there, but I don't have their names and associated URL's.
    thanks,
    Andrew

    Hello All,
    This is may be bit of a tangent, but hopefully it can be helpful regardless...
         I'm looking into installer programs that are java friendly with the ability to generate a gui-based install program for multiple platforms. I went out and tried to find as many programs that match these specs (list below). Before I dive headlong into demo-sampling-mode - I was hoping folks would share any positive or negative experiences they've had with any of the apps listed below.
    http://www.denova.com/ - DeNova
    http://www.fawcette.com/Archives/premier/mgznarch/javapro/2000/06jun00/rv0006/rv30006.asp - InstallShield Java Edition 3.0
    http://www.alphaworks.ibm.com/tech/beanbag - BeanBag
    http://www.alphaworks.ibm.com/tech/installtoolkit - Install Toolkit for Java
    http://www.jadcentral.com/codecentral/code_profile.jsp?category_ID=4&code_ID=112 - ITW Installer For Java Applications
    http://www.zerog.com/ - InstallAnywhere (some free, some not)
    http://www.gjt.org/info/design/autorad.shtml - AutoRad [GPL]
    http://www.xenonsoft.demon.co.uk/products/freeinstaller/index.html - freeinstaller [Open Source]
    http://www.izforge.com/izpack/ - IzPack [Open Source]
    http://www.toolshed.com/download/installer/install.html - Java Self Installer [GPL]
    http://liftoff.sourceforge.net/ - Lift-Off [GPL]
    http://packlet.sourceforge.net/ - Packlet installer tool [Open Source, LGPL]
    http://vainstall.sourceforge.net/ - VAInstall [GPL]
    Comparisons:
    http://www.zerog.com/products_pu_05.html
    Cheers,
    Enrique
    cc comp.lang.java.softwaretools
    cc forum.java.sun.com > Java Programming > Installer for a Java Program

Maybe you are looking for

  • How do I load additional Type Kit fonts into Muse?

    I have installed Azo Sans font from the Tool Kit within Creative Cload and it is synced across the account. I want to use this font in an Adobe Muse design but it's not available as Adobe Edge Web Font within Adobe Muse. Any suggestions??

  • Drop-down menu becomes unselectable in Safari

    As of Lion (10.7), I have noticed from time-to-time, drop-down menus in Safari become stuck or uselectable. This is usually on dynamically generated pages where the values of the pull-down menu isn't part of a static HTML code (like a list of states)

  • Audio dropping in CS6

    Hi Guys, I have a strange problem with Audio dropping in Premier Pro CS6. The original MPEG file plays fine from start to finish – in Premier Pro the audio also plays fine up until the last 2 minutes of footage, then drops completely. I tried transco

  • Web service issues with two live Ethernet connections

    Running OSX Leopard 10.5.3 on a Quad-core G5. Configuring Web services, I am running into issues while having two simultaneous Ethernet connections active. My first E-net connection is a LAN address; the second is a external WAN IP. I've created one

  • Wireless comm problem with time capsule or airport extreme using iMac G5

    I did buy a Time Capsule and an iMac 20" G5 January 2009...Installed all the components and created a wireless network...MacBook, iPhone and iPod Touch connected perfectly...iMac connected but started to drop communications with Time Capsule...Safari