• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

how to run a jar file in serverbased application

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends,
this is naveen .i created a jar file in net beans .its working in stand alone application and also when i am using in tomcat 7 calling through Jsp file its working properly.but when i posted this in to the server or access through client server architecture its not working. i.e when i am calling my jar through jsp file my application is not opening in my client machine instead of that it is opening in server itself .please help me to fix this problem how can i access my jar file.



regards,
naveen
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't. Java code in a web app executes on the server. If you want to run code on the client you need an Applet or use Java Web Start.
 
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP's and servlets always run on server inside a container. So if you are trying to execute a jar file using jsp it will always be executed on Server not on the client machine. You have to do alternative Can you please elaborate your requirement?
 
Naveenzion Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You can't. Java code in a web app executes on the server. If you want to run code on the client you need an Applet or use Java Web Start.




then how can i run jar file in server based application .
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bear already told you:

If you want to run code on the client you need an Applet or use Java Web Start.

 
Naveenzion Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harpreet Singh janda wrote:JSP's and servlets always run on server inside a container. So if you are trying to execute a jar file using jsp it will always be executed on Server not on the client machine. You have to do alternative Can you please elaborate your requirement?



actually i am game project i created scrambled game in swing using Net Beans .my jar file is working in stand alone system by using tomcat 7.0 server.But i posted my jar file in server .i called my jar file from my client system through jsp using "Runtime.getRuntime().exec("/home/ubuntu02/Desktop/NaveenBackup/JavaApplication1.jar");" this code .my application is running in server itself instead of in my client system .how can i fix this problem .what is the alternative solution to fix this problem .please help me to fix this problem . i have to post this in ot the server. waiting for your reply .


regards ,
naveen.



 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your game is in swings than you can convert it to an applet and post the same on the server. An applet will be loaded and executed on client side.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

.my application is running in server itself instead of in my client system .how can i fix this problem .what is the alternative solution to fix this problem .


Bear already told you, and I already told you that Bear told you. Why are you ignoring our posts? They point to the solutions that you will be using if you want to get this done. The sooner you start considering this, the sooner you'll be done.
 
Naveenzion Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[ UD: Please do not post the same question to multiple forums: CarefullyChooseOneForum. Let's continue the discussion in this duplicate thread, where you have an answer already. ]
 
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic