Jyothsna Sri Y

Ranch Hand
+ Follow
since Sep 25, 2003
Merit badge: grant badges
For More
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 Jyothsna Sri Y

Hello Everybody

I am using JMF to play audio of an mp3 file but failing to do so...

can somebody help... when I am compiling and running the same .java file on windows platform it's working...
but it's not working on Linux platform. It is giving the folowing exception when run on Red Hat Linux 9.0

but Linux was able to play the same mp3 file using media players that exists on it.

Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 12000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@186768e
Error: Unable to realize com.sun.media.PlaybackEngine@186768e

This is the javacode that I am using...

import javax.media.*;
import java.io.*;

public class audio
{
Player p;

public audio()
{
try
{
File f = new File("./1.mp3");
p = Manager.createPlayer(f.toURL());
p.start();
}
catch(Exception e)
{
System.out.println("Error in constructor : "+e);
}
}
public static void main(String argv[])
{
audio a = new audio();
}
};

Regards
Jyothsna
19 years ago
Hello everyone

I want to write a log on the server side using an applet. Is this possible.. please guide

Cheers
19 years ago
Hi Eric

I still didn't get it. I tried out both of your suggestions.

I really appreciate your help.

Cheers
Ram
Hi Friends,

Is this possible at all...

Having html Frames inside applets. I have a plugin for IE. This plugin displays molecules(chemical) on the IE. Now I want to capture mouse events using either applets or javascript

<HTML>
<HEAD>
<TITLE> COMFERT </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--

function processClicks() {
alert("Hello World!");
}

if (window.Event) // for Navigator 4.0x
document.captureEvents(Event.MOUSEUP);
document.onmouseup = processClicks;

// -->
</SCRIPT>

</HEAD>

<BODY >
<center>
<embed valign = "top" src = "pdb/1AVX.pdb" bgcolor = "black" border = 2 FRANK = true width = '750' border = '2' slab off height = '390' name = 'first' startspin='true' spinx='5' spiny='5' spin = 'true' script = 'select all;wireframe on;'>
</embed>
</center>
</BODY>
</HTML>

When I use this script I get the dialog whenever I click out of the height and the width specified within embed tags. But I want to capture the event when I click on the molecule also.. please help
19 years ago
Hello People,

Well I have a plug-in which can display a molecule in IE now I want to capture mouse click events on this plugin. I tried to use javascript for this but failed to capture the event. This is the code that I used

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> COMFERT </TITLE>
<META NAME="Generator" CONTENT="Edit Plus">
<META NAME="Author" CONTENT="Ram Sateesh Talari">
<META NAME="Keywords" CONTENT="COMFERT;">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--

function processClicks() {
alert("Hello World!");
}

if (window.Event) // for Navigator 4.0x
document.captureEvents(Event.MOUSEUP);
document.onmouseup = processClicks;

// -->
</SCRIPT>

</HEAD>

<BODY >
<center>
<img src = 'comfert.jpg'>
<embed valign = "top" src = "pdb/1AVX.pdb" bgcolor = "black" border = 2 FRANK = true width = '750' border = '2' slab off height = '390' name = 'first' startspin='true' spinx='5' spiny='5' spin = 'true' script = 'select all;wireframe on;'>
</embed>
<br><br><br>
<a href = login.html>Enter</a>
</center>
</BODY>
</HTML>

Where 1AVX.pdb is a molecule file on the server.

please help
Hello Everyone,

I am trying to retrive images that were stored in Oracle database in a Long raw column using Java, but I failed to do so.. can somebody please tell me what's wrong with my code??

=======================================================================
Connection conn = null;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(ClassNotFoundException e)
{
System.out.println("Driver Exception : " + e);
}
try
{
String url = "jdbc racle:thin:@"+ipAddress+":"+port+":"+SID;
conn = DriverManager.getConnection(url,UNAME,PASSWD);
query = "select BLOB_SEGMENT from GA_BLOB where BLOB_PERSON_ID = '"+ivjJTextField1.getText()+"'";
stmt.close();
stmt = conn.createStatement();
rset = stmt.executeQuery(query);
if(rset.next())
{
InputStream is = rset.getBinaryStream(1);
FileOutputStream fos = new FileOutputStream("candidate.jpg");
int i;
while((i=is.read())!=-1)
fos.write(i);
fos.close();
ImageIcon icon = new ImageIcon("candidate.jpg");
ivjJLabel2.setIcon(icon);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this,"Error Collecting Image");
}

