Home arrow static arrow Java Programming [Archive] - Asking about run a file
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Asking about run a file
This topic has 1 reply on 1 page.

Posts:1
Registered: 6/17/04
Asking about run a file  
Jun 17, 2004 8:03 AM



 
Right now I develop a Java GUI program that will execute or run a file (meaby like Gel or JCreator IDE). This file is an Oracle Data Mining sample program which is implement Java, this file has two property
files as input of this file. Actually this Oracle Data Mining sample program can compiled and executed
through Windows command prompt, to compile and execute this file I also use two batch files. So an
Oracle Data Mining sample program, two property files, and two batch files, I place those components
in a specified folder. I also set my Java_Home and Oracle_Home first because in file executing pro
cess I will connect to Oracle database, to do these settings also from Windows command prompt.
And for a specified folder I place it under "Oracle_Home/dm/sample".

If anyone can help me to run or execute an Oracle Data Mining sample program file from my Java GUI program meaby like running a Java program file with Gel, JCreator or other IDE. I am so happy and
say thank you so much for giving help to me. And for the solution, I want it sent to my e-mail address:
pamungkas@neotek.every1.net.id.
 

Posts:2,067
Registered: 5/3/01
Re: Asking about run a file  
Jun 17, 2004 8:45 AM (reply 1 of 1)



 
It is generally not a good idea to put your e-mail address in forums; but, that is another topic.

If the data mining program you want to run can be run from the command line then it must have the following method:
public static void main(String[] args) 

You can run this method from your application and pass it the command line arguments - here is one way:
try {    String someClassName = "TheDataMiningProgramsFullClassName";    Class c = Class.forName(someClassName);    Method mainMethod = c.getMethod("main", new Class[] {String[].class});    String[] args = . . .     mainMethod.invoke(null, new Object[] {args});} catch (Exception e) { // Easy way out of a problem    e.printStackTrace();}

You could also start this in its own Thread if you do not want your program to wait.
 
This topic has 1 reply on 1 page.