India Broadband Forum


Learning Java ~ What are the best choices of tools ?

This is a discussion on Learning Java ~ What are the best choices of tools ? within the Windows forums, part of the Operating Systems category; follow this... make one System variable named JAVA_HOME Set its value to the jdk home directory. like C:\Sun\SDK\jdk now make ...

Go Back   India Broadband Forum > Computers > Operating Systems > Windows

India Broadband Forum


                      

Reply

 

LinkBack Thread Tools Display Modes
Old 07-31-09, 09:57 PM   #41
Gold Member
 
nandini's Avatar
 
Join Date: Jun 2009
Location: Pune
Posts: 487
Rep Power: 3
nandini is a jewel in the roughnandini is a jewel in the roughnandini is a jewel in the rough
Default

follow this...

make one System variable named JAVA_HOME
Set its value to the jdk home directory. like C:\Sun\SDK\jdk

now make one more system variable named path
set its value to the bin directory of your jdk. like C:\Sun\SDK\jdk\bin

you're done now.

Now open command prompt and type javac and hit enter.
If you get a list of help commands,bingo,you did it.
If not...bang your head thrice against the closest wall and repeat the pocedure till you get it right.
nandini is offline   Reply With Quote
Old 07-31-09, 10:02 PM   #42
Swifty
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by nandini View Post
follow this...

make one System variable named JAVA_HOME
Set it value to the jdk home directory. like C:\Sun\SDK\jdk

now make one more system variable named path
set it value to the bin folder of your jdk. like C:\Sun\SDK\jdk\bin

you're done now.

Now open command prompt and type javac and hit enter.
If you get a list of help commands,bingo,you did it.
If not...bang your head thrice against the closest wall and repeat the pocedure till you get it right.
Nice!
are you know all info about Java?

i learned it but i like C++ than java
  Reply With Quote
Old 07-31-09, 10:08 PM   #43
Gold Member
 
nandini's Avatar
 
Join Date: Jun 2009
Location: Pune
Posts: 487
Rep Power: 3
nandini is a jewel in the roughnandini is a jewel in the roughnandini is a jewel in the rough
Default

Quote:
Originally Posted by Swifty View Post
Nice!
are you know all info about Java?

i learned it but i like C++ than java
These are the basic things. I am also new to java so know a little bit only.

If you like C++ then you'd love java as well,unless you don't look down upon the persons who're not system programmaers.
nandini is offline   Reply With Quote
Old 07-31-09, 10:14 PM   #44
Swifty
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by nandini View Post
These are the basic things. I am also new to java so know a little bit only.

If you like C++ then you'd love java as well,unless you don't look down upon the persons who're not system programmaers.
I learned Java As well as advance Java(n/w Programming not in details just overview) & etc.
  Reply With Quote
Old 07-31-09, 10:24 PM   #45
Jedi knight
 
Luke Skywalker's Avatar
 
Join Date: Jul 2009
Location: IBF
Age: 21
Posts: 1,818
Rep Power: 5
Luke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the rough
Default

@ NPU.Open notepad & type this:

set JAVA_HOME= C:\JDK1.6
set CLASSPATH=.;%JAVA_HOME%\lib
set path=%JAVA_HOME%\bin;%path%
start

Save it as a batch file i.e. with extension .bat like NPU.bat.
Note : I have assumed in underlined line that you have install jdk under C:\JDK1.6 name. If you have installed it under any name replaced it with it. You will get a command prompt after executing this file. You will have to use this file again & again when you want to compile. So save it a desktop. It will open in milliseconds.

This will solve your problem .
I have suggested this solution as it is much better to create a batch file as you might not have permission to change global variables everywhere you are expected to compile a program. So this method is better than changing the environment variables.
If there is any other problem pm me & I will reply here.

Quote:
Originally Posted by nandini View Post
These are the basic things. I am also new to java so know a little bit only.

If you like C++ then you'd love java as well,unless you don't look down upon the persons who're not system programmaers.
Learning C++ is complete wastage of time I too learned it. C is much better for use in system programming. Also Java & C are much better for embedded systems programming. You can do now anything with C which you can do with C++.

(C++) - (troubles) =(Java)

Last edited by Luke Skywalker; 07-31-09 at 10:44 PM. Reason: Automerged Doublepost
Luke Skywalker is offline   Reply With Quote
Old 08-01-09, 10:58 AM   #46
Bronze Member
 
matrix's Avatar
 
Join Date: Dec 2008
Location: Kalyan West
Posts: 254
Rep Power: 1
matrix is on a distinguished road
Default

Quote:
Originally Posted by newprouser View Post
1. Book:

i'm currently using Java for Dummies, since i'm a complete newbie to java. Is it fine or is there any better.
There are a lot of online resources/source code available. I will suggest one book for you "Thinking in Java" as it is very much interesting while learning Java.

Quote:
2. Specialisation :
There are many versions of Java like SE,EE, Netbeans etc. Which one should I learn first ?
SE is the standard edition (Core Java APT), used for writing any normal application like a desktop application.

EE is the enterprise edition - it is there in the standard jdk. This is the API for EJB (enterprise java beans) to be deployed in application server like jboss, websphere, weblogic, tomcat, classfish,etc.

Netbeans is an IDE from SUN (now opensource) not a java version.
Quote:
3. IDE

Is it good to use IDE or should I play with cmd ? If yes for IDE, which one is best ?

I see that there are Eclipse,Jcreator,Netbeans ,Jbuilder IDE, so confused.
[/QUOTE]

For beginners I suggest using simple editors like editplus, notepad++, etc (suppoers sytax highlighing). Jcreator is good IDE and fast too compared to others. You can create, manage everything like debug, compile, create jars, etc. Eclipse, netbeans are having lot of features beyond the normal debug,compile, etc. (like mobile application,silverlight support, plugin,EE application and deploying to application server,remote debugging, etc,...) which as a beginner may not require.

