Oh i just thought its similar to VB runtime.
Oh i just thought its similar to VB runtime.
you've mixed things.
compiler's job is to convert .java files into .class files(byte codes). So JRE doesn't come into picture here.
JRE is required when you run a java application.
Suppose I write a java application and after compiling I mail that to you, so that you could run it on your system. So for running my application you need JRE and nothing else.
what i understand from this is,
you do coding and save it as *.java
after compiling , you get a *.class file
well then how are exe files produced under java. there are many software which depend on java but are actually in EXE format , eg limewire and so on.
yes yes yes yes yes... you are right.
Now we come to .exe files.
Converting a java application into executable is like robbing it's souls. exe files are platform dependent while java application are platform independent. So when you do convert a java application into executable, it becomes platform dependent. (exe runs on windows only. right?? correct me if i m wrong.)
yes you are ...
unless you are on wine(some pun for ya)
@npu
If you are just beginning with java ... Throughly go through "JAVA - Complete Reference by Herbert Schildt" ...
I will post in details later ...![]()
Guys , whats your opinion on the book : Java : The Complete Reference by Herbert Schildt... Am currently using it and am finding it quite good. Any other book i should be looking at ?
Although I haven't gone through this book but I've heard that Herbert Schildt is a a good writer.
If you find that book good then it must be good indeed.
I like Java by Khaled Moughal. Nice book!!!
It is a very good book for JAVA beginners.
thanks , will look into that too
-----
btw setting this PATH thingy is confusing like hell, and javac is not running too if I do that. i still have to go bin directory and compile it myself.
and how to run the bytecode aka class file ?
i tried :
java asdf.class
and it didn't work.
I set the path to the bin folder using "path" command in DOS, if thats what you mean by classpath
No, CLASSPATH is another environment variable which points to the
directory where all your java class files and jar files are there.
-F
something like this:
C:\>env | grep CLASS
CLASSPATH=C:\XMLP562_WIN[1]\XMLP562_WIN\manual\lib\;C:\sample;
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.![]()
@ 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.
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
History is on the move,my friends.Those who cannot keep up will be left behind, to watch from distance.And those who stand in its way will not watch at all.http://windows7sins.org/
People are going to tell stories about me none of which change who I really am.
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.
SE is the standard edition (Core Java APT), used for writing any normal application like a desktop application.2. Specialisation :
There are many versions of Java like SE,EE, Netbeans etc. Which one should I learn first ?
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.
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.
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!
@luke
tried you method with no luck. posting screenshot.
java.JPG
go to computer->properties->advanced->Environmental Variable
There you can set system variable.
There are currently 1 users browsing this thread. (0 members and 1 guests)