13 Replies - 5300 Views - Last Post: 01 August 2010 - 11:56 PM Rate Topic: -----

#1 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

How do I begin coding in JAVA?

Posted 31 July 2010 - 01:54 PM

Hello guys.

I come from a web development background, I know PHP, HTML and CSS. Although I also have a very basic knowledge of C# and VB.net.

As many of the University courses I am looking at teach Java in the first year, I have decided to get a head start and learn some Java basics.

How do I actually begin programming in Java, in PHP, HTML and CSS you just type it into a text file, and then upload it.

I get that you need the Java JDK, which I believe you can get from the Java/Orcal web site.

What else do you need is the only way to program in NetBeans? or are there are other, better alternatives.

Thanks for any help you can provide, and any tips you can give me.

This post has been edited by KingCuddles: 31 July 2010 - 01:56 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How do I begin coding in JAVA?

#2 SpeedisaVirus  Icon User is offline

  • Baller
  • member icon

Reputation: 114
  • View blog
  • Posts: 855
  • Joined: 06-October 08

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 02:00 PM

You can use anything you want if you have the JDK. Eclipse and Netbeans are the big names in Java IDEs but you could use any plain text editor if you wanted to.
Was This Post Helpful? 1
  • +
  • -

#3 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 02:13 PM

Double post.

This post has been edited by KingCuddles: 31 July 2010 - 02:28 PM

Was This Post Helpful? 0
  • +
  • -

#4 benregn  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 39
  • Joined: 17-November 09

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 02:15 PM

You need the SDK as you noted, Java JDK download. You can choose whatever IDE you like, e.g. NetBeans, Eclipse or other Java IDE's - Wikipedia. Another option is to use a programmers notepad like Notepad++ for Windows. When you use IDE's you can compile and run your programs from inside of the IDE but when using a programmers notepad you usually compile through the command line.

This post has been edited by benregn: 31 July 2010 - 02:16 PM

Was This Post Helpful? 1
  • +
  • -

#5 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 02:24 PM

View PostSpeedisaVirus, on 31 July 2010 - 08:00 PM, said:

You can use anything you want if you have the JDK. Eclipse and Netbeans are the big names in Java IDEs but you could use any plain text editor if you wanted to.


So I found some example code, do I just stick it into a Textfile and rename it .Jar? and then run it?

Also how would I convert a text file into an applet?

Sorry I really am new to this.
Was This Post Helpful? 0
  • +
  • -

#6 Mercurial  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 178
  • Joined: 06-November 09

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 02:40 PM

Get Eclipse(http://www.eclipse.org/). It'll save you alot of trouble. You can add your example code to a project easily, compile and run it in a matter of seconds.
Was This Post Helpful? 0
  • +
  • -

#7 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 06:29 PM

I recommend getting a book on the subject (I am reading Head First Java, 2nd Edition right now) and using Notepad++. A lot of IDE's have features that shield you from certain problems. Plus I just like Notepad++ better than any IDE out there.
Was This Post Helpful? 1
  • +
  • -

#8 YasuoDancez  Icon User is offline

  • D.I.C Head

Reputation: 20
  • View blog
  • Posts: 135
  • Joined: 30-September 09

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 06:52 PM

Try watching these video tutorials on java...
TheNewBoston Java tutorials YouTube
Was This Post Helpful? 2
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,880
  • Joined: 06-March 08

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 07:50 PM

View PostKingCuddles, on 31 July 2010 - 03:24 PM, said:

So I found some example code, do I just stick it into a Textfile and rename it .Jar? and then run it?

Also how would I convert a text file into an applet?

Your file will have to have a .java extension (which Notepad support)
So if you write a class MyClass it has to be in a file named MyClass.java
Then you can apply the java compiler to that file

> javac MyClass.java

that will create a file named MyClass.class you can then excute it

> java MyClass

As far as Applet are concerned, you are really a beginner so start by a console application first
Was This Post Helpful? 1
  • +
  • -

#10 blixna_waka  Icon User is offline

  • D.I.C Head

Reputation: -5
  • View blog
  • Posts: 60
  • Joined: 14-July 10

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 08:27 PM

View Post.Djoser, on 01 August 2010 - 12:29 AM, said:

I recommend getting a book on the subject (I am reading Head First Java, 2nd Edition right now) and using Notepad++. A lot of IDE's have features that shield you from certain problems. Plus I just like Notepad++ better than any IDE out there.


YESSS! I effing LOVE Head First Java. I even have 2 copies =P

It's a great way to start if you're not into the whole formal-learning experience.
Was This Post Helpful? 1
  • +
  • -

#11 Cuzzie  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 72
  • View blog
  • Posts: 341
  • Joined: 16-July 10

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 11:49 PM

I recommend Introduction To Java Programming, Comprehensive by Y. Daniel Liang...it's a good book to start Java basics, and it covers some chapters on web programming, concurrency, advanced GUI design etc etc. Overall, it's a great book. :)
Was This Post Helpful? 0
  • +
  • -

#12 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

Re: How do I begin coding in JAVA?

Posted 31 July 2010 - 11:56 PM

View Postpbl, on 01 August 2010 - 01:50 AM, said:

View PostKingCuddles, on 31 July 2010 - 03:24 PM, said:

So I found some example code, do I just stick it into a Textfile and rename it .Jar? and then run it?

Also how would I convert a text file into an applet?

Your file will have to have a .java extension (which Notepad support)
So if you write a class MyClass it has to be in a file named MyClass.java
Then you can apply the java compiler to that file

> javac MyClass.java

that will create a file named MyClass.class you can then excute it

> java MyClass

As far as Applet are concerned, you are really a beginner so start by a console application first


Thanks PBL, I was wondering how to compile :D.

Alright, I will ignore the whole applet thing for now :D.

Quote

Try watching these video tutorials on java...
TheNewBoston Java tutorials YouTube


Thanks its good to see a guide on setting up the environment.

And I will look into picking up Head First Java, and perhaps a For Dummies book, as I always find them well written and helpful :D.
Was This Post Helpful? 0
  • +
  • -

#13 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: How do I begin coding in JAVA?

Posted 01 August 2010 - 06:59 AM

The Core Java series did me quite well. They are 2 of the best Java books I think I've ever read.
Was This Post Helpful? 1
  • +
  • -

#14 YasuoDancez  Icon User is offline

  • D.I.C Head

Reputation: 20
  • View blog
  • Posts: 135
  • Joined: 30-September 09

Re: How do I begin coding in JAVA?

Posted 01 August 2010 - 11:56 PM

View PostKingCuddles, on 31 July 2010 - 10:56 PM, said:

Thanks its good to see a guide on setting up the environment.

It is not only a guide for setting up the ide/environment, if you follow the playlist it is a whole collection of java tutorial videos.

View PostDogstopper, on 01 August 2010 - 05:59 AM, said:

The Core Java series did me quite well. They are 2 of the best Java books I think I've ever read.

Yeah Cay is a great teacher so it seems. I like his Big Java book a lot also.

This post has been edited by YasuoDancez: 01 August 2010 - 11:59 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1