Safoura Seddigh

Greenhorn
+ Follow
since Nov 28, 2011
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 Safoura Seddigh

Hi

I have a JAR file which is supposed to run and then run a Python file using runtime.exec. The python files needs to look for a shared library to use for talking to a USB device.

On different machine, however I get different results. On some , the process id done perfectly. On some, not.
I found out that the Path variable the python sub process looks at is a really strange and has crazy value.
Turns out that java code is sending it a crazy value for the Path variable since it sees such crazy value itself. (I displayed the value in java code)

I have attached a screen shot of the results.

Why is it that on some systems, running JAR does not detect a valid Path variable and therefor displays a crazy value. AND the Path variable is the only invalid variable that the JAR file is seeing; the rest of the env variables and their values are fine .

Does any body have an idea of what could be the reason? Anything related to Java runtim....
12 years ago

Safoura Seddigh wrote:

Paul Clapham wrote:

Safoura Seddigh wrote:I have made sure that the dll exists in the paths I thought the program might look into for it (system32, the current directory...)



Which "current directory" would that be? The one for the Java programming calling Runtime.exec, or the one for the executable which is run via Runtime.exec? Or did you assume they would be the same? (Note that Runtime.exec has a version where you can specify the current working directory for the executed task.)



Hi

Thanks for the reply!

I did copy it to both (where my java jar file is and where my exe python is)
I think I also tried the version you are mentioning here but the problem didn't go away!

Thanks

12 years ago

Paul Clapham wrote:

Safoura Seddigh wrote:I have made sure that the dll exists in the paths I thought the program might look into for it (system32, the current directory...)



Which "current directory" would that be? The one for the Java programming calling Runtime.exec, or the one for the executable which is run via Runtime.exec? Or did you assume they would be the same? (Note that Runtime.exec has a version where you can specify the current working directory for the executed task.)



Hi

Thanks for the reply!

I did copy it to both (where my java jar file is and where my exe python is)
I think I also tried the version you are mentioning here but the problem didn't go away!

Thanks
12 years ago
Hi,

I just joined the forum and wold appreciate any thoughts and comments from you all.

I need to talk to a usb device and do that through a piece of python code. The python code talks to the device using the driver installed for that device (DLL)
Since my main software is written in JAVA, I used runtime.exec to call the executable python code! (I have tried different forms of runtime.exec with args.envp,..) The problem is that when I run the exe python file by double clicking it, it runs fine and detects the usb device! If the java code runs that exact exe python code through runtime.exe , I get a message stating that the library I have installed for the device is not found and therefore the device is not detected.AND that only happens on some computers and I have both working and non working code on different versions of windows (7/vista/xp)

That is a runtime.exec and a java issue? Is that right? How can I figure out what the problem is? I have made sure that the dll exists in the paths I thought the program might look into for it (system32, the current directory...) but no luck so far...
Does any one have an idea of what the problem's cause could be?

I would appreciate the help very much!

Thanks
Safi
12 years ago