Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAnup
Novice
1,210 Views

[Intel System Studio IoT Edition] problem with arguments to be passed to Java application

Hi,

I had to put arguments for my java code like this pic :

And after apply, I clicked run. One .sh file is created in Edison and before it got deleted, I had read the .sh file. What I found is :

# !/bin/bash

rm -f JavaDMv0Fifo

chmod 777 /tmp/JavaDMv0.jar

set -e

mkfifo -m=0666 JavaDMv0Fifo

java -cp .:/usr/lib/java/*:/tmp/JavaDMv0.jar -Xrunjdwp:transport=dt_socket,server=y,address=8005 com.tcs.edison.dmagent.TcupLeshanTest "-ep "testdev1" -key "key# demo" -cp "5688" -ip "10.100.10.96"" 2>&1 > JavaDMv0Fifo &

cat < JavaDMv0Fifo

rm -f JavaDMv0Fifo

As it is clearly seen, the whole string of arguments in the picture is inside double quote. ie.

"-ep "testdev1" -key "key# demo" -cp "5688" -ip "10.100.10.96""

But what actually needed was :

-ep "testdev1" -key "key# demo" -cp "5688" -ip "10.100.10.96"

I had searched where to change this behaviour (most possibly this is due to running remotely from Intel System Studio. As, if I run this as Java application from Intel System inside my PC, there is no such issues). But I didn't find any point. Let me know how to change this.

This is the configuration for my PC :

0 Kudos
6 Replies
idata
Community Manager
26 Views

Hello anupam_on,

 

 

I'll try to help you with this. I believe the behavior you are describing is very similar to the bug reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=494246. If that's the case, the behavior is directly related to Eclipse (as you may know System Studio is based on Eclipse), therefore I'd suggest you to contact Eclipse ( https://eclipse.org/org/foundation/contact.php), they might be able to provide you a more accurate suggestion.

 

 

I hope this information helps you,

 

-Peter.
AAnup
Novice
26 Views

In my case, If I run my code as Java application, there is no issue (Whereas the bug you had reported says even with Java application, the issue is there). Only Intel IoT Java Remote application has the issue. So please look at this matter.

AAnup
Novice
26 Views

However, I solved the problem just now putting argument this way :

-ep

testdev1

-key

key# demo

-cp

5688

-ip

10.100.10.96

Line break for each key and value.

idata
Community Manager
26 Views

That's great to hear! I'm glad you found a solution for the issue. We appreciate that you shared the solution it might be of help for other users.

 

 

-Peter.
AAnup
Novice
26 Views

So that was not a problem of eclipse, rather the shell script generated and sent by Intel System Studio has the provision of taking argument this way. I would try if that can be documented so that people know beforehand. Is there any way I can contribute this as part of the official repo of documentation ? Let me know if there is any way.

idata
Community Manager
26 Views

Hello anupam_on,

 

 

I have already passed your feedback to the appropriate team. Thank you for your interest and your help!

 

 

-Peter.