Converting a class file to a dll
Hai please help me..
I am trying to convert my .class file to a .dll file.
This is my java code:
public class DateFunctions {
public int getTimeInSeconds(int i){
return i;
public int addNumbers(int i, int j) {
return (i+j);
public static void main(String[] args) {
DateFunctions df=new DateFunctions();
df.getTimeInSeconds(
Created class file DateFunctions.class.
Created jar DateFunctions.jar using:
jar cvf DateFunctions.jar DateFunctions.class
Generated dll file using bimp tool like this (Visual J# .NET tool):
jbimp DateFunctions.jar /t:library
I got the file: DateFunctions.dll
Now loaded this dll into my code (say, TSL code in WinRunner) using load_dll("DateFunctions.dll");
When I try to access the method like:
j=getTimeInSeconds(int i);
I am getting the error RPC error.
Note: DLL is loading fine. but while accessing the functions I am getting the RPC error..
What could be the reason..?
Please help...?
Thanks,
Satish
Your answer lies in the documentation for WinRunner and whatever else is calling the DLL.
Certainly Java JNI has requirements for DLLs called from Java: They have to be C++ bindings that use the native header that Java generates, right?
So now you need to look at the requirements for your WinRunner and make sure that the program translating your .class file to a DLL does it in a such a way that the bindings WinRunner expects are indeed there.
But none of that has anything to do with Java. If your Java class compiles and tests successfully, then your questions about Java are satisfied. You have to figure out what WinRunner needs and what's missing from what you supplied.
%
Similar Messages
-
Converting Java class file to .dll
Dear all,
Is there any way to convert a Java class file to a .dll file?
(Background being that there is a software that only allows callouts to DLLs and the method I have developed is in Java so need to convert it to a .dll)
Any insight/advice/pointers are most appreciated.
Thanks much,
DavidHi there,
Yes you can convert a Java Class to DLL file using Microsoft Visual J#.NET (Installation required Visual Studio.NET) you can download it from the microsoft site.
www.microsoft.com/downloads
then go for search below in combo box(Visual J#.NET). After installation open new project select class library. write your java code(not fully supported j2se). build your application. All the Java Code is embeded in dll. Found at e.g. C:/JavaToDll/bin/debug/JavaToDll.dll This is a way to convert Java Code to a dll. frankly speaking i do not like .NET (copy of Java Technology must be baned completely).
Thanks
Please correct if i am wrong.
Yahya Kamran (Software Engineer) -
How to convert java class file version without decompiling
Hi,
Oracle R12.1.3 i am having illegal access error while try to access the class file version Java 1.3 uses major version 47,So how to convert the class file version without using decompiling.
Current java version is 1.6.0_07
Is there any tool or API for converting class file version?
Thanks,
Selvapandian TBeside this I wonder where you get your error from since AFAIK 12c comes with java 1.6.
Well wonder no more!
OP isn't using Oracle 12c database.
They are using Oracle R12.1.3 - which is the E- Business Suite. -
How to convert a .class file?!!
sorry guys,
but I've a question in knowing the code of some file,
I've zipped file, when I unzip it, it contains an html page with a .class files
(passing parameters to applet)
my problem is that I want to know the code of the .java file (which is not included)
but the program is working well, coz I have the .class file,
so, can I convert this .class file into a java file, so its java code could be readable (to understand it)
thanks in Advance :)sorry man, but Can't u send me a specific link for downloading this "Java decomplier"
coz I found my self in something called (jad decompiler) with lots of versions and this is confusing
and Is that mean, that there's a decompiler which can convert the .class file into .java one?
and thanks alot man.....u help me always!
(I'm still begginner in java) -
How to Convert a .class file into exe
I need to convert a .class file to exe...
If abybody know ...plz infrom me briefly....
Thanx a lotI do not know.
I come from china.
[email protected]
Is that suppose to be a racial joke?From his other post, I'm thinking he's actually serious. At first I thought it was just a troll, but even that email address looks correct (sina.com is a popular service in China and I don't expect an average troll to do 'research' like that). -
How to convert a .class file into .java file without .jad using DeJDecompil
Hi all,
I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
If I get the .java file without error then I can process the rest of the functionality.
Thanks in advance
With kind Regs
Satheesh.KNot so urgent today then!
http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
I'm still not going to help you to steal someone�s code. -
How to convert a class file to exe file and how to cteate a class file to d
how to convert a class file to exe file
Hi Bhaskarq,
Hi,
It is not at all possible.
But it is a really worst method.
Please go through it.
This is a very common question asked in the comp.lang.java newsgroup. Its often useful to have an
executable application when deploying your
applications to a specific platform, but remember to
make your .class files available for users running
Unix/Macintosh/other platforms.
Microsoft provide a free system development kit (SDK),
for Java, which includes the jexegen tool. This
will convert class files into a .EXE form. The only
disadvantage is that users need a Microsoft Java
Virtual Machine (JVM) installed. If your target
platform is Win32, you can either redistribute the
virtual
machine, or raise the level of your system
requirements, to include Windows 98, or Windows 95
with
Internet Explorer 4. Systems matching these
requirements will already have a copy of the Microsoft
Java Virtual Machine installed.
Note : You must specify all of the class files your
application needs (except for standard java packges)
as a parameter, so if you have third party libraries,
you'll need to include them as well. You can use wildcards * though, and you don't need the original source code.
Also please see this Forum which will give a good idea
http://forum.java.sun.com/thread.jsp?forum=31&thread=149733
I hope this will help you.
Thanks
Bakrudeen
Technical Support Engineer
Sun MicroSystems Inc, India -
How can I convert a class file to Exe file
hai
How can I convert a class file to Exe filePlease search the forums before asking questions - this has been answered hundreds (really!) of times.
-
How to convert java .class file to .dll file
hi,
I got a problem, I have to convert my java .class file to .dll file. Microsoft VC++ program will invoke the converted .dll file.
Is there any other possibility.
I was confused.
Cam any body help me. If you are having solution for the can you send to my [email protected] account.
thanks,No, it is not possible to do what you are suggesting. Yes, you could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through unless your class is VERY complex. Otherwise, you might want to just create and maintain two implementations.
-
Hi Everybody,
I want to convert back a .class file (a compiled servlet) into .java (source code) file. How do I do it???
Note using javap has not been of any help.
Thanks in Advance
RajibWhy don't you look at this thread:
http://forums.java.sun.com/thread.jsp?forum=31&thread=143500
If thats not enough, try searching all the forums for:
"convert .java .class" That'll give yu a bunch of other threads...
Sjur -
I wish to convert my Matlab files into .dll's so that I can use them in LabVIEW. I am using 'mcc' and 'mbuild' of Matlab to convert my .m files into .c and .dll.
When I try to run the .dll's in LabVIEW, I get an error message in a modal window stating some required .dll or procedure is not found.
How should I resolve this issue. Should I add any other Matlab .dll's in course of making my .dll?
Please help in solving this issue... Thankyou very much.KJV wrote in message news:<[email protected]>...
> When I run the matlab generated dll, it is stating 'matllb.dll not
> found'. Is it that I should set the path for matlab\bin to include
> all the dll's before I compile? When I make dll from C, it works fine
> in LabVIEW. The problem is from .m to .dll. The problem also arises
> when I convert my .m to .exe. The same error of 'matllb.dll not
> found' comes over. Should I change my matlab compiler options or
> something else? Please help me?
I have the same question,I don't know how to use the matlab DLL file in labview,
I hope someone can descripe the procedure in detail. -
Converting a .class file to a .jar file
Can you please suggest as how can I convert a .class
(dot class) file into an executable .jar (dot jar)
file and how I can execute that .jar file.use jar tool named JavaJar..
may down from http://www.pivotonic.com -
Convert a .class file to an exe file and execute it
Hi, would like to get some help about converting a java .class file to and executable file and to execute the file. Do anyone know how to remove the command prompt while executing the file too? Hope to get some experts to help me up. thanks a lot.
I'm not an expert, but you might try using gcj for this:
http://www.gnu.org/software/gcc/java/
Why not give it a try. -
How .java file converted into .class file
Hi,
Please tell me the process which is happening behind when actually we complile a java programm.
How it is called by class loader.and then what happenThe compiler lexes and parses the Java source, probably creates an AST, optimizes it, generates byte code, writes byte code to file. For details on compilation, get a book on compilers (Aho, Sethi, Ullman "Compilers: Principles, Techniques and Tools", aka The Dragon Book, is the classic, though there are more modern ones.)
For class loading, google for java class loader. Here are some basics:
http://java.sun.com/j2se/1.3/docs/api/java/lang/ClassLoader.html
http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html
http://www.developer.com/java/other/article.php/888911 -
Hi all, I am new in java card development.
This is my environment setting:
@echo off
set JC_HOME=C:\JavaCard\java_card_kit-2_2
set JAVA_HOME=C:\j2sdk14103
set PATH=.;%JC_HOME%\bin;%PATH%
I have created the Wallet applet according to 'Zhiqun Chen" text book and named it WalletApp.java.
I have compiled this file to a class file.
This is where is I saved my file
C:\JavaCard\java_card_kit-2_2\samples\src\com\sun\javacard\samples\WalletApp\WalletApp.java.
But I don't really understand how to convert the class file.
May I know what is this for?
-out EXP JCA CAP
-exportpath
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1
com.sun.javacard.samples.HelloWorld.HelloWorld
com.sun.javacard.samples.HelloWorld
0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
must save this in what file?
I tried to type in the command line below (and the result):
C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sap
les\Wallet\Wallet.opt
error: file scr\com\sun\javacard\saples\Wallet\Wallet.opt could not be found
Usage: converter <options> package_name package_aid major_version.minor_ver
sion
OR
converter -config <filename>
use file for all options and parameters to converter
Where options include:
-classdir <the root directory of the class hierarchy>
set the root directory where the Converter
will look for classes
-i support the 32-bit integer type
-exportpath <list of directories>
list the root directories where the Converter
will look for export files
-exportmap use the token mapping from the pre-defined export
file of the package being converted. The converter
will look for the export file in the exportpath
-applet <AID class_name>
set the applet AID and the class that defines the
install method for the applet
-d <the root directory for output>
-out [CAP] [EXP] [JCA]
tell the Converter to output the CAP file,
and/or the JCA file, and/or the export file
-V, -version print the Converter version string
-v, -verbose enable verbose output
-help print out this message
-nowarn instruct the Converter to not report warning messages
-mask indicate this package is for mask, so restrictions on
native methods are relaxed
-debug enable generation of debugging information
-nobanner suppress all standard output messages
-noverify turn off verification. Verification is default
*********************************************************May I know What is the correct command line to convert the class file and what must I do to before converting the class file?
I saw some article saying we must use JDK1.3, is it a must?
Your solution is highly appreciated.
Thank you!Hi Ricardo,
I saved the file below as WalletApp.opt in the directory of scr\com\sun\javacard\samples\WalletApp
-out EXP JCA CAP
-exportpath c:\javacard\java_card_kit-2_2\api_export_files
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2:0x1 WalletApp.WalletApp
WalletApp 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2 1.0
But I still have the problem below:
C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sam
ples\WalletApp\WalletApp.opt
error: file scr\com\sun\javacard\samples\WalletApp\WalletApp.opt could not be fo
und
Usage: converter <options> package_name package_aid major_version.minor_ver
sion
OR
converter -config <filename>
May I know What's wrong with my command or file?
Where can I download JDK because what I can find is J2SDK.
Thank you!
Maybe you are looking for
-
How to write a condition in BEX Query Designer
Hi How can i write a condition in Query Designer Scenario An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date. My requirment Count all the policies(valid) by employee on a ranges basis except
-
Adobe Download Assistant not installing
I'm trying to download the CS6 trials on a MacbookPro running Mountain Lion; however on opening the AdobeDownloadAssistant.dmg it will load, then give me an error message with the following: "Sorry, an error has occurred. The application could not be
-
Settings NOT saved for the iPod, because- not found
I've a lot of regular changes to make when updating my music library on my iPod. But when I'm in the middle of doing so - that is using TAB "Music" (which "Sync Music" enabled) - and checking all relevant playlists, an error appears: "The settings we
-
I know there's tons of talk on this topic but I want to see if I can narrow it down to my specific needs. I'm debating between the high end 13" rMBP (standard config) vs high end 15" (i7' 16gb, 512gb, 750m) My primary use will be web design and heavy
-
I'm trying to input phone numbers starting with 0 into Numbers Spreadsheets. It keeps deleting the 0. any clues anyone?