kimi2121

Hey all!
I want to make an application that contains a .jar file included. And that jar to be loaded Big Smile... how can i do that Big Smile
How can i include it to put into the exe and then when u run the exe load the jar inside it Big Smile


Re: Visual C# General Include .jar file in .exe and load the .jar file (C#)

OmegaMan

One can embed any file as an embedded resource in an .net executable by bringing the item into the project and changing its build action to be embedded. (Found off of the properties of the file in the Solutions Explorer of Visual Studio). Once running one reflects off of the exe and extracts the item into memory. Here is an article to get you started: How to embed and access resources by using Visual C#





Re: Visual C# General Include .jar file in .exe and load the .jar file (C#)

kimi2121

mhh that helped a bit... but i need to know how to run it from memory.. also if u can tell me how can i "read" the java console once i run the .jar file Big Smile




Re: Visual C# General Include .jar file in .exe and load the .jar file (C#)

OmegaMan

You won't be able to run it from memory...remember that .Net is designed to be a managed language, hence no running a java process in a .net thread. If you need interactions between disparite applications, then you need to look into other ways of doing it.





Re: Visual C# General Include .jar file in .exe and load the .jar file (C#)

kimi2121

mhh.. ok understand that...
i have two questions related to this:

1) If i run it sepparate... how can i get the console from the java i mean i have a .bat file that runs the java and i see the console...whaty returns the runnig jar.

2) do you know any other language that i can what i want Big Smile maybe a link where to ask for help Smile... thanks




Re: Visual C# General Include .jar file in .exe and load the .jar file (C#)

OmegaMan

You will want to use the System.Diagnotics class Process to run an external application. From that class you can monitor what is written to the console by the external application. I give an example of running notepad from a c# console application on my blog entitled, How to Launch an External Application in C#.