vikash talanki

Greenhorn
+ Follow
since Oct 04, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by vikash talanki

@vijay Tidke

The probelm here is to get methods of class & then invoke them using object. According to your solution we need to know that there is method called getVar present in the class, what if we dont have idea of what methods are present in the class?
13 years ago
hi all,

I am creating & compiling(using ant script) java classes at runtime in my java program. In the same program I wanna get the objects for these classes and set their varibales/methods with some values.

Suppose I have a class like

From my main java program I can easily set or call the method of myclass like

The above code is trivial if we already know everything about "myclass". But if I want to get the instance of myclass at runtime & call methods of the class , I am totally confused & struck at this point, I can say

Please help
13 years ago
I am running the similar program TestingRuntime from the command prompt and its creating both .java & .class files of RunTestTime.



The output I am getting is :



But When I am trying to run my original pgm(LotusNotesDBExtraction.java) & when I replace line 26 (I am running it from eclipse IDE)


with


I am getting the error as


Where is the actual problem? in Runtime.getRuntime().exec() or in eclipse IDE.

Please show me the way
13 years ago
I am writing a java program in eclipse to extract forms from lotusnotes db. Whenever I get a form I need to create a .java file containng a class with same name as of form. Then I have to compile this new .java class which gives me .class file & hence I can create an instance of that new class. I need to know whether this approach of creating,compiling & instantiating a new class is possible from a single existing java program.

My pseudocode goes below



But I am not able to get .class file for the new class. Can I instantiate the new class in the same program?? I was stuck at this point. Can any please help me

>
13 years ago