I am writing an application that creates a Java portlet by the ant batch file with the cmd.exe using a Process object in C#.
When I pass the \"Create\" command to th
try setting tha java path properly
can u give me the exact error message u get...
I had the same problem and solved it. I'm using 64-bit Windows 7 with 64-bit Java. Setting the compile target in the Configuration Manager to 'x64' solved it. If you use 'any CPU' the build probably falls back to 'x86', which is not working with 64-bit Java. So you need different builds for different machines...
If you have multiple values in your PATH variable, make sure they are not separated with a space following the end semi-colon (;)
I also ran into the same problem and found my solution. It might help you too.
Hope it helps you.
I don't know if this will help anyone else that is viewing this post but when i had this problem it was because I was running a x64 machine and the java.exe was installed to the ProgramFiles(x86) folder. I simply added the path to the exe to the 'PATH' environment variable and then it fired up just fine.
Hope this helps someone.
You should check your PATH variable. You can use the set
command to set the correct path to your java environment folder.