LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices

Reply
 
Search this Thread
Old 08-04-2003, 12:21 PM   #1
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Rep: Reputation: 45
Post DISCUSSION: Beginning with Java


This thread is to discuss the article titled: Beginning with Java
 
Old 08-04-2003, 02:41 PM   #2
Steve Cronje
Member
 
Registered: Jan 2003
Location: Canada
Distribution: Ubuntu, Mepis, Debian
Posts: 158

Rep: Reputation: 30
Re: DISCUSSION: Beginning with Java

I have just skimmed the article, and it looks great. I will go through it in more detail later.

As someone who has been starting with Java only recently, these suggestions may come in handy to other beginners such as I:

1. By all means get a sophisticated IDE such as Netbeans or Eclipse, play around with it, and build a few apps, THEN PUT IT AWAY. It only gets in the way of learning the basics.

2. Download DrJava, which is a very simple, yet very supportive learning environment, and much easier to be productive in than using 'just' a text editor. It is open source, free, and is written in Java.

3. Download the full documentation from Sun. The API is here

4. Download, and work through Thinking in Java which is a free download, and will teach you tons.

Just my 2p

HTH
Steve
 
Old 08-05-2003, 03:02 AM   #3
then
Member
 
Registered: Oct 2002
Location: FDR India
Distribution: RH9, Knoppix, MEPIS
Posts: 65

Rep: Reputation: 15
Hi

Well written article , bad formatting though. Had a tough time reading.

A couple of spaces and some para-breaks would be welcome.

regards
theN
 
Old 08-05-2003, 08:01 PM   #4
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Yeh, I probably should have put some more formatting in.
 
Old 09-03-2003, 10:37 AM   #5
glj
Member
 
Registered: Jul 2001
Location: London
Distribution: RH 9
Posts: 151

Rep: Reputation: 30
It might be worthwhile to include a link to Blackdowns' site to download Java Linux stuff from. The site has links to loads of useful sounding programs too

glj
 
Old 03-10-2004, 04:33 PM   #6
Neodymium
LQ Newbie
 
Registered: Jan 2004
Location: UK
Distribution: Slackware 9.1
Posts: 7

Rep: Reputation: 0
A nice introduction, I'll be doing some Java development at college next year, and it's always nice to be ahead of the game.
 
Old 04-24-2004, 05:37 AM   #7
AskMe
Member
 
Registered: Jul 2003
Posts: 123

Rep: Reputation: 15
What are the commands to run and compile!!!

I can say, it is good for beginers, but it lacks important fact, like what the command one should issue to compile these codes on Linux, and how one can see the output? It would be better if you include such topics.
 
Old 04-24-2004, 11:53 AM   #8
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Yeh, i guess I took it for granted that I knew the commands but 'javac' for compile and 'java' for running
 
Old 04-26-2004, 06:08 AM   #9
AskMe
Member
 
Registered: Jul 2003
Posts: 123

Rep: Reputation: 15
Thanks, but I was looking for different thing!!

Yah, most know how to compile java source file with javac filename.java and run the compiled class file with java filename, but I was looking for different thing. I have installed Red Hat Linux 9, and with that there is free GNU, compiler and class file interpretor. After hard try, I found out how to use gcj and gij. So here is the command how to compile java on RedHat9.

To compile source file(filename.java)
gcj -C filename.java

To run calss file (filename.class)
gij filename

I hope this will help people like me, but I am still looking for how to run Applet on RedHat 9, I don't want to use Mozilla, because there is no plug-in installed and to install all these another headache for me as I know very less about linux.
 
Old 06-05-2004, 02:40 PM   #10
lmellen
Member
 
Registered: Jan 2004
Location: Fairport, NY
Distribution: Arch/Ubuntu
Posts: 42

Rep: Reputation: 15
I've worked all the example programs up to class moon.The class moon program won't compile. I get:

ex6.java:16: cannot resolve symbol
symbol : method readline()
location: class java.io.BufferedReader

Then there is a ^ under the first new in the following line:

String strA = new BufferedReader(new InputStreamReader(System.in)).readLine();

Just wondering why it won't compile. No big deal, but a reply would be interesting.-- Thanks- Larry (I haven't been able to solve this problem)
 
Old 06-08-2004, 04:39 PM   #11
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Have you typed this up the code yourself or have you tried copying and pasting into the .java file? Some times there can be typos that have an effect of the compilation of the programs. I'll check that out though.
 
Old 06-08-2004, 11:06 PM   #12
lmellen
Member
 
Registered: Jan 2004
Location: Fairport, NY
Distribution: Arch/Ubuntu
Posts: 42

Rep: Reputation: 15
darin3200 -- I tried again, thus time using Gentoo, I get the same result.
Last time I used Fedora Core 2. I'm using j2sdk1.4.2_04 on
both systems. -- Thanks for the reply -- Larry
 
Old 07-01-2004, 10:12 AM   #13
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by lmellen
darin3200 -- I tried again, thus time using Gentoo, I get the same result.
Last time I used Fedora Core 2. I'm using j2sdk1.4.2_04 on
both systems. -- Thanks for the reply -- Larry
Sorry it took so long to reply, I just saw this post today. I'm not sure what is going wrong, I am currently emerging j2sdk on my fresh gentoo install but I tried compiling it on j2sdk1.4.2_04 under Windows 2000 Pro and it worked fine. I'll try compiling it again under Gentoo once j2sdk is installed and get back to you.
 
Old 03-03-2005, 10:51 AM   #14
v1pEr
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: winxp + suse 10.1 dual boot
Posts: 88

Rep: Reputation: 15
A good introduction!
 
Old 04-06-2005, 03:58 PM   #15
Baz8080
LQ Newbie
 
Registered: Mar 2005
Location: Ireland
Distribution: Fedora Core X
Posts: 13

Rep: Reputation: 0
True, nice article, but the formatting is confusing - especially for beginners. We should be teaching them to correclty format and indent code as this will serve them throughout their careers as programmers.

I also think that it is usually easier to read if you create one instance of the BufferedReader and re-use this.

so

Code:
BufferedReader keyboardInput = new BufferedReader(new InputStreamReader(System.in)))
and then reuse it

Code:
keyboardInput.readLine().....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: HOWTO: Install Sun's Java VM in Fedora Core 2 kevcart3 LinuxAnswers Discussion 9 10-28-2005 02:34 PM
DISCUSSION: From beginning to end: ProFTPD MasterC LinuxAnswers Discussion 5 09-24-2005 11:21 PM
Just the beginning.... woodworker97 Mandriva 5 05-20-2005 01:53 AM
very beginning vegpl Linux From Scratch 13 06-26-2004 11:56 AM
Beginning help with Java darin3200 Programming 19 09-11-2003 08:34 PM


All times are GMT -5. The time now is 05:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration