How to run Java RMI projects in Netbeans 7.0? - java

I am facing trouble to develop a RMI application in Netbeans 7.0. Is there anyway to start registry , create stubs and complete a simple project in netbeans? A simple description will work.

Have a look at this RMI tutorial, it'll show you how to work with RMI without having to create stubs.

Stub creation is not needed in recent versions of java, but there is an <rmic> ant task that you can add to your build.xml file. The registry can be started programatically, with LocateRegistry.createRegistry(port)

Related

Is it possible to run automatically a Java application on WebSphere Application Server?

I'm developing a Java application that is running on WebSphere Application Server 6.1. By now, I've installed a .war file in the server and I'm calling the methods from a jsp file and they're working fine. The questions is: is there any way to develop an application that automatically starts when I press the "start" button of the application after installing it on WAS, avoinding to call the methods "manually" from a jsp? In simple words, a common J2SE application with a main() method exported as a .jar file installed on WAS should start and call the main() method automatically?
I've tried to install an exported Hello World J2SE application but it seems that the .jar is not well formed and apparently it must be a Java EE application.
I'm very new to WAS and Java EE. I really appreciate any help.
A Java EE server is not supposed to run Java SE programs that have a main() method.
Take a look at the Java EE 6 Tutorial, especially the overview of what a Java EE Containers does.
If you use NetBeans as your IDE, you can follow the good tutorials at their site.
Yes this is possible but not directly. You'll have to pack you application as a resource adapter. Also you'll have to hook in the application server for things like creating threads. Check out the IronJacamar documentation.
Finally I did it through a Servlet. When the application starts up, the method init() is called and within this method I do all my stuff.

Can we debug Java programs with no main method?

We have a vast Documentum application which I have deployed in Tomcat. The code is being maintained and compiled in Eclipse IDE.
It is very hard to track where and what data is going through which code, I have a decompiler plugin to help with this task, but it does not work with most of my code as the classes are without a main method. These classes cannot be decompiled by the plugin.
Is there any method to overcome this? So that I can see the flow of data from JSP to backend class to repository, and vise versa.
Sure. You can either connect to tomcat using remote debugging (see here) or run tomcat into eclipse itself. You need appropriate plug-in for this but typically standard eclipse distributions for server side development already have one. Open Servers view, create new server, follow the wizard and you will be done in a minute.
JPDA is a java standard tool.
It is designed for use by debuggers in any environment on any java application.
For details you can look at
http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html
http://www.ibm.com/developerworks/library/os-ecbug/
The 1st link gives a detailed view with screen shots of remote debugging using eclipse.

how to integrate a Plug-in Project template into an existing eclipse project?

I have already developped a Java project using Eclipse.
Now I would like to integrate an help system to allow the user to open a guide.
Browsing other questions i found this tutorial to set up Eclipse environment in order to use the Eclipse Help System. Anyway, this tutorial and all documentation I found since now, only explain how to use this system creating a new plugin project.
But what about if I want simply add the help system to an existing Java Project created in Eclipse IDE?
Which step should I follow to update my project configuration?
Is it possible to integrate Eclipse Help system, without using eclipse?
No, the help system you point to is an eclipse plugin based system, useful with RCP programs. See http://wiki.eclipse.org/RCP It will only run in the context of an RCP application.
You might be able to write an RCP app that contains only help, launch it, and communicate with it through http from your java app, but it's not a simple integration ... and you still have to build your help documents so that org.eclipse.ui.help can see them.

How to create webService using NetBeans IDE?

I am very much new to java.I need to create simple web service using NetBeans IDE. How to create it?
Depends on what kind of Web Service it is and what version of Netbeans you use. You can follow the Netbeans (6.9) documentation here http://netbeans.org/features/web/web-services.html

how to configure Flex with Java

I want to configure flex with Java.I have to create the project in which flex UI and JAVA serverside code.can any one tell me how to configure flex with Java using eclipse editor.
thanks in advance...............
Check Flex Builder (plugin and standalone) from Adobe.
http://www.adobe.com/products/flex/
Its comes as Standalone Eclipse based IDE or you can download Eclipse plugin.
You can also find good tutorials (also video tutorials) for same on same link.

Categories