How to make an offline java application available online? - java

I have developed an offline java application and i would like to host it online in internet. I am not sure how to adapt my code as an webapplication. How to adapt html css to my code? (as i already have GUI). thanks.
Not able to find the right example or how tos on internet

You can use some cloud services to run your application, for example you can use AWS (aws.amazon.com/cloud‎).
Steps you need to perform:
register your account there;
add credit card (it's gonna take like a few dollars from that);
install application container (like tomcat);
deploy your application to tomcat server (for example);
run tomcat (for example).
That's all, enjoy your application online.

Related

Advice on how to handle logs with Azure App Service Linux

So I've got a few applications run in Azure App Service. Most importantly I've got an executable jar running the majority of the application code. It is currently running as an app service with the Java 11 stack - I have deployed the jar file using Azure Devops and Azure will run this jar within its java 11 container.
The problem I have at the moment is with the application logs. I used to able to ssh onto the vm running the code and check the tomcat logs (before moving to azure app service). I also had ELK installed on the vm although a lot of the time I would just prefer to ssh on and grep and view the logs straight from the vm.
Now all I can do is access the log stream. This will stream the logs as they come out but if I want to search for an error from yesterday I am unable to do so. I've contacted microsoft support who haven't been very helpful so far. I've tried using application insights but I'm not sure how this allows me to better view my logs.
Clicking he application logging tab doesn't allow me to do much - I think it has more features for windows app.s
What I'm ideally looking for is maybe a way to mount a storage account and write the logs there? Or some simple log analytics would do which would enable me to view the logs from the day before or search them. Anyone able to recommend what they do in this situation?
Thanks
Yes, it is as simple as the doc mentioned. Just deploy this jar as well and then point to this agent in the jvm args.
Please let me know if you have any issues.

How do I connect my Desktop Java Application to an Existing GAE Datastore?

Currently I have a very basic desktop Java application in Eclipse that is meant to add entities to an existing project's datastore on Google App Engine. I have it all setup right now but since I am new to working with Google App Engine, I have no clue on how to get the application to send the Entities into the datastore of my existing project.
I tried looking this up online but most of what I found was for making java web apps. My goal is to have the application running as its own application, not through a browser.
So, what do I have to do to make the application connect to my GAE datastore? Is there some code I need to type, or perhaps some xml file I need to have within the project? I am just using the Java Eclipse plugin for Google App Engine.
Thanks for the help!
Based on the language of your question, I think you really need a big-picture sort of answer, rather than any specific code. Therefore:
You have a desktop application. This runs on some desktop computer.
You have a Google App Engine application with its data store. This runs in Google's data centers.
These are not the same computer. Therefore, they must communicate over the network in some fashion — that is the missing piece you're looking for.
Since GAE is designed around doing web applications, I recommend you think of this as a “web service” situation — that is, your desktop application makes HTTP requests to your GAE application. (The situation is simplified over the general case because you are writing both the client and the server.)
I recommend you read about designing simple web services and do whatever seems to fit your application.
One important warning: Unless your GAE application only ever has one user, you must not simply write a bridge that gives access to the data store over HTTP, because then anyone can make arbitrary changes to other people's data. As it is said for multiplayer game design: don't trust the client — that is, only accept network requests that make sense according to the rules of your application, and do not expect the client to enforce those rules. This is because anyone can make requests to your GAE application using something other than your desktop application, so you must assume you could receive arbitrary requests. This is the fundamental nature of the Internet.
For example, in the simple case of a multi-user application whose users do not interact with each other using the application, this means that every request that, say, updates a record, should only update a record which belongs to the logged-in user, not one of any other user.
For anyone that gets this problem in the future, I got an answer to it. I just tried experimenting around with the project settings and found it. So as it turns out, after you have installed the GAE Eclipse Plugin, you can just right click your project folder in the Package Explorer, go the Google sub menu, then click on App Engine Settings... .
From there, you need to check the Use Google App Engine checkbox, then in the deployment section, just fill in your project's Application ID. Your project's application ID can be found under the Application Settings tab of your project's online Google app engine dashboard. It is listed there as your Application Identifier.
Turns out that for me, I will need to find a different solution as you cannot integrate GAE with a desktop application that uses the Java Swing library. Bummer :/

Upload OTP(opentrip planner ) based Journey planner on cloudbees

I have developed a journey planner app using opentripplanner (its a java based server). Now i want to put my server online using Cloudbees, but i don't know how I can achieve this. Kindly help me out in this matter.
Thanks.
According to opentripplanner documentation you can't deploy it on default tomcat container as this require some customization. So the simpler way for you is to embed a servlet container and run as a Java application

Java Web Start - Does it work with Android?

As the title says, is deploying/using applications through Java Web Start a viable option? I found a few posts online from years ago saying that the JavaME applications are only available.
No, it's not an option. Android has an Application Store (called Android Market) that serves a similar purpose: managing applications install, updates and versions... So, technically, you don't need JWS.
Why not just host the .APK file locally on your lan on a webserver and allow people to download it from their browsers?
I believe the only way to get automatic updates like webstart is to use the android market. However, if you just want to deploy your app in your local lan, you can put the app as a link on an internal web server and have people navigate to it using the browser.

Is it possible to bundle my ASP.NET app into a self executable web app? (I know Java can)

NOTE: I'm a veteran Java developer (10yrs) and have recently decided to make things interesting and jump over to the ASP.NET / C# world. Thus the question...
I have a business requirement to build an ASP.NET web application that can be installed into an "enterprise data center" for use by an entire organization or can be downloaded by a single user and run on their desktop (assuming WinXP or higher). Installing the web application into an enterprise environment is easy, but allowing single users to download a file, double-click, then access the application through their web browser is an entirely different story.
To solve the single user dilemma in Java, I would simply bundle the Jetty web app server into my application and configure the WAR file to start up the web server and run the web application when someone double clicks on it.
Is there any way within the .NET world to do something like this?
Are there other .NET web app containers that I could bundle into my application?
Would I need to create an Installer Wizard that would configure IIS on the users machine?
Any help is much appreciated.
probably the closest thing to what you're describing would be a WPF Browser Application.
What I personally would use is a ClickOnce installed winform or wpf application.
You can include the Cassini web server (free to distribute). This server is great for one or two users, but you wouldn't want to run your site on it.
http://www.ultidev.com/products/Cassini/
There's a side benefit to this .... you can include the code in your solution and set break points wherever you need them. If you're using SharpDevelop instead of Visual Studio set Cassini as the startup project.
EDIT : Just checked the site and I'm not sure if it's open source anymore. I may have used Reflector to generate code to set break-points.

Categories

Resources