I just started with notepad still I use kwrite as I am full time linux user (equivalent to notepad in windows) though one of the interface to our ERP is eclipse plugin interface. My colleagues use editplus, notepad++, jcreator, eclipse, netbeans.

The advantage of using IDE for beginers is they all provide pohelp for methods, member varibles. constants,etc, while using simple editors you have refer java documentation every time.
matrix is offline   Reply With Quote
Old 08-01-09, 11:40 AM   #47
Junior Member
 
Join Date: Jul 2009
Location: Ahmedabad, India
Age: 22
Posts: 13
Rep Power: 1
mithyavadini is on a distinguished road
Default

This post is nostalgic! Brought back my Java programming days (nothing special, just college days )

----

As for the new form on programming is concerned, count my vote in

@npu:
I think most people have suggested good enough books. Herbert Schildt is a good author, you can try that book (Java: Complete Reference)
As for online tutorials, Sun's website itself is comprehensive.

Good luck!
mithyavadini is offline   Reply With Quote
Old 08-01-09, 02:50 PM   #48
newprouser
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by farce View Post
C:\>env | grep CLASS
CLASSPATH=C:\XMLP562_WIN[1]\XMLP562_WIN\manual\lib\;C:\sample;
sounds greek to me

Quote:
Originally Posted by nandini View Post
follow this...

make one System variable named JAVA_HOME
Set its value to the jdk home directory. like C:\Sun\SDK\jdk

now make one more system variable named path
set its value to the bin directory of your jdk. like C:\Sun\SDK\jdk\bin

you're done now.

Now open command prompt and type javac and hit enter.
If you get a list of help commands,bingo,you did it.
If not...bang your head thrice against the closest wall and repeat the pocedure till you get it right.
Ummmm, whats a system variable and how do i create one.

BTW i'm using XP.

Quote:
Originally Posted by mithyavadini View Post
I think most people have suggested good enough books. Herbert Schildt is a good author, you can try that book (Java: Complete Reference)
As for online tutorials, Sun's website itself is comprehensive.

Good luck!
thanks !!

@matrix

rep+
Attached Images
File Type: png untitled.PNG (49.1 KB, 3 views)
  Reply With Quote
Old 08-01-09, 02:53 PM   #49
newprouser
Guest
 
Posts: n/a
Default

@luke

tried you method with no luck. posting screenshot.

java.JPG
  Reply With Quote
Old 08-01-09, 03:02 PM   #50
Gold Member
 
nandini's Avatar
 
Join Date: Jun 2009
Location: Pune
Posts: 487
Rep Power: 3
nandini is a jewel in the roughnandini is a jewel in the roughnandini is a jewel in the rough
Default

go to computer->properties->advanced->Environmental Variable

There you can set system variable.
nandini is offline   Reply With Quote
Old 08-01-09, 07:21 PM   #51
Jedi knight
 
Luke Skywalker's Avatar
 
Join Date: Jul 2009
Location: IBF
Age: 21
Posts: 1,818
Rep Power: 5
Luke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the rough
Default

Wait for one day I am installing windows to solve this issue. Can't understand as path is showing bin in the path.
Luke Skywalker is offline   Reply With Quote
Old 08-01-09, 07:27 PM   #52
newprouser
Guest
 
Posts: n/a
Default

hey luke, sorry i forgot to update here, nandini's method is working fine. now both javac and java command are working from cmd.

thanks for your help.

meanwhile what is wrong in this code ?

Quote:
public class MyFirstApp
{
public static void main ()
{
System.out.println("I rule ");
System.out.println("the world.");
}
}
Saved as MyFirstApp.java.

NO problems in compiling , but in execution i get this error.

Quote:
F:\Documents and Settings\Administrator\Desktop>java MyFirstApp
Exception in thread "main" java.lang.NoSuchMethodError: main
Quote:
F:\Documents and Settings\Administrator\Desktop>java MyFirstApp.class
Exception in thread "main" java.lang.NoClassDefFoundError: MyFirstApp/class
Caused by: java.lang.ClassNotFoundException: MyFirstApp.class
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: MyFirstApp.class. Program will exit.
  Reply With Quote
Old 08-01-09, 07:36 PM   #53
Jedi knight
 
Luke Skywalker's Avatar
 
Join Date: Jul 2009
Location: IBF
Age: 21
Posts: 1,818
Rep Power: 5
Luke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the roughLuke Skywalker is a jewel in the rough
Default

Write main statement as

public static void main (String[] args)

So program is:-

public class MyFirstApp
{
public static void main (String[] args )
{
System.out.println("I rule ");
System.out.println("the world.");
}
}




PS: Then I am not going to install windows.

Last edited by Luke Skywalker; 08-01-09 at 07:51 PM. Reason: Automerged Doublepost
Luke Skywalker is offline   Reply With Quote
Old 08-01-09, 08:05 PM   #54
newprouser
Guest
 
Posts: n/a
Default

thanks again, finally i got one program working
  Reply With Quote
Reply

Tags
choices, java, learning, tools

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Installling java saurabh2446 Nokia 1 06-23-09 12:44 PM
Tata Sky Fun Learning Promotion devrajofjaipur Tata sky 0 05-13-09 03:46 PM
Request For Java Script To Power On The Modem Ut300r2u ravi07 BSNL broadband 8 04-09-08 02:19 AM
Job cuts in Microsoft Learning division Admin News and Views from the Business World 0 06-25-06 05:57 PM


All times are GMT +5.5. The time now is 07:17 AM.


India Broadband Forum