we are forced to compile all our classes in other applications JVM
But that's where defining Remote Interfaces come in to the picture right? you'd define your APIs as Remote Interfaces, package them as JAR file, use that JAR in both the applications, one which implements it and the other which uses it. If you haven't taken a look at it so far, here is it - http://docs.oracle.com/javase/tutorial/rmi/compiling.html
And the generic description provided could fit any of those cases. Could you please do some more searching on this topic and if you still would like to get another set eye balls into the problem, we'd be happy to assist. Also, it would make our jobs a lot easier if you could also provide what steps you have tried so far so that we don't try the same things again.
If you are looking to split, then split() is one way to go. But when you split a string, the array will have the split characters already in them. so, you don't really have to explicitly assign "0" to each array item.
I was a guy without any programmatic experience and wrote everything in main(). Later, people taught me OO relating it to real life and then they said how to do things the Object way in Java. Drawing from my experience, even if we don't start with OO in our Java tutorials, a brief background on OO would be good for folks who are starting to learn Java. IMO, syntax can be learnt anytime but once we start with syntax, it tends to go that way until we have to break the flow and say - 'hey, you know what? strings, ints and public static void main are fine, yeah we know we said we'll learn about println later but before that you need to know about objects'. sounds a bit odd. my 2 cents.
There are two parts to this problem:
1. Read the value from Excel (for which you might want to look up ODBC and how it's done).
2. Create the directory from what you've read (traditionally java.io and if you're curious, java.nio).
Let us know when you attempted these and whether these worked.
I believe you are loading the file from your application. and just to be on the safer side, "g:\program files\apache software foundation\tomcat 7.0\webapps\griddemo\web-inf\classes\config\servicesvalidations.xml" - are you sure they're of the right case? (especially the WEB-INF part?) and could you try putting the file in a path which doesn't have spaces in them?
If the ArrayList does not contain elements then there is no chance of getting into for loop which is the cause of the IndexOutOfBoundsException, right?
You mean to say an enhanced for loop would throw an exception if the list is empty? No. it wouldn't. It just won't enter the loop. The reason for the IOOB is because list.set(i, obj) accesses an index in list which will not be there on an empty list, which is what Jeff had mentioned and that's why you'd use add()/addAll() instead of set() when you want to add an element to an empty list.
Please not Line 10 is inside the loop and not the beginning of the loop.