Results 1 to 20 of 22
Thread: Java Compiler CMD Error
- 06-07-2012, 07:35 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Java Compiler CMD Error
Whenever I try to run "javac" in the cmd when trying to set up the Java Compiler, it always says the the command is invalid. I have set up the path correctly (i'm 100% sure of that), and even typed "cd C:\Windows\System32," but nothing when I type javac in the cmd. Can I get some help? Thanks!
- 06-07-2012, 07:42 PM #2
Re: Java Compiler CMD Error
What exactly are you typing in? What exactly are you getting back?
How do you know you set up the path correctly?How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 06-07-2012, 07:47 PM #3
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
I open CMD, type "cd C:\Windows\System32" and then type javac, and get back "'javac' is not recognized as an internal or external command, operable program or batch file." And I know I set up the path right because I copied the path from the most recent Java's bin folder, where "javac" is located, and put it in the Environment Variables. I did keep everything in the "path" and added it to that.
- 06-07-2012, 07:52 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
Re: Java Compiler CMD Error
When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-07-2012, 07:58 PM #5
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
What do you mean type "dir" in that directory, like, what directory exactly and how? I'm kinda new to this kind of stuff, so sorry if i'm a bother.
- 06-07-2012, 08:01 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
- 06-07-2012, 08:04 PM #7
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
You're right. But, how can I get it to work?
- 06-07-2012, 08:29 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
Re: Java Compiler CMD Error
Find where your javac.exe file is stored; add that directory to your path variable; normally that fle is stored in C:\Program Files\jdk<version>\bin where <version> is the version of your Java installation.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-07-2012, 08:35 PM #9
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
That's what i've been doing, but I still get nothing.
- 06-07-2012, 08:41 PM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
- 06-07-2012, 08:45 PM #11
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
";C:\Program Files\Java\jdk1.7.0_04\bin" That is what I have in the variable, the semi-colon being the end of the path before it.
- 06-07-2012, 08:51 PM #12
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
Re: Java Compiler CMD Error
You can check if that directory is actually searched for an executable file by placing a simple .bat file there; e.g.
Check it.Java Code:echo Yep, I'm here
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-07-2012, 08:56 PM #13
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
Like I said before, i'm new to this. How would I check it?
- 06-07-2012, 09:04 PM #14
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
Re: Java Compiler CMD Error
Reread my previous reply; I gave you a complete example.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-07-2012, 09:07 PM #15
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
I know, I've made the file and placed it in the directory... but how do I check it?
- 06-07-2012, 09:35 PM #16
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,425
- Blog Entries
- 7
- Rep Power
- 17
Re: Java Compiler CMD Error
Suppose you named that file "foo.bat"; now type "foo" from the command line in any directory; does it print its echo line? (i.e. does it run?)
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-07-2012, 09:46 PM #17
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
I named it test, and opened the cmd and typed "test" just like that. It's not a recognized internet or external command, program or batch file
- 06-07-2012, 09:50 PM #18
Re: Java Compiler CMD Error
To see what the Path variable is set to, open a command prompt and enter: Path
Copy the reuslts here.
Here's what mine looks like:
To copy the contents of the command prompt window:D:\JavaDevelopment\Testing>path
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\windows\syst
em32;C:\windows;C:\windows\System32\Wbem;C:\window s\System32\WindowsPowerShell\v
1.0\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Driver;C:\Program
Files\Windows Live\Shared;C:\Program Files\WIDCOMM\Bluetooth Software\;c:\Progr
am Files\Microsoft SQL Server\90\Tools\binn\;C:\Perl\site\bin;C:\Perl\bin ;d:\jav
a\JMF21~1.1E\lib;
D:\JavaDevelopment\Testing>
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.If you don't understand my response, don't ignore it, ask a question.
- 06-07-2012, 09:53 PM #19
Member
- Join Date
- Jun 2012
- Posts
- 10
- Rep Power
- 0
Re: Java Compiler CMD Error
C:\Users\Core Destroyer>Path
PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Com
mon Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Micr
osoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\Sys tem32\Wbe
m;C:\windows\System32\WindowsPowerShell\v1.0\;C:\P rogram Files (x86)\Windows Liv
e\Shared;C:\Program Files (x86)\Pinnacle\Shared Files\;C:\Program Files (x86)\Pi
nnacle\Shared Files\Filter\;C:\Program Files (x86)\QuickTime\QTSystem\C:\Program
files (x86)\Java\jre6\bin";C:\Program Files (x86)\Microsoft SQL Server\100\Tool
s\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\M
icrosoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\QuickTime\QTSystem\;C:\
Program Files\Java\jdk1.7.0_04\bin
C:\Users\Core Destroyer>
--------------------------------------------------
There you go.
- 06-07-2012, 10:34 PM #20
Similar Threads
-
Compiler error
By Nikpatel in forum NetBeansReplies: 2Last Post: 04-26-2012, 09:39 AM -
compiler error:"AWT-EventQueue-0" java.lang.NullPointerException at java.io.Reader.
By Ms.Ranjan in forum New To JavaReplies: 4Last Post: 04-23-2010, 01:54 PM -
java compiler error
By arshesander in forum New To JavaReplies: 7Last Post: 02-21-2010, 04:18 AM -
Dr Java compiler error "This application requires a Java Runtime Environment 1.5.0"
By applewood13 in forum New To JavaReplies: 8Last Post: 12-30-2009, 11:40 AM -
Diference Between compiler error Garbage collection and Runtime Error?
By makpandian in forum New To JavaReplies: 3Last Post: 01-23-2009, 08:53 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks