d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Error > Beginner
Add Reply New Topic New Poll
Member
Posts: 10,884
Joined: Jul 7 2007
Gold: 316.00
Feb 5 2013 04:38am
Hey guys I keep getting this error... my teacher doesn't explain much but I've been trying to fix it and I'm about to email him but i figured I'd ask the forums

javac: invalid flag: C:\Program Files (x86)\Java\jdk1.7.0_10\bin\Practice.html

Am I suppose to change or create another path in my environmental variables?

Also am I even suppose to be compiling the applet/html file?

Member
Posts: 2,478
Joined: Jan 4 2007
Gold: 7,545.00
Feb 5 2013 08:00am
Pretty sure you can't compile HTML files with java....

If I remember my java days, All your html document is doing is calling one of the classes that you compile

I'm guessing you have some sort of Practice.java file
Run that with javac and make sure your HTML file is calling Practice.class

i.e.
Code

<APPLET code="Practice.class" WIDTH="200" HEIGHT="40">
This is where Practice.class runs.</APPLET>
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Feb 5 2013 11:41am
is your class path set to the html file or the bin directory?
Member
Posts: 4,980
Joined: Jan 16 2010
Gold: 0.00
Warn: 20%
Feb 5 2013 11:59am
Quote (carteblanche @ 5 Feb 2013 19:41)
is your class path set to the html file or the bin directory?


It looks like the environment variable is indeed set to the specific file instead of just the /bin/ directory. Change that and it should work.

Also, that is one obnoxious signature you got there, Slaying.

This post was edited by Grandebedte on Feb 5 2013 12:00pm
Member
Posts: 35,456
Joined: Jan 25 2009
Gold: 1,173.00
Feb 5 2013 09:56pm
I second that. Your signature is aggravating and offensive.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll