This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line!
See this thread for details.
Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Ambika Kumar

Greenhorn
+ Follow
since Jan 27, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ambika Kumar

Hai.,

After running this ANT (for RMI), I came across an Error "Build Failed : Java Returned 1"

I can't understand it. Please can anyone help me.

Sourse code:

<project>

<target name="compile">
<javac srcdir="D:\Practise\RMI">
<include name="myRMIClient.java"/>
<include name="myRMIServer.java"/>
</javac>
</target>

<target name="stub" depends="compile">
<rmic classname="myRMIImpl" base="D:\Practise\RMI"/>
</target>

<target name="background" depends="stub">
<exec executable="cmd" spawn="true">
<arg line="/c start rmiregistry" />
</exec>
</target>

<target name="RunServer" depends="background">
<jar destfile="D:\Practise\RMI\myRMIServer.jar"
basedir="D:\Practise\RMI\"
includes="D:\Practise\RMI\myRMIServer.class">
<manifest>
<attribute name="Main-Class" value="myRMIServer"/>
</manifest>
</jar>

<java jar="D:\Practise\RMI\myRMIServer.jar" fork="true" failonerror="true" >
<classpath>
<pathelement location="D:\Practise\RMI\" />
<pathelement path="myRMIImpl_Skel.class, myRMIImpl_Stub.class," />
</classpath>
</java>
<echo message = "Server Running --- Waiting for Client Request " />
</target>

</project>
14 years ago
Hi..
After I compiled all the classes , ie the interface class,implementation, server and client, if I go for 'rmic implementation' class, it says that class not found.
I just started it and I didn't find any solution.

Thanks
14 years ago
Hi.,
I am new to EJB and struggling for 2 days behind it, alljust I done is that I could write a server and client component. But it has got so many compilation errors.
Can anyone help me to get into EJB.

Thank you
hai

How can I implement an EJB in Jboss.
What is the use of javax.ejb of being stored in the classpath.
Why are we making a .jar file for the server and using it for the client to run.

thanks
Hai

In the beanbox, the jar file we created is loaded and it should be displayed in the toolbox of it. But mine is not displaying on the toolbox.
I think that from tht toolbox only, we can load to beanbox and play it.
Please can anyone help me to find why the file is not displayed in the toolbox

Thanks
14 years ago
Hai.,
Can I just started with Java Beans , going through all the articles, all are saying about some manifest file. I don't know anything about it. Can anyone help me to start JavaBeans
14 years ago
Hai...

I have got an error after compiling a simple try... catch program

Code is:

import javax.swing.*;
public class amma1
{
public static void main(String args[])
{
int i,n;
try
{
n=Integer.parseInt(JOptionPane.showInputDialog("Enter no:"));
}
catch(Exception e)
{
System.out.println("Number not entered");
}

String name=JOptionPane.showInputDialog("Enter your name:");

for(i=0;i<n;i++)
{
System.out.println(name);
}
}
}

Error is: variable n might not have been initialized
14 years ago
Hai.,
For about some time I am struggling with JDBC, can someone plzz help me in it. How can I get started with JDBC.
Hai.,

i think you get the solutin from this site. Just go through it .

Site:
http://www.databasejournal.com/features/msaccess/article.php/3330931

Thanks
14 years ago
Hai.,

i think you will get the open source available. Try this if not just mail me I will look for more details.

Site:
http://jazzy.sourceforge.net/

Thanks
14 years ago
Hai..
I have got the following error and unable to trace it. so, can you please help me to find it.

Source Code:


<project>

<target name="clean">
<delete dir="build"/>
</target>

<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="D:\AnT" destdir="build/classes"/>
</target>

<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/Hello.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="Hello"/>
</manifest>
</jar>
</target>

<target name="javadoc">
<mkdir dir="build/javadoc"/>
<javadoc sourcepath="D:\AnT\Hello.java" destdir="build/javadoc" >

</javadoc>
</target>

<target name="run">
<java jar="build/jar/Hello.jar" fork="true"/>
</target>

</project>



Error :

No source files and no packages have been specified.



thanks
14 years ago
I think using ANT you can solve it.
As you know using build file can make use of jar file.

Here is a sample program in ANT. I am just tyring, it is not sure. Anyway try...

Description:

Here I have a file called "Hello.java" and it is inside "D:\AnT".
So change it with your file name and directory path to the specified file.

create a build file using this and

1) type -> ant compile
2) type -> ant jar
3) type -> ant run

or replace all with

ant compile jar run

Code is:


<project>

<target name="clean">
<delete dir="build"/>
</target>

<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="D:\AnT" destdir="build/classes"/>
</target>

<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/Hello.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="Hello"/>
</manifest>
</jar>
</target>


<target name="run">
<java jar="build/jar/Hello.jar" fork="true"/>
</target>

</project>

Note:
I am new to ANT, so please forgive me if any mistake
14 years ago
How can I embed javadoc inside ANT.
[ January 28, 2006: Message edited by: Bear Bibeault ]
14 years ago