endswel shui

Ranch Hand
+ Follow
since Jul 03, 2008
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by endswel shui

hi, all
I make a Make a i18ntool for the international, can read the files from excel, properties and edit them save to excel, properties

this is the url http://code.google.com/p/i18ntool
12 years ago
Caculate the 'days' of every month for the year


just use Calendar.add(-days)
12 years ago

try to use the request.getRealPath("/")
getServletContext().getRealPath("/");
this.getClass().getClassLoader().getResource("").getPath();
and analyze and reorganize it

amit punekar wrote:Hello,
how you are using this logger in your application code?

Regards,
amit



yes, type some code in your app, is better
just demo to simulate is ok

Stephan van Hulst wrote:Hard to say without seeing your code. The methods you refer to sound like they're either from the Windows API , or your own methods.





hi, Stephan, above is the code

scene 1
I can activate app2 which hide in the system tray in winxp 32 bit

but cant activate the app2 hide in the system tray in windows 7 professinal 32/64bit
btw, for the windows7 professional the default setting, cant create the file in the folder of 'c:\Program Files' , and need to type sth to allow it to access


scene 2
also in the windows 7 professional 32/64 bit
and a little confused, when I using the app1 in the eclipse which open normal cant ativate
when I using the app1 in the eclipse which open as administrator can ativate

or is there anything need I to change for the windows7 professional 32/64 bit security?
and how?
12 years ago
Now, the state is I use a app1 to invoke app2, the precondition is app2 is hide to the system tray

I can use the


to make the app2 active in the desktop.
This operation can effect in win xp,
but cant be effect in win7.

What is the reason for the win7?
12 years ago

Campbell Ritchie wrote:Still don’t know. But do you mean that it runs all right in WinXP and not in other versions of Windows®?



yes, WinXP 32 bit is OK
12 years ago

Campbell Ritchie wrote:Don’t know myself. Sorry.

I presume there is nothing in the Runtime documentation or links like Michael Dacosta’s article to say that exec() starts a new thread which runs independently of the JVM?



yes, I read that also when try to solve this issue.

but it cant. in windows xp, it is ok.
12 years ago

endswel shui wrote:

Rob Spoor wrote:To go through all the windows, you need native function "EnumWindows".
To go through all the processes, you first need to make a snapshot using "CreateToolhelp32Snapshot, then call "Process32First" once followed by "Process32Next" for all the remaining processes.

Check out Microsoft's MSDN site for more information and some examples.



hi, Rob
Thank you for your answer, I follow it and implement the result what I want,

there is another issue,

for the app2, when it is activated from the system tray by the app1.
How could I hide the system tray, (because if the app2 shows itself in the desktop, it's system tray will be hide)
I try using the ShowWindow and FindWindow in the jpa under the User32, but FindWindow cant find it. --!
so, is there any method to solve this?




I fail of this icon hide
I find the reason maybe to change the Shell_NotifyIcon()
but it is not very easy to write using jna. I dont know why, maybe some loss.
--!
12 years ago

Campbell Ritchie wrote:I am not sure I understand the problem; please explain more.

I think this post is too difficult for “beginning”, so I shall move it.



ok, you can move it to other place.

the problem is we use the jre5 in real product.

and we develop a desktop application, embed tomcat 5.5 to start the app, we open the tomcat server port is 8689
but when we use the to run another local bat or application.
after that, we will close the main application,
but close the main application is ok, all seems closed. and the embed.stop() is invokded too.

after we type the netstat -ano|findstr "8689"
there is a record in the windows 7 32/64.
only can see the 'PID', but cant see the 'IMAGE NAME'

I think that is the jre5's issue or not
12 years ago
How Can I use java to invoke bat? but java is close.

In eclipse, if I use the Runtime.getRuntime().exec() to invoke a bat, and the bat is there, i dont close it,

and I close the java app.

but the taskmanager also contains a java.exe which monitors the bat.

12 years ago
how can I get the merge table cell and get the location






if the cell (1,1) (1,2) merge, like below


how can I get the location of the every cell's array
12 years ago

Rob Spoor wrote:To go through all the windows, you need native function "EnumWindows".
To go through all the processes, you first need to make a snapshot using "CreateToolhelp32Snapshot, then call "Process32First" once followed by "Process32Next" for all the remaining processes.

Check out Microsoft's MSDN site for more information and some examples.



hi, Rob
Thank you for your answer, I follow it and implement the result what I want,

there is another issue,

for the app2, when it is activated from the system tray by the app1.
How could I hide the system tray, (because if the app2 shows itself in the desktop, it's system tray will be hide)
I try using the ShowWindow and FindWindow in the jpa under the User32, but FindWindow cant find it. --!
so, is there any method to solve this?
12 years ago

Rob Spoor wrote:Since the other application is not part of the same JVM you definitely have to use JNI (or JNA) for this.



hi Rob Spoor
but how, do you have some experience (like code, etc.) to share.

how to handle the handle?
12 years ago
no, just app2
I can using the exe4j ( the one instane properties) to pakcage app2
and using the image_name or pid find it,
but cant make the app2 show in the desktop if app2 is in the system tray
12 years ago