Results 1 to 2 of 2
Thread: Trouble compiling code
- 05-11-2008, 06:23 PM #1
Member
- Join Date
- May 2008
- Posts
- 1
- Rep Power
- 0
Trouble compiling code
Hey guys,
I began learning Java a few days ago and until now its been a blast. At first, I tried writing my code using notepad and then compiling it using the command prompt in windows. Unfortunately, this method gave me errors. Because of this, I switched to an IDE (integrated development environment) named Eclipse. The application is awesome but I still prefer to learn how to compile using the old-fashion way ;)
Can anyone tell me the proper steps to compiling my code using the command prompt?
P.S.: I've already downloaded the JDK Update 6.
- 05-12-2008, 04:25 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You have to set the class path for working folder. Otherwise you can't compile it.
Here is the simple way to do it.
Say your working folder is D:\JavaTest and the JDK installation folder is C:\Java\jdk1.6.0_05
Open the command prompt and change the working path to D:\JavaTest Then type this,
Then type javac there. You get the possible options with Java, if you do it correctly.Java Code:D:\JavaTest\>path=c:\Java\jdk1.6.0_05\bin\
But in this way, each time you start work on Java, have to repeat. If you how to change the AUTOEXEC.BAT file, no need to repeat this.
Similar Threads
-
compiling trouble
By capacitator in forum CLDC and MIDPReplies: 4Last Post: 06-10-2008, 10:12 PM -
Compile Trouble
By adelgado0723 in forum New To JavaReplies: 5Last Post: 04-21-2008, 02:02 AM -
Compiling and running code in runtime
By tim in forum New To JavaReplies: 4Last Post: 01-27-2008, 06:58 PM -
Having trouble with array
By ice22 in forum New To JavaReplies: 3Last Post: 11-13-2007, 03:06 AM -
JTree trouble
By Alantie Vala in forum AWT / SwingReplies: 3Last Post: 07-31-2007, 11:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks