• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using dll in java

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to insert a dll in java which contains several methods
dll and it is even a source code ?


i want to use lame-3.99.5 TO encode MP3 ??
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Few questions:

1) If you want to encode mp3 using lame, then why do you need a Java program?
2) Even if you write a Java program, why do you want to call functions from dll? You can directly call lame executable from Java.

Yes, you can use JNI APIs and call functions from dll in Java code, but then, it will lose its platform independence which is unnecessary. In my opinion, use JNI only when you really need to. The task you want to achieve can be simply done by a small script (bat or shell etc.)
 
aroua rourou
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MP3 encoding is part of my program in java, i want to convert wave file to mp3 file
puique but I am beginner in java I did not know how to call lame executable from Java
I also thought of using JNI API but here I am blocked here
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a “beginning” topic. Moving.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This article summarizes what you need to do to run an external process. Try to read it, possibly use the provided examples as a template and adapt it to your needs. If you get stuck, let us know, somebody here should be able to help.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic