How can I deploy deploy my local Java "Web Application" - java

all!
I'm currently working on a project for a friend of mine. I'm using a WebView for the GUI so that I can use web technologies instead of Swing or JavaFX (I know that WebView is part of JavaFX).
I'm also using JSP, so I'm using jetty (will change to gretty soon) as the servlet container/web server. My friend needs to store data somewhere, so I'm using SQLite as the database.
Currently I just build the project through gradle, but I'm unsure how I can deploy this (as an executable jar for example) for my friend. I need to somehow execute jetty and SQLite before the actual front-end, but I'm unsure of how to do that.
I imagine I should make a driver file and execute those programs from main, but I'm unsure of how I would go about doing that. If this is the case, could someone go into detail as to how to approach it this way?
I'm also not turned off by out of the ordinary solutions! If it works, that's good enough for me!
Any help at all would be immensely appreciated! Thank you all very much!

Related

How to share a java application for the clients without an installer?

I have a java application that uses swing and I would like to share it on my website, so that users who have no JRE on their computers can open it.
First, I naively thought that a link to download a .jar was enough but now I realize that it needs a JRE to be launched properly.
So then, I looked for other solutions and I searched information for the applets, until I understood that it was now obsolete.
Eventually, I tried to understand that Java Web Start thing but I am completely lost, as it needs several files to be created and to setup the server. The tutorials I found weren't very clear... As I am an Eclipse user, I tried to look for a plugin that would do this automatically but I cannot find anything.
Do you know a plugin or is there a simpler possibility to share this very simple java application in a website ? Or do I have to try and try again to deploy my application through Java web start.
Thank you for your answers :)

GWT/ JSP- how to run jsp

I am on a project that uses GWT/ eclipse/ SQL Developer and the guy who originally implemented it is no longer on the project. We have a normal WAR and everything but the jsp files are kept in a different environment. Anyone know why? Can they not be run through GWT?
The issue we are facing is the only way we have to test/ compile JSPs is to actually deploy it into DEV which takes a lot of time. So we are in need of being able to run JSPs locally.
I have been told someone used to use Jdeveloper to do this, but I am unfamiliar with it and the only YouTube tutorials are in a foreign language (in regards to using JSPs with JDeveloper 11g). Someone else suggested notepad/ Tomcat? Or yet another option would be to configure eclipse to run it with our current project in GWT?
I am not familiar with any of this being I am brand new to JSPs,Tomcat, etc. and am in desperate need of some help.
What is the best way to accomplish my needs and are there any guides/ tutorials to help me through the process?
My requirements are just to run a folder with 4 linked jsps and be able to connect to the database to provide the information.
"I am not familiar with any of this being I am brand new to
JSPs,Tomcat, etc. and am in desperate need of some help."
That's sounds true!
One answer about the different environments is that jsp needs "EE" .I.E. EclipseEE but the GWT app just uses plain old eclipse (like an eclipse helios release with GWT plugin).
Regarding your requirements, I can't understand them clearly enough to begin to provide helpful information, but good luck.
Tony

How to have a Java application get the latest version of itself?

I would like to make an update finder, so to speak. The client application would send a request to the server, get the latest version, and return it to the user in the form of a prompt:
There is a new update, X.x. Would you like to update?
Something of that nature. How would I go about doing this?
Also, if possible, please don't suggest API's unless it is either really necessary or it would be really hard for a beginner to understand. I would like to keep my project working with core Java packages.
Have you looked at Java Web Start?
Updates to a Java Web Start application are automatically downloaded when the application is run standalone from the user's desktop.
http://docs.oracle.com/javase/tutorial/deployment/webstart/
One way to do this easily in Java is to use Java Web Start.

How to make a browser based IDE to code in the cloud?

I have read a bit about cloud and browser based IDE's.
I am planning to make a Java based bare bones IDE by integrating a compiler to code in the cloud. This is for educational purpose as I am just determined to learn to develop cloud based IDE.
I want it to be something like eclipse Orion but i want it to allow for coding in java. It should allow users to code, compile and run java programs by directly writing .java files and not by converting the .js files into java files.
Can someone please suggest me an existing cloud that I should use for this. And also, I am just a beginner and I have no clue about how to proceed and the articles that I am required to read.
Please do let me know what I should begin with and the cloud that suits my needs the best.
Thank you very much in advance.
You should look at projects like Mozilla SkyWriter, which implement the bare bones editing functionality
(There have been a lot of change lately. There seems to have been migrated to Ace)
You can use Codenvy and put your code on a Git repository. Then, you could build automatically once you have done the push using a CI tool like Jenkins. Now, I have an environment in which I use a Jenkins instance as a Service and also a runtime environment so I can get a continuous deployment pipeline. This video will show you, in a graphical way, what I am talking about.
Koding provides you with a full Ubuntu machine, with root, so it's able to run and do what you want, programming wise.
The reason i'm suggesting Koding though, is that they have a Framework to develop your IDE for the Koding VMs themselves.
The logic here, is that making IDEs is challenging, but the biggest challenges is ensuring security between your IDE users. Using another VM platform would mean that you don't have to manage the security of your VM, and focus entirely on your IDE.
Let me know what you think :)
For virtual/cloud hosting try one of the following:
Rackspace
VPS Farm
I like vpsfarm because it is cheap and pretty bare bones.
For the IDE itself, I would first create a webapp that can upload and compile and run arbitrary java code, without adding libraries or J2EE. That alone will be a good undertaking for one dev.

Setting up a maven-web project(from an existing netbeans-maven-web one)

So, I want to change a project here in my company to work with some IDE agnostic settings. I have a very small experience with setting Java applications with Tomcat(I can barely remember how it worked).
So, to help making our newest applications, independent from IDE's we are using Maven, which currently builds our spring applications nicely on both eclipse or Netbeans. But there are two things I would like to know how to do with Maven:
Deploy the app to the test server.
Run the test server easily.
Both are tasks that Netbeans does automatically.
I would appreciate a lot, if anyone could give me detailed directions on how to do the thing.
Oh, for the moment we are using Tomcat as test server.
It looks like you need the Maven plugin for Tomcat
The link should tell you everything you want to know.
hth

Categories