jaibhim max

Greenhorn
+ Follow
since Nov 15, 2010
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 jaibhim max

Hi All,

I am using windows 7 and trying to create a file .testBoringFile on my mounted drive "U:".
I wrote following code.



.testBoringFile gets creates but an exception is thrown while executing"tempFile.createNewFile()".




I referred following link, but doesn't get any useful info. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4857780


Can anyone please help me out?


-akki
8 years ago
Hi All,

I got the solution from my friend...It should look like as -



8 years ago
hi Maneesh,

its mount not mountvol.

mount.exe is present under C:\Windows\system32


Thanks,
jaibhim
8 years ago
Hi All,

I am using windows 7. If I run following command from command prompt

It mounts the network drive /d/jaibhim on my z: drive.

I want to achieve same result through Java. So I wrote following piece of code-


I get following error from the error stream- "'C:\Windows\System32\mount.exe' is not recognized as an internal or external command,"

Could you please guide me, where I am going wrong?


Thanks,
jaibhim
8 years ago
Hi All,

I am opening one channel and reading some streams through a socket. If i use setSoTimeout(5000), it is expected that socket will be closed after 5 seconds.
Consider, I have established SSH connection with a server and reading data through socket, I want to know -
1. If my operation through that socket is taking 20 seconds, will that socket will be timed out after 5 seconds even if the operation is in progress?
2. If my connection breaks with the server when it is reading data through that socket, will my socket be timed out after 5 seconds?


Thanks,
Akash Mahakode
9 years ago
Hi Experts,

I have created a java swing application which has help button. When user presses the help button, I launch the native web browser in which help url is provided and opened.
Now, I m thinking to copy those help html files and pack it inside the executable jar file. I am able to create the jar with the help html files packed in the jar. Now, I want to open these packed html files when user presses the help button.

Can anyone please guide me to open the packed html file inside the jar?


thanks,
jai
9 years ago
I want to allow only one instance to be running of my jar...So, I am checking for the process, if that process is already running then I will pop-out the error message to user stating that , "another instance of Myjar.jar is running"


-akash
9 years ago
Hi Rob,

Thanks for the info, but I cant expect my application users to install "Process explorer". Is there any another way?


-jai
9 years ago
Hi All,

I have one executable jar e.g. "MyJar.jar". When I run this jar on linux machine, I am able to figure it out that this jar is running or not as-


But when I run this jar on windows, then I see only java.exe as running process.

Is there a way by which I can identify on windows whether MyJar.jar is running or not?


Thanks,
jai
9 years ago
I have designed one Java application in which I have provided a button. On pressing that button, following method is invoked and mail window is opened in ms-outlook on widows. But it throws exception on ubuntu thunderbird.



Exception is ----

java.io.IOException: Failed to show URI:mailto:user@domain.com
at sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:75)
at sun.awt.X11.XDesktopPeer.mail(XDesktopPeer.java:60)
at java.awt.Desktop.mail(Desktop.java:456)
at panel.SendMail.onLaunchMail(SendMail.java:60)
at wizard.VBEWizard$18.doInBackground(BhimWizard.java:904)
at wizard.VBEWizard$18.doInBackground(BhimWizard.java:1)
at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

everything works fine on windows but fails on ubuntu. Any pointers to this problem?

Thanks,
bhim
9 years ago
Hi Dan,

what I have observed after running "top" command that my all "svn" processes got stuck in "pipewr" state. If I would be able to take out my svn processes from "pipewr" state then everything will work fine.

Regards,
jai
the svn command that I m executing is -


Whats the modification required?


-jai
Thanks Dan, I will try it out...
Hi Dan,

Thanks for the pointer.... commandToSVNCheckout() has svn command to co a directory and nothing else....
Could you please explain " i used "start svn checkout xxx" for having different window running", I did not understand it completely.


Thanks,
jai
Hi Dan,

I create 10 threads in similar fashion as follows....
Thread t1 = new Thread(new Threader1());
t.start();

and run() is as follows-

run(){

commandToSVNCheckout()

}