Java Sounf Api in Linux

Hi!
I have a question about Java Sound Api on Linux! I have servlet that used JSA. Under Windows OS it working fine, but under Linux i can't record sound and playback it!
Anyone have experience with Sound Java Api on linux???
Sorry for my English!

look at http://www.rxtx.org/

Similar Messages

  • Error in the latest Java comm api for Linux

    installed latest Java comm api for Linux, tried test application for the Sun package:
    $ java SimpleRead
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at SimpleRead.main(SimpleRead.java:67)
    Caused by: java.lang.NullPointerException
    at javax.comm.CommPortIdentifier.findConfFile(CommPortIdentifier.java:199)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:117)
    ... 1 more
    What deis this message mean? How to make you serial port support work?

    and what does this error message mean??
    The package was installed accordingly to "Java(tm) Communications API Linux Installation Instructions":
    $ls /usr/lib/libLinuxSerialParallel.so
    /usr/lib/libLinuxSerialParallel.so
    $env|grep CLASS
    CLASSPATH=<..skipped..>:/opt/commapi/jar/comm.jar:/opt/commapi/jar/commtest.jar
    $ ls /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
    /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
    What else does it need?

  • Java comm api in 64-bit Linux

    I apologise if this is off-topic. I can't find a suitable forum, I tried posting in the Java plugin forum, but no luck there. I would appreciate any ideas to find a solution.
    I am trying to use the java comm api to read and write to the serial port but I am getting the following error:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError: /usr/lib64/libLinuxSerialParallel.so: Can't load IA 32-bit .so on a AMD 64-bit platform
    I am using openSUSE 10.2 (X86-64) which uses Linux 2.6.18.2-34-default x86_64.
    I tried Switching to a 32-bit version of java (1.4.2) from within Eclipse and I always run Eclipse in 32-bit java (/usr/share/eclipse/eclipse -vm /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java) but I still get this error.
    Is there anything I can do to get the java comm api working on a 64-bit system?
    Is the java comm api still being developed and maintained? It does not look like it is?
    I've done some searching on the web and I find there is an open source version of the java comm api called RXTX but the website at http://www.rxtx.org/ is not very readable. I don't think I know enough to install this on my system.
    I would appreciate any ideas to get this working.
    Thanks,
    Martin

    I'm stuck again so I would appreciate some more help.
    I've managed to install the Sun 1.6 JDK and configure
    and make rxtx.Any small amount of progress is still progress. :)
    >
    But it still does not work, I get the following error
    when I run the SerialDemo:<snip>
    >
    It seems to be com.sun.comm which is not finding its
    native binary not rxtx! No, it's finding the shared library, unless there are a few more lines at the start of your error message that look like this:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError:
    no LinuxSerialParallel in java.library.pathIt's not finding the function it is looking for in that library.
    This is what confuses me, the
    instructions say install the Solaris version of comm
    api (http://www.rxtx.org/ how-to said Solaris Sparc
    and the rxtx INSTALL file said Solaris x86 so I tried
    both in turn and neither worked) Same here after downloading the latest stuff to my x86 Linux box. I received a similar UnsatisfiedLinkError. I checked the shared libraries and the functions were not in it.
    normally these would
    call the Solaris binary drivers but I assume this has
    to be redirected to rxtx which calls its own
    binaries?Yes. There is a part of RXTX called JCL (Java Comm for Linux) that handles that.
    http://www.geeksville.com/~kevinh/linuxcomm.html
    However, I think the problem is that Sun's API has changed since the RXTX How-To was written. Try downloading the 'comm.jar' at the bottom of the page. It says:
    comm.jar, 2.0.3, generic, English (3rd party backward compatibility, only), EnglishUnzip it and copy the comm.jar file to the 'jre/lib/ext' folder of the JDK/JVM where everything else RXTX created was placed.
    After doing this the SerialDemo app started for me without errors.
    Jim S.

  • Running an Executable from a JAVA API in LINUX

    Hi,
    I want to run a C++ executable from my JAVA API in Linux. This is the sample of the code which i
    have used
    String[] arguments = new String[5] ;
    arguments[0] = "/usr/local/code/fun/dcmdump";
    arguments[1] = "+f";
    arguments[2] = "/usr/local/code/fun/240.dcm";
    arguments[3] = "+W";
    arguments[4] = "/usr/local/code/fun";
    Process p = Runtime.getRuntime().exec(arguments);
    On running the test file, the program seems to hang there. dcmdump is the name of my c++ executable and arguments [1] - [4] are its inputs. dcmdump should accepts these inputs and dump the contents of the file 240.dcm into the path mentioned by the last argument.
    But my program jst hangs. Is the the correct way to go about??
    Any suggestions or ideas r welcome!!
    Please let me know
    Thanks
    Dhaval

    Hi
    I did the following
    String[] cmd ={"/bin/sh","-c","/usr/local/code/fun/dcmdump","+f","/usr/local/code/fun/240.dcm","+W","/usr/local/code/fun"};
    Process p = Runtime.getRuntime().exec(cmd);
    When i execute my application, i see the following output
    [root@voltaire fun]# java TestRead2
    $dcmtk: dcmdump v3.5.3 2004-05-27 $
    dcmdump: Dump DICOM file and data set
    usage: dcmdump [options] dcmfile-in...
    parameters:
    dcmfile-in DICOM input filename to be dumped
    general options:
    I try to write the arguments in the command line when i execute but still get the same output.
    I dont think dcmdump is receving any arguements..
    Executing /bin/sh does it mean you have to mention the arguements in the command in the same manner that i have the String[] cmd??
    PLease let me know..
    Also i have put a Buffered reader to capture the output of dcmdump but I dont think i have reached my application has reached thr as yet. The code i have written is
    // put a BufferedReader on the output
    InputStream inputstream = p.getInputStream();
    InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
    BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
    // read the output
    String line;
    while ((line = bufferedreader.readLine()) != null) {
    System.out.println(line);
    Please let me know your suggestions/ideas.
    thanks

  • Setting Up a Java Web Server on Linux

    Greetings,
    After a lot of reading, I've decided to learn Java server-side technologies (I already know Java (desktop)
    but with little experience) in order to develop my database driven dynamic website projects.
    However, I'm completed lost between the hundreds of acronyms related to Java and the "thousands" of technologies involved.
    Google hadn't help me understand what they really are and how they relate with each other.
    Even though is easy to find what they stand for and some faqs/descriptions, it hasn't been enought to clear my mind.
    I want my webserver application to do, among other things, the following:
    Retrieve Data from a database, do generate dynamic html files.
    Story Data on the database, from html forms.
    Send automaticly emails for multiple users. (newsletter for example)
    E-Commerce.
    Html graber/parser (I don't know if this is the right word, I mean a program that for example, goes to a URL with an html
    table, and stores that information in a database table, as long as the format didn't change).
    Real Time Chat feature.
    Database connection pooling, caching, and other important optimizations.
    I'm not asking for how to develop or configure this features nor what components and programs, must be installed.
    At the moment, I only want to know how to set up a Java solution that will support them when they are needed.
    *** Linux ***
    I want to set up my webserver on a linux distribution.
    In that respect, I don't know if I should choose RedHat or Fedora Core.
    I've heard that fedora is better for a webserver (having in mind that Red Hat Enterprise AS/ES aren't free).
    But I've read in several sun turorials/webpages references to RedHat (on a J2EE context).
    So I'm wondering if is better to go for Fedora or RedHat. Are there pros & cons? They equally support Java?
    *** Technologies ***
    Then in starts the acronyms problem.
    What do I need to install, in what order, for what?
    Some aconyms and technologies, I have read about but don't fully understand are the following:
    Apache
    J2EE
    J2EE 1.4 SDK
    SUN Java System Application Server Platform Edition 8
    J2SE 1.4.2 SDK
    SUN Java Enterprise System
    Tomcat
    Struts
    Cocoon
    JBoss
    I already know J2EE is only a specification. What implements that specification? Sun Java System Application Server?
    J2SE SDK? or Tomcat?
    What is the role of each technology, namely Apache, Tomcat, Sun Application Server?
    What is the Sun Java Enterprise System?
    How do Struts, Cocoon, JBoss relate to Java?
    Which of these technologies are mutually exclusive (analogous)?
    *** Doubts ***
    Then, I have some doubts that are keeping me from starting to study seriously the important techonologies, because I don't
    want to lose lot's of time and effort learning them to after a dillusion start everything again with PHP (the language
    which make me think and read a lot before going for Java). To keep this from happening, I would like to know the following:
    I want to use Java for developing websites with commercial/profitable use for my company, in some throught e-commerce,
    and in other by banners. I want to do everything by the book, with required licenses.
    ------ Java is Free?
    Is Java Completely Free or it might be possible that at a certain point, when I need some component or library,
    multi-machine webserver, performance or security for high-traffic I will see "buy now" instead of "download now"?
    For what they may "ask for money"? and what are the disavantages if I can't buy?
    For example, "Java System Application Server Standard Edition 8.1 2005Q1" and
    "Java System Application Server Enterprise Edition 8.1 2005Q1" cost $2.000 and $10.000 respectively. That is money.
    (http://www.sun.com/software/products/appsrvr/index.xml). What are the disavantages if stick to the free edition?
    Features like (from sun site)
    Standard Edition:
    Extends the capabilities of the Platform Edition to provide secure, remote, multi-instance, multi-machine management.
    It is aimed at high-volume applications and Web services.
    Enterprise Edition:
    Further extends the capabilities of the Standard Edition to provide continuous availablity for applications and
    Web services. It is aimed at business critical, high value applications and Web services.
    Suppose I achive lots of traffic and I keep the free platform edition.
    I won't be able to have a multi-machine webserver set up correctly?
    What are the drawbacks? How big are the performance penalties?
    ------ Technologies Availability
    Finnaly, I have the idea (I don't know if it's accurate) that there are Sun versions and Open-Source Free versions
    of doing or supporting the same Java related thing.
    Despite the way I choose to set up a Java webserver, I will always have all J2EE techonolies like:
    Java API for XML-Based RPC (JAX-RPC), JavaServer Pages, Java Servlets, Enterprise JavaBeans components,
    J2EE Connector Architecture, J2EE Management Model, J2EE Deployment API, Java Management Extensions (JMX),
    J2EE Authorization Contract for Containers, Java API for XML Registries (JAXR), Java Message Service (JMS),
    Java Naming and Directory Interface (JNDI), Java Transaction API (JTA), CORBA, and JDBC data access API.
    I really appreciate some help. I could learn the basics of all this "stuff" before asking. But the point why I'm asking
    is precisely not starting to learn something I may won't use. Obviously, I will have to make a lot of reading during maybe
    months before writing the first line of code of my projects, but being certain that it will fit my needs.
    I will be very thankful if you can enlightme in my fedora/redhat, setup, free/cost and technologies avaibility issues.
    Thanks Beforehand,
    Pedro Vaz

    Apache is a free Web-server.
    Tomcat is a servlet (and JSP) container. It can be stand-alone or can be used together with a Web server (like Apache).
    J2EE's scope is much wider than the servlet stuff, but a standalone Tomcat is a good starting point to servlets and JSP.
    One of our "real-world" applications is run by a standalone Tomcat using POI and Velocity. I did not regret this architectural decision.

  • About Java Communication API for Windows

    hi
    I'm studying Serial Communication in university.
    I'd like to know the reason why we can't downlaod Java Communication API for Windows.
    I confirmed Comm for Linux and Soralis, but I can't find Comm for Win.
    Please tell me the reason if someone know.

    For no particular reason Sun stopped supporting the windows version
    of that package. I use rxtx which happens to allow for much faster
    communication too.
    The interface is identical to Sun's version, just the package differs: "gnu.io".
    kind regards,
    Jos

  • Communication API for Linux

    I want to develop an application in Java for Linux that uses serial port .
    But java.sun.com provides communications API for Windows, Solaris but not Linux ! ! !
    Where can I find free java api to drive a serial port easily ???
    Thanks a lot

    I think you can do this using the version for Solaris/SPARC along with RXTX for Linux (do a search on google), also I think IBM did a JavaCOMM api for linux.

  • Communication API and Linux

    But... exists an implementation of Communication API for linux?

    But... exists an implementation of Communication API
    for linux?http://www.google.com/search?q=javacomm+for+linux
    First hit:
    Java Comm Serial API How-To for Linux
    http://wass.homelinux.net/howtos/Comm_How-To.shtml
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Any one knows if java print api can drive kitchen or bar printers

    Any one has experience about java on control kitchen or bar printers?
    I am developping a program used by POS. I need to control those printers which located
    in kitchen, cashier places. I want to print order info to kitchen, and print check to customers.
    I am not sure if java print api can easily control those printers.
    any can have experience on it?

    Not an elegant solution, but it works.
    (When I wrote this program I had 3 problems:
    1. I didnt know the java printing system
    2. I can't install the POSprinter under linux and windows
    3. I didnt have time
    so I printed directly to the port)
    boolean isLinux=true;
    File ifile = new File ("/dev/lp0");
    if (!ifile.canWrite()) { // Windows
    ifile = new File ("blokk.txt");
    isLinux=false;}
    try {
    FileWriter fw = new FileWriter(ifile);
    fw.write(".....\r\n");
    fw.write(".....\r\n");
    fw.close();
    } catch (Exception ex) { ex.printStackTrace();}
    if (!isLinux) {
    try {Runtime.getRuntime().exec("blokkprint.bat");}catch (Exception ex) { ex.printStackTrace();}}
    /* blokkprint.bat contains: copy blokk.txt lpt1*/

  • Problem with java communication api for gsm modem port

    Hi,every body
        Am using gsm modem in my project previously my linux is 32bit with 32 bit jvm of sun that time there was no problem at the time of working with gsm modem port .But now am using 64bit linux then 32bit files are not supporting to communicate with gsm modem port .How can i get java communication api for unix 64bit ,64bit jvm of sun.please any body help me ...i am searching in sun/oracle also for downloading java communication files of 64bit jvm but i didn't get the link... i need bellow java communication api files.
           ex:1)libLinuxSerialParallel.so
                2)javax.comm.properties
                3)comm.jar
                4)commtest.jar

    Moderator Action:
    This duplicate cross-post is locked.
    Stay with your original post.
    https://forums.oracle.com/thread/2602063
    (... and your hijack reply to a third thread has been removed.)

  • Java mail api - sending mails to gmail account

    Hello
    I am using java mail api to send mails.when i send mails to gmail from ids which are not in gmail friends list, most of the mails are going to spam.Ofcourse, some of them go to inbox.I tried in lot of ways to analyse the problem.But nothing could help. Can anyone plzz tell me how to avoid mails going to spam in gmail, using java mail api?
    Thank you in advance,
    Regards,
    Aradhana
    Message was edited by:
    Aradhana

    am using the below code.
    Properties props = System.getProperties();
    //          Setup mail server
              props.put("mail.smtp.host", smtpHost);
              props.put("mail.smtp.port","25");
              props.put("mail.smtp.auth", isAuth);
         Authenticator auth = new UserAuthenticator();
    //          Get session
              Session s = Session.getDefaultInstance(props,auth);
    //          Define message
              Message m = new MimeMessage(s);
    //          setting message attributes
              try {
                   m.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
                   InternetAddress f_addr=new InternetAddress(from);
                   f_addr.setPersonal(personalName);
                   m.setFrom(f_addr);               
                   m.setSubject(subject);
                   m.setSentDate(new Date());
                   m.setContent(msg,"text/plain");
                   m.saveChanges();
    //               send message
                   Transport.send(m);
    Message was edited by:
    Aradhana

  • Performance issue with Business Objects Java JRC API in CRXI R2 version

    A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
    While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
    exportControl.processHttpRequest(request, response, context, null)
    We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
    Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
    In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
    Any suggestion, hint in this matter is very much appreciated.

    Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
    But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
    As per the crj 12 samples codes, the code is written as shown below.
    1. Created ReportClient Document
    2. SetReportAppServer
    3. Open the report
    4. Getting DatabaseController and switching the database connection at runtime
    5. Then setting the parameters as detailed below
    ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    parameterFieldController.setCurrentValue("", "paramname",paramvalue);
    parameterFieldController.setCurrentValue("", "paramname",paramavalue);
    byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF); 
    6. Streaming the report to the browser
    Why the parematers are not being passed to the report?  Do I need to follow the order of setting these parameters?  Did I miss any line of code for setting Params using  crj 12?
    Any help in this regard would be greatly appreciated.

  • How can i access gmail's smtp server using java mail api

    i m using java mail api to access gmails pop and smtp service to receive and send mail from ur gmail account. I m able to access gmails pop server using the ssl and port 995 , but i can not use its smtp server to which i m connecting using ssl on 465 port. It requires authentication code.
    if anybody can help me in this regard i m thnkful to him/her.
    thnks in advance.
    jogin desai

    Here's an example of using SSL + Authentication
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=ssl+authentication&subCat=siteforumid%3Ajava43&site=dev&dftab=siteforumid%3Ajava43&chooseCat=javaall&col=developer-forums

  • How to print a document in reverse order using Java Print API ?

    I need to print a document in reverse order using Java Print API (*Reverse Order Printing*)
    Does Java Print API supports reverse order printing ?
    Thnks.,

    deepak_c3 wrote:
    Thanks for the info.,
    where should the page number n-1-i be returned ?
    Which method implementation of Pageable interface should return the page number ?w.r.t. your first question: don't return that number but return page n-1-i when page i is requested; your document will be printed in reverse order. Your class should implement the entire interface and wrap the original Pageable. (for that number n your class can consult the wrapped interface; read the API for the Pageable interface).
    kind regards,
    Jos

  • Error while sending mail when using Java Mail API

    Hi Experts,
    I am trying to execute a webdynpro application which uses the Java Mail API to send emails. The exception that I get on executing the application is :
    Sending failed;  nested exception is: javax.mail.SendFailedException: Invalid Addresses;  nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
    Can anybody please help me sort out the issue.
    Regards
    Abdullah

    Hi,
    Usually one get this error if the SMTP server is configured not to relay mails (a security measure) or the SMTP server need the mail to be sent from a trusted IP or with proper authentication. Some SMTP servers are configured to block junk mails.
    Pls check with your  mail server administrator.
    Regards

Maybe you are looking for

  • Java Script and flash

    i have a SWF but not the FLA that goes with it. how does this file work? Well i pass in a string and it outputs some text to speach. i know this works as i can pass a normal flashvar in named text and the speach updates. but what i need to do is be a

  • Distorting photos when uploaded

    In iPhoto, I use an external editor (Pixelmator) to edit my photos. When I crop photos and then save the original document it goes into iPhoto. But then, when I upload, and I've tried with Facebook + Flickr, it is completely stretched / distorted. I

  • Webdynpro java and EJB integration

    Hi, I am new to Webdynpro Java, would require your help in the following area: my requirement is I need to read values from oracle database using EJB/Java Beans and display the same using webdynpro JAVA(as user interface). Pls suggest the possible so

  • Email notification on user comments

    Is there a way to get an email when someone comments on a photo or a blog entry? Thanks! Rudi

  • Crash on importing mpegs

    SAaving as AVI an importing into organizer is working well. Saving as mpeg and importing into library crashes PE8. Any help? I feel like I'm fighting an uphill battle with this program rather than enjoying it like I'm supposed to.