Results 1 to 7 of 7
Thread: Help please, javac issues
- 02-26-2011, 03:02 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Help please, javac issues
Hello i'm very new to java (started yesterday) And have been reading through a book i have gotten the JDK and made a command. When i went to compile it
It said something like javac is not a internal or external command.Java Code:javac Example.java
thankyou
~minty (Really new to java) (was inspired by minecraft) :)
- 02-26-2011, 03:13 AM #2
Member
- Join Date
- Feb 2011
- Posts
- 18
- Rep Power
- 0
You need to type the location of where the "javac" file is and where "Example.java" is.
e.g.Java Code:C:\Program Files\Java\jdk1.6.0_21\bin\javac C:\Users\username\Example.java
- 02-26-2011, 03:16 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Thanks :D In the book it didnt say that :P. it said
type where the .java is so
cd C:\java
then
javac Example.java
EDIT: has tried putting what you put into the run>cmd and still didnt work :P sorry.Last edited by minty115; 02-26-2011 at 03:19 AM.
- 02-26-2011, 03:26 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
See if this helps: Paths in Oracle's Tutorial.
Whether you set the PATH variable as suggested there, or specify the full path to the javac executable on the command line (as suggested by mr_guy) you do have to use your installation directory and not the example one! And also use quotes around things with spaces in them.
Java Code:>"C:\Program Files\Java\jdk1.6.0_21\bin\javac" C:\Users\username\Example.java
- 02-26-2011, 03:39 AM #5
Member
- Join Date
- Feb 2011
- Posts
- 25
- Rep Power
- 0
I used this vide4o and modifed the path variable in Windows, doing so allows you to use javac, and java commands without needing to type a full pathname prior to running the command you can just type javac, or java myprogram.java.
YouTube - ' javac ' is not recognized
- 02-26-2011, 09:26 AM #6
Member
- Join Date
- Feb 2011
- Posts
- 20
- Rep Power
- 0
You didn't say which OS do you have :confused:
If windows, you just make start.bat file in notepad in your workspace with content:If your location of java bins is different than C:\Program Files\Java\jdk1.6.0_23\bin simply change it.Java Code:path C:\Program Files\Java\jdk1.6.0_23\bin start
When you want to compile java files run this file, not cmd
:)
- 09-25-2011, 04:43 PM #7
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
need help with javac
By pawanmutalik in forum New To JavaReplies: 10Last Post: 02-03-2011, 06:56 AM -
javac
By PhilArmstrong in forum New To JavaReplies: 31Last Post: 11-21-2009, 03:46 PM -
javac?
By sardare in forum EclipseReplies: 1Last Post: 06-14-2008, 02:06 AM -
javac DOS
By rdunne in forum New To JavaReplies: 3Last Post: 01-01-2008, 11:49 AM -
Help with javaC
By Daniel in forum New To JavaReplies: 2Last Post: 07-04-2007, 02:44 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks