i have made a java server that uses vertx, eventbus, and socket. The client connects to it using javascript. But all of this works locally, How can i deploy this software on a linux server so people online can use it?
you should build a jar file and deploy that on the server. Then start the file with
java -jar filename.jar
I don't know the context of your application, but it may be necessary to create a web server to let others connect to your application.
Related
I was unable to access java web application with static ip(public ip) of Windows Server it was getting that site cant be reached,
but it was working with local IP.
This is the first time i am deploying my java web application in windows server, I exported the WAR from eclipse and deployed in Apache tomcat server of Windows Server.
Please help me how to deploy in live windows server. and what is the process to deploy in live windows server.
Thanks
I found the solution for this question, the issue is that, the port i have given in tomcat, the same port is running on some other application, so i have change the port then it works fine.
I am a .NET Developer trying to learn Java. I have created a simple CRUD based EJB application and it works in Netbeans.
I am trying to add a remote Glassfish server (installed on another PC) to Netbeans so that I can deploy the application (EJBs) from Netbeans. Think of the remote server as a live server (though it is not).
Is it possible to add a remote Glassfish server to Netbeans 7.4. It only seems to allow you to add a local instance.
Assuming you have done asadmin enable-secure-admin (etc) on your remote server, the only way I have found is to remotely mount the (physical) server and then you can point Netbeans at the glassfish directory on the remotely mounted server.
Hi there I have a simple jar that works like a server, can I upload it to my OpenShift account and run it ? How by the way ? Thanks alot in advance.
You might need to provide a few more details. If you want to upload a .jar file and have it run, you will need to add it to your git repository and then create an action hook that runs the .jar file (java -jar /path/to/file.jar &) and then do a git push. if you want to include the jar file for your .war web application to use, you can check the KB articles section of the openshift website for examples of how to do that.
Only port 8080 on a specific IP is exposed to the outside world. Check the docs for the environment variables such as ${OPENSHIFT_DIY_IP} and ${OPENSHIFT_DIY_PORT}. (Note the public connect via port 80 but they are connecting to the openshift infrastructure which forwards to your app running on port 8080.)
An example of running a jetty server as a jar is given at https://stackoverflow.com/a/33114072/329496 which builds a WAR file then has a start script which runs jetty as a JAR assigning the host and port using those environment variables.
To be honest if you are building a JAR and pushing it to the server you could use just use Amazon Web Services to get a host without any added extras. OpenShift is PaaS (platform as a service) whereas Amazon Web Services is IaaS (infrastructure as service). If all you need is linux and java that is very well supported with any IaaS. They also have less restrictions on a raw linux virtual machine such as being able to run on port 80. As an example I used to build JARs to run on OpenShift but they don't have full support for websockets (you have to use a high port which is not acceptable to many corporate web proxies). So I moved over to AWS and it was very easy to get things running there.
I've got this new project at work. We are using Eclipse for the project. There are two run configurations, server and client. I have to launch the server and the client independently, and connect to the server using the client. Now, it so happens that this has to be done on both Windows and Linux. (four possible combinations: WS-LC, WC-LS, WS-WC, LS-LC, where W-windows, L-linux, C-client and S-server)
I have Linux on my machine (in which Eclipse is running) and run Windows on a VM. Is there a way I can make Eclipse launch the application in the VM?
I understand I have to build the application locally to a shared folder and send a launch command to windows (using openssh?, not sure). What are the best practices used in this scenario.
EDIT: I need to use this during development, to test my changes to the code. The same application provides both client & server. (yes, horrible, i know :X )
You can publish the server functions as JMX Beans using the MBean interface standard. Then use JMX Console to remotely connect to the server JVM and launch the application.
Eclipse has integration points for remote servers, look to "tomcat configuration" for an example of how it integrates with one remote server.
Whether your application can use an existing server integration solution or not depends heavily on details which aren't present. If you want to actually launch a stand-alone Java process from your remote machine, you generally need a program to capture the request and launch the process.
I am developing Web Application in local machine using JSP. I want to execute a Java Program that resides on Unix box from my local JSP file. I have all the credentials of the UNIX box. Can you please advise me.
Well there are various ways to execute [instruct remote machine to execute your java program]
RMI
WebServices
Defining your protocol and then Socket server client