=======================================================================

What's wrong with my code??
Hello Everyone,
I need some help regarding the display of fonts of languages other than English. I wish to display Hindi and Telugu fonts on Labels and text fields using Java Swing.
Can some one tell me how to go about it? I have the required ttf files, which work on Windows.
This a bit urgent!!!
Thanks.
Jyothsna.
20 years ago
Hi Everyone...
Can someone tell me how to display Text of other languages(other than English) on the Labels and TextFields...
This is urgent please Help
regards
Jyothsna
20 years ago
Hi everyone,
I'm creating a frame on the fly from another frame. I need to close it on hitting the submit button. At all other times till the submit button id displayed and hit, it has to remain open. So I have mentioned :
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
i'm not able to change this option in the actionperformed methos for the submit button.
The frame invoking this frame should not close. So i cannot use System.exit. It has to remain running in the background.
Can someone give me a solution?
Thanks
Regards
Jyothsna.
20 years ago
Hiii
I have a java program, which needs to be called in regular intervals, like say about every half an hour. It has to contact the database and if any un processed rows exist, it has to collect them a definite number at a time and process.
The program should be checked if it is currently running and if it is not, it has to be invoked.
Please reply asap.
Thanks
Regards
Jyothsna
Hi,
Can someone tell me how to play 16-bit stereo audio files using Java Media Framework. It is said that JDK1.2 supports 16-bit stereo sound format but when I try to play it is giving Exceptions:
Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@a4488
Error: Unable to realize com.sun.media.PlaybackEngine@a4488
Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@1d32e45
Error: Unable to realize com.sun.media.PlaybackEngine@1d32e45.
This is on linux. The files are of mp3 format. I've tried with wav file format too. These files are playing fine on Windows.
Can someone help out asap.....
Thanks
Jyothsna.
20 years ago
Hi Everyone,
I've written some code in java Swing and uses Java Media Framework. This works fine on Windows. It has compiled with no errors on exceptions on linux but when I try to execute it, it gives an Exception in thread "main" java.lang.NoClassDefFoundError.
Can someone tell me where the problem lies?
Thanks
Jyothsna.
20 years ago
Hi everyone,
I've written a piece of code which uses swing and Java Media Framework. it works fine on Windows. But it's giving errors on linux. I've installed j2sdk1.4.2 and JMF2.1 on linux 9.0. But javac is not able to locate javax.swing and is unable to import the package javax.media.
Can some one tell me what's wrong?
Thanks.
Regards
Jyothsna.
20 years ago
Hi
Well I am sending the code along with this message... the two functions put an image into my database and get an image from my database respectively...
I am getting no Exceptions when I run the program.. but I am not getting the output also...
I tried to check the lenght of the Blob object.. it's giving me 0 as it's length...
Can u please check out where my code is going wrong....
/////////////////code here////////////////////
public void write(String desc) throws Exception
{
if (con == null) connect();
con.setAutoCommit(false);
CallableStatement stmt=con.prepareCall(sqlOut);
stmt.setString(1,desc);
stmt.registerOutParameter(2,java.sql.Types.BLOB);
stmt.executeUpdate();
BLOB blob=(BLOB) stmt.getBlob(2);
OutputStream orastrm=blob.getBinaryOutputStream();
BufferedInputStream filebuf=new BufferedInputStream(new
FileInputStream(desc+".jpg"));
int i;
while((i=filebuf.read())!=-1)
{
orastrm.write(i);
}
orastrm.flush();
con.commit();
stmt.close();
filebuf.close();
orastrm.close();
disconnect();
}
public void read(String desc)
{
if (con == null) connect();
PreparedStatement stmt=con.prepareStatement(sqlIn);
stmt.setString(1,desc);

ResultSet rs=stmt.executeQuery();
rs.next();
Blob picBlob=rs.getBlob(1);
byte[] picBuf = picBlob.getBytes(1,(int) picBlob.length());
stmt.close();
disconnect();
}
Hi,
Thanks a lot Mr.Pruett. It has worked...
cheers
Jyothsna.
20 years ago