RE: Problems using Java. 01-06-2014, 01:40 PM
#9
(01-06-2014, 11:46 AM)greybat163 Wrote:(01-03-2014, 02:22 PM)Deque Wrote: Just download the JDK, it already contains a JRE.
Get it from here (Windows x64 Download): http://www.oracle.com/technetwork/java/j...80260.html
Installation instructions are here: http://docs.oracle.com/javase/7/docs/web...ndows.html
How do you want to develop with Java?
If you use an IDE like Eclipse, you don't need a JDK.
And yes, you can use it from your OS.
Hey I downloaded the JDK and changed my OS now its x82 and I got the JDK for x82 but the exe file to open java ain't working....
When I try to open java.exe (C:\Program Files\Java\jdk1.7.0\bin) I see a batch file which opens shows some codes and closes immediately.
You need instructions how to compile and run code properly then.
Open your terminal. Navigate to the folder where your .java file is.
Then type (replace Hello.java with the name of your source file)
Code:
javac Hello.javaIf you get any errors at this point, set the JAVA_HOME environmental variable properly.
javac is the compiler, which will compile your .java file into a .class file. The .class is bytecode which can be run by the JVM.
In order to run it you use java.exe:
Code:
java HelloI am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.
Expressed feelings are just an attempt to simulate humans.
![[Image: 2YpkRjy.png]](http://i.imgur.com/2YpkRjy.png)


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)