How to convert java class to dll file for using in Microsoft Technology(.n)

hey hemmj !!!!!!
nice replying , first of all i d like to say thanks for response me so frequently..... i like such type of guy... i d never forget ur online support.
hey buddy, i ve a problem with applet application...
i m working on java chat server build on swing applet. As it is chat server, it is divided into two parts, one is server application and other is client application. I want to run this server app on the client server and the basic thing with this site is that it is running on .net platform(Microsoft). and the other app ll running on the client machine or end user. Now the problem is that this site would run only if the server app ll be run on server. This server app ll open the socket of server, which ll listen the request of the user...... So, the requirement is to convert this java sever class file into dll file and register this dll file with the IIS server.So, It run and stop with the IIS server.
I ve already search the way to convert the java class file into dll file. This is possible in such way........... below code is for the java class file...
import java.net.*;
import java.io.*;
import java.util.*;
public class chatServer
public static void main(String args[]) throws Exception
                    ServerSocket sersoc=new ServerSocket(1234);// Any port number above 1000 should do
// as most ports below 1000 are used by system
Vector socvec=new Vector();
String data="";int i,j=0;
BufferedReader in;
//System.out.println("Listening of port " + sersoc.getLocalPort());
//System.out.println("Waiting for connections...");
while(true)
Socket soc=sersoc.accept();
socvec.addElement(soc);
chatServerReadThread csrt=new chatServerReadThread(socvec, soc);
in=new BufferedReader(new InputStreamReader(soc.getInputStream()));
PrintStream out=new PrintStream(soc.getOutputStream());
out.println("Connected to chat server");
out.flush();
data= in.readLine();
for(i=0;i<socvec.size();i++)
soc=(Socket)socvec.elementAt(i);
out=new PrintStream(soc.getOutputStream());
out.println(data + " connected");
out.flush();
//System.out.println(data + " connected");
csrt.start(); // error is comming from here..... plz help me.
class chatServerReadThread extends Thread
Vector socvec;
PrintStream out;
chatServerReadThread(Vector socvec, Socket soc)
this.socvec=socvec;
try
out=new PrintStream(soc.getOutputStream());
}catch(Exception e){}
public void run()
try
String data;
Socket soc;
BufferedReader in;
while(true)
for(int i=0;i<socvec.size();i++)
soc=(Socket)socvec.elementAt(i);
in=new BufferedReader(new InputStreamReader(soc.getInputStream()));
if(in.ready())
try
data=in.readLine();
if(data.charAt(0) == ']')
data = in.readLine() + " exited";
//System.out.println(data);
socvec.removeElement(soc);
for(int e=0;e<socvec.size();e++)
soc=(Socket)socvec.elementAt(e);
out=new PrintStream(soc.getOutputStream());
out.println(data);
out.flush();
else
for(int e=0;e<socvec.size();e++)
soc=(Socket)socvec.elementAt(e);
out=new PrintStream(soc.getOutputStream());
out.println(data);
out.flush();
}catch(Exception e){socvec.removeElement(soc);}
}catch(Exception e){e.printStackTrace();}
first i ve made the jar file of this class
jar cvf chatServer.jar chatServer.classafter getting the jar chatServer.jar. I ve opened the .net dos prompt and
type this command which ll make dll file automatically....
> jbimp /t:library chatServer.jar
And you'll see the following output:
Microsoft (R) Java-language bytecode to MSIL converter version 1.1.4322.0
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corp 2000-2002. All rights reserved.
Created chatServer.dll
I cant get the problem origin from where it is comming, when i tried to convert it into .dll file it shown an error that, it did not recongnized the method in first class
public static void chatServerReadThread.start() method
is not recognized by .net dos prompt commnad. But when i omit this method it gets created the .dll file. This start method is basically the default method of thread class that run the thread from the same class..
By vewing the code u can visulize the thing,, i ve marked the code from where the error is comming.
Plz do it as soon as possible, i ll waiting for ur reply......
I ll be really thanking u for that....
Thanx and regards
Niraj Kumar Singh

I wonder if this will work:
jbimp /t:exe chatServer.jar
Your chatServer is an application that can be started from the commandline.
A dll is a library to be used in com, com+, other executables or ....

Similar Messages

  • How to convert iDVD theme to .mov file. for use in FCP?

    I would like to use the Baby Mobile iDVD theme as a clip in a movie to be created on FCP. I dropped my pics in the iDVD project with the Baby Mobile theme and put in a green background so I could later key out the background and replace it with a different background. I deleted the title and added a short movie to the menu. Because I don't want to use the theme as a DVD menu, I made the menu button the same color as the green background.
    I then burned the DVD. Next I ripped the DVD using MactheRipper to give me the Video TS folder. I then used Handbrake to convert the VOB files to Mpeg4. Unfortunately, Handbrake only converted the 10 second movie I put in iDVD and not the Baby Mobile iDVD theme.
    Any ideas out there to help me use the iDVD menu theme as a standalone clip in a movie?
    I did find the source material of the theme in the Mobile.pox folder; it contains the 2 .mov files with alpha channels but I would rather not go through the time consuming process of keying in the movements and size of my pics to match the Mobile. It would take too much time and I don't know how successful it would be.
    Any help would be greatly appreciated!
    Thanks.

    Options:
    -If you have FCS2, you can use Motion to track the points, thus saving you lots of keyframing time in FCP.
    -You can use MPEG Streamclip to rip the DVD (I believe it can find the menu files)
    -You can get a screen capture program such as Snapz X Pro to screen capture it.
    -As it encodes the media in iDVD's burning process, you can find where it stores the temporary copy of the MPEG2 that it creates, and snag that file before it finishes the burn and deletes it.
    NOTE: I've never tried option 4, nor do I know if it will work. I just came up with it.

  • How do I export v-card formatted files for use with either Numbers or Excel?

    How do I export v-card formatted files for use with either Numbers or Excel?

    Did you open Automator and just look around?
    Actions are listed in the left pane.
    You drag them into the workflow on the right in the order you need to process the items that you want.
    If this is a on-off requirement, just make a Workflow. If you plan to use it often, make it an Application.
    If you want to select the contacts you want to export, use a get Selected action. You'd then select the contacts in Contacts App before running the workflow.
    I'm not on a Mac to take screenshots, so you'll have to look at Automator's help or google for more info.

  • 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 T

    Beside 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 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.

  • Problem with servicegen and how to convert java classes to webservices

    I am a beginner and am trying to convert all my java code into webservices,I have
    a java class Test.java and number of other third party libraries and my own java
    files that are reffered in Test.java. I want to expose the public methods in Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalid class received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface, non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party class file also?I
    just need the public methods in Test.java exposed and Test.java will just use
    the third party library.
    also,is there a way to tell servicegen to include all these java files X,Y,Z to
    the war file/ear files but expose only the public methods of X in the WSDL.
    Please help
    thanks
    Suresh

    Hi Bruce,
    Thanks very much for the insight u provided.Yes one of my public methods was returning
    a element factory.
    But let me ask my question this way:
    Is there a way to tell servicegen to take only the specified public methods in
    a class to make them as webservices?
    by default servicegen is taking all the public methods..,i workaround i found
    is to deploy the webservice manually by writing the web-services.xml to include
    only the required public methods.
    thanks
    Suresh
    Bruce Stephens <[email protected]> wrote:
    Hi Suresh,
    Does your Test.java have a public method that returns the element
    factory of an XML document, like "public ElementFactory
    getElementFactory ();" or such?
    If so, you may want to check out the supported build-in and non-built-in
    data types:
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1060696
    Concerning your last question, you can use the excludeEJBs, includeEJBs
    (in combination with the ejbJar attribute) to specify which non-built-in
    data type components should be generated. Or if you use the
    javaClassComponents then simply use a comma separated list of class
    names.
    Hope this helps,
    Bruce
    suresh wrote:
    I am a beginner and am trying to convert all my java code into webservices,Ihave
    a java class Test.java and number of other third party libraries andmy own java
    files that are reffered in Test.java. I want to expose the public methodsin Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalidclass received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface,non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party classfile also?I
    just need the public methods in Test.java exposed and Test.java willjust use
    the third party library.
    also,is there a way to tell servicegen to include all these java filesX,Y,Z to
    the war file/ear files but expose only the public methods of X in theWSDL.
    Please help
    thanks
    Suresh

  • Convert Java into a dll file

    is it possible to make portions of java program into a dll file so that other program can consume it?

    dll which stands for Dynamic Link Library, is specific to windows and dos I believe, and so attempting to make a change like the one you request will break the ability of a program to work on mult OSs. There are several exe conversion utilities out there, but I haven't seen a dll conversion one, but then again, I haven't been looking.
    Perhaps the best answer is not to directly answer your specific question, but try to answer your problem. I assume that you want Java talking to a C or C++ program or other similar program that can compile to dll form. If so, have you considered looking into using the JNI library? This is one of several solutions that will allow you to do just this. Again, using it usually breaks your program's ability to be interoperable on multiple OSs.
    Good luck.

  • I have the CS5 disk but am not sure how to convert it to a digital file for my new Mac OS 10.9 desktop which has no disk drive??!! Thanks

    Please help with converting my CS5 disk to download onto my new MAC OS X10.9 desktop

    You can download CS5 from this site
    Download CS5 products

  • How to convert number datatype to raw datatype for use in data warehouse?

    I am picking up the work of another grad student who assembled the initial data for a data warehouse, mapped out a dimensional dw and then created then initial fact and dimension tables. I am using oracle enterprise 11gR2. The student was new to oracle and used datatypes of NUMBER (without a length - defaulting to number(38) for dimension keys. The dw has 1 fact table and about 20 dimension tables at this point.
    Before refining the dw further, I have to translate all these dimension tables and convert all columns of Number and Number(n) (where n=1-38) to raw datatype with a length. The goal is to compact the size of the dw database significantly. With only a few exceptions every number column is a dimension key or attribute.
    The entire dw db is now sitting in a datapump dmp file. this has to be imported to the db instance and then somehow converted so all occurrences of a number datatype into raw datatypes. BTW, there are other datatypes present such as varchar2 and date.
    I discovered that datapump cannot convert number to raw in an import or export, so the instance tables once loaded using impdp will be the starting point.
    I found there is a utl_raw package delivered with oracle to facilitate using the raw datatype. This has a numbertoraw function. Never used it and am unsure how to incorporate this in the table conversions. I also hope to use OWB capabilities at some point but I have never used it and only know that it has a lot of analytical capabilities. As a preliminary step I have done partial imports and determined the max length of every number column so I can alter the present schema number columns tp be an apporpriate max length for each column in each table.
    Right now I am not sure what the next step is. Any suggestions for the data conversion steps would be appreciated.

    Hi there,
    The post about "Convert Numbers" might help in your case. You might also interested in "Anydata cast" or transformations.
    Thanks,

  • How do I export Premier Pro CS6 files for use with Final Cut Pro?

    In my cloud version of CS-6, I am trying to export or convert my finished work and take to my
    co-editor that uses Final Cut Pro. In "export" on my PrP file, I have the option to export as FCP "with notes."
    When I do that, and look at the notes, they basically say "Clip one did not export - Clip two did not..."
    I saw a tutorial on the web where they had the option to convert the file in Encoder from PrP file to FCP, but
    it is not an option on my Encoder in the cloud. When I try to encode the files as .mov, they are tiny, and don't
    look good.
    Any ideas?
    Thanks!

    You can take the project file and the source files to FCP by exporting it as an FCP XML. Other than that you may have to export the whole project as a quicktime mov or any other editable your co-editors use.

  • How to convert a mesh to an object for use with pathfinder?

    (I tried searching for this problem, but all that came up were a lot of posts about crash reports.)
    My problem is that I've taken over a document where a lot of objects have mesh fills. I need to take these objects and convert them to black and white, and they need to be compound paths (ie have holes in them where there used to be color). But whenever I choose two objects, where one has a mesh fill, I can't use the pathfinder. I also can't expand the object with the mesh.
    I've tried looking in the help files and search the web, but not found anything so far. Does anyone have the solution?
    Why doesn't the pathfinder simply discard the mesh in the first place if it can't work with it? I could always undo if it's not the result I expected.

    I am not sure I understand any of this bu you can in CS 5 give the mesh point colors an opacity of 0% since transparency is now supported in gradient mesh.
    Or if you need a shaped whole in the gradient mesh then you can simply make a non clipped non inverted opacity mask.
    Here you have a combination of the opacity set to zero for one of the mesh points and a shape used as an opacity mask.

  • 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,
    David

    Hi 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 do I share an iMovie file for use on 1st or 2nd generation Apple TV

    How do I share an finished imovie file for use on 1st or 2nd generation apple TV?

    I shared my finished movie in I Tunes but it doesnt show up on my Gen 1 apple tv or my gen 2 Apple TV. The sharing process indicates that the movie is compatable with gen 3 Apple TV.
    Carl

  • Creating a DLL Driver for Use in VB

    Hi,
    I am trying to export a dll file for use in VB.  I used the build > dll option within my project to create a dll, but when I try to add the reference to Visual Studio, it says that it is not a valid assembly or COM component and I cannot add it.  Is there a setting I should set in the build settings to ensure this works?
    Thanks,
    Billy Maier

    You aren't creating a .NET assembly or COM component so you are calling it incorrectly.

  • Thiz iz Urgent..........How to convert a .class file to a .java file

    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
    Rajib

    Why 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

Maybe you are looking for

  • To hide Services for Object in Purchase Order screen

    Dear Experts, Is it possible for me to control Services for object to a group of user only in ECC 6.0 ? or How to hide the icon for unauthorized users ? Thanks in advance. Moktar

  • My iTunes store won't open on my PC ever since the iOS7 update

    My iTunes store no longer opens automatically when I plug in my iPhone. I updated my phone recently to an iPhone 4s with iOS7. I tried to download iTunes on my PC again but it won't open at all. What can I do to retrieve it?

  • HFM APP error when loading security file

    <p><font size="2" color="black">Good Day,</font></p><p> </p><p><font size="2" color="black">I am getting this error whenloading security file in HFM APP.</font></p><p> </p><p><font size="2" color="black">User not found with identity=native://DN=cn=0a

  • My macbook pro right fan might be broken?

    My computer is having problems with overheating and when it does it freezes. I installed fan control and increased the the RPM. It helped a bit. But it still crashes sometimes. I think it is because my right fan is broken because when i check fan con

  • Changing Password With Os Install disk

    I bought my macbook on ebay a couple of months ago and I need to install a wireless printer but it won't let me with out the 'Ipadmin name and password'...which i guess it not my userid and password that i use to sign on because it is not working. so