At runtime? I am not too sure about that, but if the problem is happening for the same reason as the '.java' extension, then have you configured some sort of dynamic compiling mechanism? Or is it because you're using some framework that is missing some configuration somewhere? Another back-to-basics thought train could be to check your path too, to make sure you're not pointing to different instances of the same filename.
Just some thoughts; but I am not really sure of your situation. Hope you manage to resolve it somehow!
im running a simple program and im getting the same error? ive checked the class path... the names right everything that needs (), ;, and {} has them... it all appears to be correct... yet i still get the same error... and yes its named.java...
i am facing this problem too, i can compile and run my app in netbeans IDE, but i cannot in command prompt. Can the problem be about JAR file? Please help me!
class Nk{ int x; int y; int z; int add(int a,int b) { x=a; y=b; int w=x+y; return w; } int mal(int a,int b,int c) { x=a; y=b; z=c; int f=x*y*z; return f; } } class Fk{ public static void main(String arg[]) { Nk m=new Nk(); int n= m.add(7,8); System .out.println(n); int u=m.mal(7,8,9); System .out.println(u); } }
this code compile successfully but as i make run, i encounter with the error CLASS"Fk" ACCEPTED IF ANNOTATION PROCESSING explicitly requested.what type of error is this when it occur and how can i remove,i have put file extension (Fk.java), one interesting thing is that when i use CLASS NAME FORCE IN PLACE OF Fk it run successfully, whAT TYPE OF ERROR IS THIS, KINDLY HELP ME.THANK U class Nk{ int x; int y; int z; int add(int a,int b) { x=a; y=b; int w=x+y; return w; } int mal(int a,int b,int c) { x=a; y=b; z=c; int f=x*y*z; return f; } } class Fk{ public static void main(String arg[]) { Nk m=new Nk(); int n= m.add(7,8); System .out.println(n); int u=m.mal(7,8,9); System .out.println(u); } }
Ehehe :) thank you!
ReplyDelete~Miku
Thank you friend....
ReplyDeletewonderful!
ReplyDeleteTHAT IS NOT A REASON ,I SEE THIS ON RUNNING TIME NOT ON IN COMPILING.
ReplyDeleteAt runtime? I am not too sure about that, but if the problem is happening for the same reason as the '.java' extension, then have you configured some sort of dynamic compiling mechanism? Or is it because you're using some framework that is missing some configuration somewhere? Another back-to-basics thought train could be to check your path too, to make sure you're not pointing to different instances of the same filename.
ReplyDeleteJust some thoughts; but I am not really sure of your situation. Hope you manage to resolve it somehow!
if some1 is able to solve this prob then pls post the procedure.
ReplyDeletei cant compile... i put .java on the end but still got the same error
ReplyDeletedid you check your classpath?
ReplyDeleteim running a simple program and im getting the same error? ive checked the class path... the names right everything that needs (), ;, and {} has them... it all appears to be correct... yet i still get the same error... and yes its named.java...
ReplyDeleteThis is interesting that so many people are facing this problem. Could someone provide the source code for what they are trying to compile?
ReplyDeletethnks a lot--------------------------------@biswa
ReplyDeletei am facing this problem too, i can compile and run my app in netbeans IDE, but i cannot in command prompt. Can the problem be about JAR file? Please help me!
ReplyDeleterealy nice ...!!thanks lot of
ReplyDeleteclass Nk{
ReplyDeleteint x;
int y;
int z;
int add(int a,int b)
{
x=a;
y=b;
int w=x+y;
return w;
}
int mal(int a,int b,int c)
{
x=a;
y=b;
z=c;
int f=x*y*z;
return f;
}
}
class Fk{
public static void main(String arg[])
{
Nk m=new Nk();
int n= m.add(7,8);
System .out.println(n);
int u=m.mal(7,8,9);
System .out.println(u);
}
}
This comment has been removed by the author.
ReplyDeletethis code compile successfully but as i make run, i encounter with the error CLASS"Fk" ACCEPTED IF ANNOTATION PROCESSING explicitly requested.what type of error is this when it occur and how can i remove,i have put file extension (Fk.java), one interesting thing is that when i use CLASS NAME FORCE IN PLACE OF Fk it run successfully, whAT TYPE OF ERROR IS THIS, KINDLY HELP ME.THANK U
ReplyDeleteclass Nk{
int x;
int y;
int z;
int add(int a,int b)
{
x=a;
y=b;
int w=x+y;
return w;
}
int mal(int a,int b,int c)
{
x=a;
y=b;
z=c;
int f=x*y*z;
return f;
}
}
class Fk{
public static void main(String arg[])
{
Nk m=new Nk();
int n= m.add(7,8);
System .out.println(n);
int u=m.mal(7,8,9);
System .out.println(u);
}
}
This comment has been removed by the author.
ReplyDeleteI don't do much Java programming anymore, but shouldn't you save your file as 'Nk.java' not 'Fk.java' ?
DeleteAlso are you missing closing brackets on your second class?
From what I remember about Java, having two class declarations in the same file is really not a good thing either.
Hope that helps in some way?
@mark ashworth again facing same problem in this programm at the run time plz give any permanet solution dear
ReplyDeletepublic class Value{
static int x = 3;
public static void main(String args[]) {
// int x = 3;
passMethod(x);
System.out.println("After invoking passMethod, x = " + x);
}
public static void passMethod(int p) {
System.out.println("After invoking passMethod p ; " + p);
p = 10;
System.out.println("After invoking passMethod, p= " + p);
System.out.println("After invoking passMethod, x = " + x);
}
}
Hmm. You do realise that it is not my job to do your programming homework for you right?
Delete