Java程序在服务器,如何在服务器上运行Java程序?

I have made a java application that stores data from a .csv file to a MySql database. Now my client want it to upload this application to his web space (web space he has taken for his website) so that he can run that program on that server.

I have used FileZilla software to upload the program to his web hosting but now I don't know how to run that program on his server.

To run it on localsystem, it needs to open a command-prompt window to run it.

Is there any specific feature that the web-hosting must support to run that java program?

As it stores data from a file (.csv file) to a MySql database, then would it better to deploy that program on the server on which the database is being hosted instead of the server on which the website is being hosted?

解决方案

Indeed, saying "web-application", we usually mean a special application, programmed to run on the web-server all the time, just waiting for requests from user to process.

In your case, you have a console-based application.

Depending on the configuration of the server, no of these applications could be run on your client web-hosting, any of them or both.

Since, usually web-hosting is provided by hosting company, they may have configurations ready for running your applications, may have it turnable on/off or even take money for this.

In case of internal company server, you need to ask your customer and its IT-stuff to configure this.

Finally, you'll need to ask:

1. Does server support SSH? - it's simply a remote console. Usually it's running at port 22 and you many check it with command "telnet yourserver 22" (windows and linux) - if it doesn't reject your connect - means SSH is configured.

2. Does your server have java installed and if it is available for your account via SSH connection?

Only if your customer really mean web-application instead of console based application you need to ask if server has web-application server for Java - usually, it's something like Apache Tomcat, Jetty, JBoss, Weblogic, etc. But this way will require application modification in order to run it in web-server.

If you will decide to use console-application and not "upgrade" it to web-application, you really may run it at the host your database is running (again, you'll need SSH). You'll save time on remote database access operations - theoretically, your program will work faster.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值