Maryna Litvinchik

Greenhorn
+ Follow
since May 01, 2007
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Maryna Litvinchik

Not exactly.
However, we decided to use something else for new line character rather than \n, so I think we will just go with that solution. Thank you Paul for your help !!
Maryna
12 years ago
Exactly Paul.
I am able to run this whole command (with newline in it) if I copy paste it myself straight into the windows command prompt, but the same command will fail if I use Runtime to pass it on.

And the picture was just for clarification my real problem.
Thanks for your help. I have a feeling there is no solution here
12 years ago
I see your point.

Microsoft-supplied command-line interpreter Windows is the one I am working with.
One picture is worth a thousand words.
So in this image below it shows how I am passing the \n char separating 3 lines of text. Runtime.exec ends up splitting this one command into 3 separate commands (just like you see at the bottom of the screenshot) and the information in circle is lost or actually lack of it is causing failures on Submit.

12 years ago
Thank you Paul for your reply.
However, I am not sure what you meant by "question about real problem".
This is the real problem. I need to figure out a way to pass \n as part of an argument w/o it being interpreted and treated as new line character by Runtime.exec.
I need \n to be preserved as substring "\n"

Thanks
maryna
12 years ago
Does anybody know if there is a way to pass \n as part of the text input during Runtime.getRuntime().exec(String []commandArray) call?

Here is the example of the code that is showing the issue.


If I run it I get output in form:


but I really want to see:


Please note: this example is made up to just demonstrate the problem. In reality I am trying to figure out how to pass some information provided by customers to a Cmd server that creates DB objects based on that. And the Cmd server is expecting \n to be used to show the new lines.

Thank you in advance for any tips!
Maryna
12 years ago
I have a very annoying reoccurring problem while using Websphere Application Server v7.0 at local host. I am working on a web project which is added to server via 'Add and Remove projects' button. Every time I change any of the jsp files they get automatically published to the server and I end up with a broken project and the error in the console log of the server that looks like this one:

[5/14/11 9:43:39:484 CDT] 0000001d SystemErr R Caused by: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException: IWAE0037E Could not open C:/cc/mmlitvin_bld0802_2/vbs/build_vob1/foodsmart.web/FoodSmartEar/FoodSmartEar.ear
[5/14/11 9:43:39:484 CDT] 0000001d SystemErr R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.primOpenArchive(CommonarchiveFactoryImpl.java:1616)
[5/14/11 9:43:39:484 CDT] 0000001d SystemErr R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:1203)
[5/14/11 9:43:39:484 CDT] 0000001d SystemErr R at

In order to get rid of this error I do:
1. right click on the Server instance -> option Clean
2. log into admin console and specify the shared libraries for the project ( I am using a separate .java component for JDBC work and need to reference)
3. save my changes

This workaround takes about 2 min which seems small but once you add up 2 min for every change I make to jsp it becomes a bunch of wasted time.
I would imagine my problems are due to some bad setup and in theory my jsp changes should not require Cleanup and I should be able to se them after refresh of my web page but I just cannot locate the root of the problem here.
If anybody has any suggestions I would truly appreciate it !!
Thank you
12 years ago
Nitin,
Seems I am trying to solve the same question for myself: Java vs PHP .
I have done a lot of research and still not convinced which one is better. Did you come to any conclusions? Do you mind sharing?
Thanks
15 years ago