File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error while running Client in Eclipse helios

 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,

i am trying to run a stateful session bean program.
after starting the jboss server from eclipse helios,when i try to run the Client.java,i am getting following error



Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jdk1.6.0_24\bin\javaw.exe" (in directory "H:\eclipse-jee-helios-SR1-win32\eclipse\storeprograms\Trialone"): CreateProcess error=87, The parameter is incorrect



i am using JRE 6,Jboss 6.

cheers
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you set up run options for your client? If so, what are they? It appears that one of the options could be misspelled and thus the JVM does not recognize it.
 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
following is my eclipse.ini



-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m




cheers
 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to run below client program in eclipse helios
what is the procedure


import com.sess.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
import javax.rmi.*;
public class Client
{
public static void main(String ar[])
{
try
{
Properties p=new Properties();
p.put(InitialContext.PROVIDER_URL, "jnp://localhost:1099");
p.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
p.put(InitialContext.URL_PKG_PREFIXES,"org.jboss.namingrg.jnp.interfaces");
Context ctx = new InitialContext(p);
Object ref=ctx.lookup("SessBean/home");
SessBeanLocal h=(SessBeanLocal)PortableRemoteObject.narrow(ref,SessBeanLocal.class);
SessBeanRemote bean = h.create("hello");
System.out.println(bean.display());

}
catch(Exception e)
{
e.printStackTrace();
}
}
}


i am trying to run Ejb 2.1 stateful session bean

cheers
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked about run options for your app, not for Eclipse.

The code you posted, is that in its own project? If so, right-click the source file and select Run As | Java Application.
 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code i posted,is that in its own project

but when i run it is as a java application it shows following error



Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jdk1.6.0_24\bin\javaw.exe" (in directory "H:\eclipse-jee-helios-SR1-win32\eclipse\storeprograms\Trialone"): CreateProcess error=87, The parameter is incorrect



cheers
 
Sumit Bisht
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://eclipsecoding.wikidot.com/faq#launchError for details.
The max command prompt line length in windows xp is 8191 characters. You'll have to shorten your CLASSPATH variable, it seems.
 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding


C:\Program Files\Java\jdk1.6.0_24\bin\javaw.exe" (in directory "H:\eclipse-jee-helios-SR1-win32\eclipse\storeprograms\Trialone"



jre classpath i have not changed and tried out.

i changed that H:\eclipse-jee-helios-SR1-win32\eclipse\storeprograms\Trialone to H:\eclipse\storeprograms\Trialone

still it is giving same error

if have to change jre classpath i have to ensure smooth working of all applications depending on jre.Are you advising me to change jre path?.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look in the Eclipse log to see if there is more information about this. The log is at workspace/.metadata/.log

How big is the classpath for this app? How many JARs are in it and how deeply are the JARs nested within the directory structure? Googling the error indicates that the command is too long to be issued and that usually means that the classpath is too long.
 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
now i shortened the jdk classpath still i get following error



Exception occurred executing command line.
Cannot run program "D:\jdk\bin\javaw.exe" (in directory "H:\eclipse\s\T"): CreateProcess error=87, The parameter is incorrect


cheers
 
shriram iyer
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem resolved

instead of including entire jboss library i included j2ee 1.4 libraries (jboss tools)

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic