-
Java Intelligent with Oracle8i
Hi,
I am an Oracle DBA at Datalex(Dublin). My problem is I'd like to create an
interface that will help us to create a specifique oracle database based
on our application. What am asking is:
1. Could java scan the system (machine) and return the number of disks in
it with the letter assigned to them and free space ???
(e.g: Drive C 200 MB free space
Drive D 120 GB free space )
2.Could java modify a file a write in it ??
3. could java execute a batch file ??
4. After compiling is there any possibility to generate an executable file
so that the JDK is not need to run.
5. Interface to interact with program would be any browser
6. Can anyone help me with this ???
Thanks alot this urgent
Regis
-
Re: Java Intelligent with Oracle8i
Well i will try to answer some of them
i will provide answers for 2,3,4
answer 2) yes java has very powerful file io operations. It can create file
write on to it, it can open an existing file and edit
the contents and save the changes
answer 3) yes u can ver well execute a batch file but i dont know what all
command can be exceuted by this. I have tried few commands
and has worked fine. May be work for u as well. Code is provided below
import java.io.*;
public class ExecuteBatch
{
public static void main(String args[])
{
try {
System.setOut(new PrintStream(new FileOutputStream("some.log")));
System.out.println("Hi Pranav check your output in some.bat");
Process p = Runtime.getRuntime().exec("some.bat");
// handle the input stream
InputStream is = p.getInputStream();
int ch;
while ((ch = is.read()) != -1)
{
System.out.print((char)ch);
}
}
catch (Exception e)
{
System.out.println("Some exception occurred" +e.getMessage());
}
}
}
answer 4) there is no way that u can make exe in java. But still there are
some tools that will allow this but i m not too sure
i hope this tips helps............................
Pranav
Regis Biassala <regis.biassala@datalex.ie> wrote in message
news:3a1bdc73$1@news.devx.com...
>
> Hi,
> I am an Oracle DBA at Datalex(Dublin). My problem is I'd like to create an
> interface that will help us to create a specifique oracle database based
> on our application. What am asking is:
>
> 1. Could java scan the system (machine) and return the number of disks in
> it with the letter assigned to them and free space ???
> (e.g: Drive C 200 MB free space
> Drive D 120 GB free space )
>
> 2.Could java modify a file a write in it ??
>
> 3. could java execute a batch file ??
>
> 4. After compiling is there any possibility to generate an executable file
> so that the JDK is not need to run.
>
> 5. Interface to interact with program would be any browser
> 6. Can anyone help me with this ???
> Thanks alot this urgent
> Regis
-
Re: Java Intelligent with Oracle8i
"Regis Biassala" <regis.biassala@datalex.ie> wrote:
>
>Hi,
>I am an Oracle DBA at Datalex(Dublin). My problem is I'd like to create
an
>interface that will help us to create a specifique oracle database based
>on our application. What am asking is:
>
>1. Could java scan the system (machine) and return the number of disks in
>it with the letter assigned to them and free space ???
>(e.g: Drive C 200 MB free space
> Drive D 120 GB free space )
>
>2.Could java modify a file a write in it ??
>
>3. could java execute a batch file ??
>
>4. After compiling is there any possibility to generate an executable file
>so that the JDK is not need to run.
>
>5. Interface to interact with program would be any browser
>6. Can anyone help me with this ???
>Thanks alot this urgent
>Regis
In answer tot he first question, if you are using Java 2, take a look at
the File.list[] option for determining drives, directories, or files.
Yes, Java hadnels file io quite easily. java.io is where to start looking.
There are many options for File I/O.
To tun an external file, you will simply need to use Java's Runtime Object.
Very simple way of executing any runnable file (ie. exe,com,bat on Windows).
To do this within a browser however, you will have HUGE problems. Any access
in an applet is restricted to the "sandbox" which all Java applets, by default
must run in. You will need to write a custom security file, and/or digitally
sign the applet, to get around these security restrictions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks