• Post Reply Bookmark Topic Watch Topic
  • New Topic

want to run executable application client jar on click from any where

 
peyur oza
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am working with j2ee RI server.and i want to pack my total application client in to executable jar that should be work from any where on any platform. for that i explained my problem in brief
if any one can help urgently, than thanks in advance.
My application is complete and its work with
runclient script.
but now i want to run my executable client jar from other maschine than j2ee server.
now i take my application client jar file and put it into any other maschine than server maschine.
and run that executable jar from command prompt
java -jar MymessengerClient.jar
it gives me error like "Failed to load Main-Class from manifest Attribute in MymessengerClient.jar"
then i unjar it and seen than META-INF folder which doesn't contain manifest.mf file.
when i create this file and i put my Main-Class
Main-Class: Mymessenger2
than it gives me error like
java.lang.NoClassDefFoundError : javax/ejb/EJBHome

need Helppppppppppppppppppp urgently,
peyur
 
Anand Ranjalkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi peyur,
If u r using Weblogic6.1 and above..it gives one utility called weblogic.ClientDeployern which jars all the necessory files required for a remote client to get compile and run.
UR ejb.jar file must have application-client.xml file.
After u have created stub and skeletons using weblogic's weblogic.ejbc utility, create the client.jar by this command...
java weblogic.ClientDeployer <urApp.ear> <urEjb.jar>
and this will create client.jar.
This client.jar must be in the classpath of ur EJBClient when it is compiled and run.
Try it..
Anand Ranjalkar
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peyur,
the following worked for letting a Java stand alone application on Win NT 4.0 call the J2EE reference implementation server on Red Had Linux 7.2 via LAN 192.168.100.x .
Note that you must set the two system variables APPCPATH and VMARGS in the NT system environment before calling the runclient script, because runclient relies on them.
@REM 2002-05-15 Thomas Taeger taeger@classic-and-class.com
@REM in app-client-ic.jar are the Stubs of the Server-Bean, that the Web-Client needs.
set APPCPATH=WAppClient.jar
set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=192.168.100.10
runclient -client WApp.ear -name WApp-ClientApp-Main

Please note: If you watch the runclient script expanded then it is (in one long line):
%JAVACMD% %VMARGS% -Djms.home=%JMS_HOME% -Djms.properties=%J2EE_HOME%\config\jms_client.properties -Djava.security.policy==%J2EE_HOME%\lib\security\client.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH%;%APPCPATH% com.sun.enterprise.appclient.Main %*
Good luck,
Thomas.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!