Results 1 to 7 of 7
Thread: Convert jar to dll
- 01-09-2012, 09:32 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Convert jar to dll
Hi, i post this message for ask just a little question. For those who don't know(I'm presented in the special section) I'm a producer of video games and I working with Java and C# in a program named Unity 3D. what I wonder is i need convert jar class to dll. I try to convert it by ikvm, and i try to follow
documentation but i get only errors. Can you show me how can i doing about the step.(sorry for my eng)
Thanks in advance :D
-
Re: Convert jar to dll
Your best bet is to use JNI or JNA to allow Java to communicate with a dll (if this is necessary).
- 01-09-2012, 10:31 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Re: Convert jar to dll
can you be more detailed pls? thx a lot :)
- 01-09-2012, 10:41 PM #4
Re: Convert jar to dll
Can you describe the functionality that the code in the jar file provides?
A jar file is is a container of .class files and other resources much the same as a zip file. The java command knows how to retrieve class files from jar files when it needs them for execution.
To execute a class file requires a JVM.
-
Re: Convert jar to dll
Actually, I was going to ask you the same. I assume that you want your jar to be in a dll to allow it communicate more easily with a C# program (but I'm just guessing since you don't say). Java Jars are not easily "put into a dll". Much easier would be to allow communication via sockets, or failing that creating a C bridge program and use JNI or JNA (easy to look up) to allow the C program to interact directly with Java.
- 01-10-2012, 10:39 AM #6
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Re: Convert jar to dll
I want to create a speech recognition app, and i want move the code of main class in new function(inside java), then(after converting the file in dll and import in c# prjct) call that function from c# code
this is the code hello world to edit
what do you think? it's possible?(obviusly i don't have change yet)
Java Code:package edu.cmu.sphinx.demo.helloworld; import edu.cmu.sphinx.frontend.util.Microphone; import edu.cmu.sphinx.recognizer.Recognizer; import edu.cmu.sphinx.result.Result; import edu.cmu.sphinx.util.props.ConfigurationManager; /** * A simple HelloWorld demo showing a simple speech application built using Sphinx-4. This application uses the Sphinx-4 * endpointer, which automatically segments incoming audio into utterances and silences. */ public class HelloWorld { public static String whatTalk; public static Boolean isRecognize = false; public static void main(String[] args) { ConfigurationManager cm; if (args.length > 0) { cm = new ConfigurationManager(args[0]); } else { cm = new ConfigurationManager(HelloWorld.class.getResource("helloworld.config.xml")); } Recognizer recognizer = (Recognizer) cm.lookup("recognizer"); recognizer.allocate(); // start the microphone or exit if the programm if this is not possible Microphone microphone = (Microphone) cm.lookup("microphone"); if (!microphone.startRecording()) { System.out.println("Cannot start microphone."); recognizer.deallocate(); System.exit(1); } System.out.println("Say: (fire ball | hello | hi | good bye | bye)"); // loop the recognition until the programm exits. while (true) { System.out.println("Start speaking. Press Ctrl-C to quit.\n"); Result result = recognizer.recognize(); if (result != null) { String resultText = result.getBestFinalResultNoFiller(); whatTalk = resultText; //assign what i've talking at string var isRecognize = true; //tells the C # code that I'm talking System.out.println("You said: " + resultText + '\n'); isRecognize = false; //end of tell } else { System.out.println("I can't hear what you said.\n"); } } } }
- 01-13-2012, 02:47 AM #7
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
IP convert
By vannam28071988 in forum NetworkingReplies: 1Last Post: 09-23-2011, 08:08 PM -
cannot convert from int to int[][]
By besweeet in forum New To JavaReplies: 9Last Post: 04-18-2010, 03:36 AM -
Convert to Int
By 6kyAngel in forum Java TipReplies: 0Last Post: 03-06-2009, 09:18 AM -
how to convert xml to xsd
By adi in forum XMLReplies: 2Last Post: 02-12-2009, 02:43 PM -
need the help to convert to and from UTF-8 and UCS-2
By sachin_n in forum Advanced JavaReplies: 1Last Post: 01-05-2009, 09:35 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks