how to create a window service using java? - java

is it possible to run a java program as window service is anyone done that successfully ,?
I'm trying to create LDAP application using java, want to run a java application as a window service, java is good choice or not, if any of you guys done any simple window service using java means ,can you please share the steps, thanks!

Yes. There are a number of frameworks available. I would recommend commons-daemon, which I have been using for a long time. It is well documented, so just follow the instructions to get it up and running.

Related

Pulling my profile picture from Twitter using Auth/twitter4j/Eclipse

I'm looking to build a web service using twitter4j which will allow me to get my profile picture from twitter and print it out somewhere.
My initial plan is to use Eclipse and Heroku/Git. I'm just a little unsure of the steps to take to accomplish this... I'm in no way new to coding or Heroku/Git, but I am fairly rusty when it comes to Java, and Java is the language I need to use.
Would anyone be able to suggestions how I would go creating the service I have mentioned above?
I have even cloned these 4 example web services here to my desktop and then opened them in Eclipse, with the intention of changing/removing/adding whatever code I needed to in order to accomplish my task but I get endless
'Cannot be resolved to a type'
errors. I'm assuming this is because I need to install libraries/JAR files in my Java project.
You don't need to use the Twitter API if all you want is the user's image.
You can use a service like http://avatars.io/
Simply call http://avatars.io/twitter/edent to get my avatar.

Using Java Service Wrapper GUI to interact with desktop on windows

Help!!
Please I created a Java Windows Service using Java Service Wrapper, now my Service is supposed to pop up a dialog at certain times and this doesn't seem to work.
I've tested the service before installing and it worked just fine, but after installing the service nothing happens.
Please how do I solve this issue?
I think you need to use Java RMI, or something based on it: Jini, CORBA, remote OSGi, etc.
You should redesign your program according server-client architecture: windows service must be a client to gui app and call its methods to pop up proper widow in proper time. If you need callback from gui app to windows service you should also design the last as a client to the gui app.

Do I need to convert my java application to an applet to post it on a webpage?

Is it possible to post a java application on a website without converting it into an applet?
I have worked hard on making a game and I want to share it. My game uses the Light Weight Java Game Library, so it is harder to convert to an applet. It is currently an application and
I would not like to start all over again making it an applet....
If I do need to convert it into an applet, Could I still use most of the code?
You won't require much changes if you deploy it as a Java Web Start.
I'd strongly recommend looking into this table that clearly shows the differences between both Java Applications, Java Applets and Java Web Start Applications.

Looking for some information in getting Java to communicate with a website

I was wondering if one could write a Java application and put it on a website and then have it running so that when a user used your website it could interact with some html/javascript page which would communicate with the Java program.
So basically, the html5 would be used to display the java program but all the logic and everything else would be server side in Java.
I don't want to use a java applet since it requires users getting a security warning and most browsers do not autorun a java application. I just think it would look cleaner and work nicer.
Does anyone know anything about this and could give me a little abstract just to point me in the right direction so I can learn more?
Thanks
It's somewhat difficult to tell from your question but you might find GWT useful. You code everything in Java, and the client-side portion gets compiled into html/javascript which communicates to the server portion with AJAX. http://code.google.com/webtoolkit/
I think you should start by developing a simple Java web app using html, jsp and servlet. Try the Google App Engine for deployment as it is free for hosting.
http://www.servletworld.com/servlet-tutorials/simple-servlet-example.html

Use SWT Browser Widget to Write Desktop Application

I recently played around with the SWT browser widget (which is great). I am wondering if I could write a full desktop application with it (with java services behind - e.g. persistence) and what drawbacks I would have to consider. The advantage would be that people without java knowledge could work on the gui. Of course it depends on the requirements and I know that this is not a very specific question. But mabye someone already tried to build a bigger app this way and is willing to share insights.
Thanks
Marcel
I'm not sure I share your opinion of the SWT browser widget. AFAIK it's merely a shell into the default browser on your machine, merely with a few API access points. I've used it for minor things when I needed to show a web page from within the application. But writing a whole application? That doesn't make sense.
If you want to build a web-based application that runs in the browser against a Java based server framework, there are many AJAXian frameworks to do it. You'd still be doing JavaScript for your client code. And you'd still be dealing with all the complexities of different browsers. I'm not sure why you would want to host it inside an SWT application instead of just directly in the browser window.

Categories

Resources