I have wrriten a servlet. the basic purpose of this servlet is that, it will capture some info from HTML Page, then it will create one java class (physical file). then it will compile the file . and then it will call the method of that class.
I am using JavaWebServer2.0
My servlet is Try.java .
the java class that i am generating runtime is implementing CommonInterface.
All files are in package rulebasedvalidations.
Now, all my class files(Try.class,CommonInterface.class )are in c:\JavaWebServer2.0\servlets\rulebasedvalidations
my new source file(suppose named Rule5.java) is also in the same folder.
In Try.java , i have written a code to compile a file Rule5.java
Runtime rn = Runtime.getRuntime();
Process process =
rn.exec("javac -classpath c:\\JavaWebServer2.0\\servlets\\
where className is Rule5.java
but here i am getting an error like Superclass java.lang.Object of rulebasedvalidations.Rule5 not found.
when i tried the same command from DOS prompt c:\> its working perfectly fine.
Could any one please help me to solve this problem?
thanking in advance.