Processing web requests in Java desktop application through tor network? - java

I write Java desktop applications sometimes and sometimes I would like for my web requests to be processed through the tor network.
How can I go about configuring this properly in Windows and/or Linux?

Have a look at the netlib library to push all your JVM traffic through TOR.

I think you have to using Web Service technology. Web Service is independent technology and by it can connect several application with different technology together. For example you can develop server with .Net platform and develop client with Java,Php,Python or others (or vice versa). Web Service in java has JADX-RPC(older) and JAX-WS standards.

Related

How to access a WCF service hosted in Windows service from Java client?

I need to share a reporting module developed in .Net and Crystal reports with Java apps to avoid redeveloping it. Can I use a WCF service hosted in Windows service to share the same with Java apps? I don't want to use IIS server if possible. How can I implement this?

what is the role of apache server in java swing application (3 tier)?

I have made a Java Swing application, in the GUI the user can select the type of element and choose a date then the element's informations will be shown on a JTable.i used easyPHP to create the DB.
so what is the role of apache server in this case!
can i consider it like an application server ?
A Java swing application (AFAIK out of the box, for alternatives see below) is not available over HTTP/S (and is therefore not classified as a web application) and Apache is a web server (with features such as proxy, TLS terminator etc.). Therefore there would be no need for a web server such as Apache to front your Swing application.
Apache web server is not an application server for a Swing application per se. Although it can run applications in different programming languages such as php through loading of modules. It however does not run Java web applications.
An application server in a Java perspective would be Tomcat, Glassfish, JBoss, WebLogic etc. An application server hosts an application and could provide a set of services such as Naming, HTTP processing and so on.
Perhaps you are referring to Apache Tomcat instead of Apache Web Server. If so, you would be right on the mark as that is an application server for Java web applications.
If you would like to make your application available through HTTP and enjoy the myriad and expansive benefits of an application server, I would recommend you to rethink on using Swing and utilize a technology built over Java Servlets such as JSPs, Spring MVC and so on.
If you would still like to make the Swing application available through a web server (through HTTP/S) there are some solutions out there but I have not tried any of those. Please do a search on "Swing available on HTTP" in that case. I have also provided a link as well.
You can read up on Application Servers on this wiki link.
You can read up on an HTTP end point for a Swing application here.
This Apache is not used in your application. You installed easyPHP so Apache comes with that to provide PHP programming environment.
Moreover Apache is a web server. So any web based application can be deploy here. PHP is a web programming language sot it requires Apache or any other web server.
But your application is standalone developed with JAVA SWING. So you can stop Apache server and check everything is running fine or not.

Host a web-service from within a Swing application

I have to set up a desktop Java client that will communicate with a .NET desktop application. The .NET application exposes its services through a webserver of its own. Rather than have my Java app frequently poll it for data changes, it was suggested that the .NET app contact my Java desktop app via a webservice or similar technique. I am not familiar with web services, but as I understand you would need some sort of web app container such as Tomcat to host it.
Is there a way to set up a listening socket in my app as a webservice end point without effectively rewriting a webserver from scratch?
Alternately, are there other or better ways for a .NET desktop application to talk to a Java Swing desktop application?
If you are using JRE 6 then you can use the Endpoint.publish() method to create an in-app server and expose a service.
Refer the simple tutorial in the link to see an example of the same.
How the Endpoint.publish() works is it internally creates a light weight server and makes the SOAP service available on that location.

Alternatives to browser for Java EE applications?

My client wants a Java EE application server but doesn't want to access it using a web browser. They don't want to have the "web page" look but rather something like a stand-alone client.
I don't really know how to do it or even what to google.
I was considering defining a Swing client reacting to web services but I don't really know if this is the best way to do it.
I don't want something like RIA.
I guess my question is "how to build a Java EE client outside a web browser?"
GlassFish allows for having a thick "application client" started with Java WebStart which has easy access to the various things like EJBs inside the server while running on the client.
This might be what your client wants?
http://netbeans.org/kb/docs/javaee/entappclient.html
http://java.sun.com/developer/technicalArticles/J2EE/jws-glassfish/part2.html
I've found the Glassfish 3.1 server very easy to work with as a deployment platform on both Windows and Linux.
This is not so unusual. Define your service interface and expose as EJB's. Create your client (GUI) via Swing, Eclipse RCP (http://wiki.eclipse.org/index.php/Rich_Client_Platform), or other RCP technology. Your client(s), possibly running on multiple workstations, will communicate with centralized services via the EJB client interface.
See http://java.sun.com/developer/technicalArticles/J2EE/appclient/

Co-Host Ruby on Rails and another web application

I have a rest web service based on Rails.I have another 3rd party website that will be built on either java or .Net. I wanted both the applications i.e. my rails web service and the third party web application that is built on java or .Net to share the database.So we are planning to host both the applications on the same server.Is this possible and what are the hosting providers that have this option?
I do not think you will find an option for a shared host on which you can do both natively, but you could easily do both on almost any VPS or cloud hosting option.
The other reasonable option I think would be to find a Java Servlet host (Tomcat host) and run your Rails application under JRuby. There is pretty good support for this option and it is fairly mature (I could not say the same of IronRuby).
Both applications run on Windows, so should run on the same server.
So either look for hosting providers that support both applications or get a Virtual Private Server (VPS) and install the software yourself.

Categories

Resources