veda patil

Greenhorn
+ Follow
since Oct 06, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by veda patil

We are using jbuilder native executable builder to generate windows .exe file.

When we unzip the exe file we are able to retrieve the contents of the exe.

Is there any way to we restrict user from reading the contents of the exe

Thanks & Regards
Both above solution are working fine if i am running the program.
But if i build the exe file and the run the application i am getting :
Caused by: java.util.MissingResourceException: Can't find bundle for base name
pplicationConfig, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundl
.java:804)

Thanks
18 years ago
How to read the properties file in classpath.

private static String fileName = "ApplicationConfig.properties";
ClassLoader.getSystemClassLoader().getResourceAsStream(fileName)

I have set classpath variable to :
classpath = D:\ApplicationConfig.properties

But getting error.

Please let me know how to read a properties file in classpath
18 years ago
Thanks for the reply.
Now i can open the files in same instance on the editor.

I have one more problem in this respect :
The scenario is i open a html file programatically.
Now i do not close the earlier launched browser and run the program again.
This lauches another insatnce of browser.
Do you have any idea about how to open an html file in same instance of the browser.

Thanks & Regards,
Veda
18 years ago
import java.util.*;
public class GoodWindowsExec
{
public static void main(String args[])
{
Vector v = new Vector();
v.add("D:\\file1.java");
v.add("D:\\file2.java");
v.add("D:\\file3.java");

//v.add("D:\\file1.java&D:\\file2.java");


for(int i=0;i<v.size();i++)
{
try
{
String path = v.elementAt(i).toString();
String osName = System.getProperty("os.name" );
String[] cmd = new String[3];

cmd[0] = "cmd.exe" ;
cmd[1] = "/C" ;
cmd[2] = path;


Runtime rt = Runtime.getRuntime();
System.out.println("Executing : " + cmd[0] + " "
+ cmd[1]+ " " + cmd[2]);
Process proc = rt.exec(cmd);
}
catch (Throwable t)
{
t.printStackTrace();
}
}
}
}


I tried to execute above program.
The default editor for java files is set to TextPad.
But when i run the program then it launched 3 different instances of textpad.

If i used '&' seperated filenames(Example : pah ="D:\\file1.java&D:\\file2.java") then it opens the next file when i close the first file.

What i want to do is :
1. Only one instance of textpad should open all the files.
2. If textPad is already lauched then on executing the program new instance of textpad should not be lauched .The files should be opened in the existing instance.

Any help in this would be of great help to me.

Thanks & Regards,
Veda
18 years ago
String[] cmd = new String[3];
cmd[0] = "cmd.exe";
cmd[1] = "/C";
cmd[2] = "C:\\Program Files\\test\src\a.txt"

Runtime.getRuntime().exec(cmd)

We are trying to launch the txt files using above.
We want to launch multiple txt files in our application.
If we use above code then we end up launching multiple application.
Please let me know if there is a way to launch multiple text files in one editor.

Thanks
18 years ago