Why is the J# Redistributable package needed?
Hi!
Why is the J# Redistributable Package needed to run a J# application? Or can I just redistribute some assemblies?
For example, if I develop an application in Borland Delphi using WinForms, I can compile this application to an exe file. This exe file can be executed on any computer that has the .Net Runtime Framework installed. No Delphi .Net Redistributable Package exists.
If I develop an application in Dephi using the VCL.NET api all I have to do is to redistribute the VCL.NET assembly. That's easy. No problem here.
So the fact is that it is possible to develop a new language for .Net (Object Pascal) and don't require some special installation packages. And it makes sense since the exe file is language independent IL code.
Why is J# so special? Or is it?
/Fredrik
Hi!
This is due to the fact that J# Runtime support is not installed when we install .NET Framework.
When we install .NET Framework, it doesnt contain support for running J# IL code, however it does contain support for running other .NET Languages like C#, VB.NET etc
Hence as we need to have .NET Framework to run languages like C#, VB. NET etc, we need to install J# redist so that .NET framework can now understand J# IL code as well.
Hence, think of J# redist as something, which builds J# Language support into .NET Framework. Obviously this involves copies some assemblies and other standard setup stuff, which is precisely what constitues J# executable.
Also once client machine installs J# redist, every J# application will work on the client machine without installing J# redist again. So, you dont need to worry about J# installation everytime.
Thanks,
Varun
Varun Gupta wrote: |
When we install .NET Framework, it doesnt contain support for running J# IL code, however it does contain support for running other .NET Languages like C#, VB.NET etc Hence as we need to have .NET Framework to run languages like C#, VB. NET etc, we need to install J# redist so that .NET framework can now understand J# IL code as well.
|
|
I don't understand that. When developing .Net applications with Borland Delphi I don't need to install a "Borland Delphi .Net Runtime Package". It does not exists a package like that. And here is the interesting part: The .Net Framework does
not contain support for Borland Delphi. There is no need for that because the Delphi compiler produces pure IL code. All I have to do is to redistruibute some assemblies if I use some class library like the VCL.NET. But only
if I use it. If I develop a Delphi .Net application with WinForms I don't have to redistribute anything.
Varun Gupta wrote: |
Hence, think of J# redist as something, which builds J# Language support into .NET Framework. Obviously this involves copies some assemblies and other standard setup stuff, which is precisely what constitues J# executable. |
|
What "other standard setup stuff"? I can accept that the install process must copy some assemblies but those assemblies could I redistrubute myself.
I'm starting to think that the J# applications isn't pure IL code.
/Fredrik
Hi Fredrik,
J# executable is 100 % percent IL code. You have to have J# Redist installed on your machine to Run J# exe because when you compile a J# application, J# compiler internally refers few J# specific assemblies which are installed only if J# redist is installed on the system. For example vjscore.dll and vjslib.dll are always refered by a J# exe even though we never specify them as a referenced dll to the compiler.
If you open a J# exe in ildasm and open Manifest then you can clearly see following two entries..
.assembly extern vjscor
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 2:0:0:0
}
.assembly extern vjslib
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 2:0:0:0
}
So if these two assemblies are not there then obviously exe cant be run on the system. Running a J# exe without having redist installed is more or less similar to running a c# exe without having .net framework installed on the machine.
Now why do we have this special case with J# only, why not with C# and VB or any other .net language?
The reason is that to make J# java compliant. we have our own class libraries and java.lang.* namespace. While compiling the J# application compiler has to resolve the references to System.* or java.lang.*. Thats why j# redist and .net framework both are must to run J# exe.
Hope this answers your query. Please let us know if still you have any doubt.
Thanks alot !!!
Thanks for your answer!
I just have one more question: Is it possible to run a J# application on a system with the main .Net Framework installed but not the J# Runtime Package installed but I redistribute vjscore.dll and vjslib.dll with my application?
Once again, thanks for your answer.
/Fredrik
Fredrik Sk?nberg wrote: |
I just have one more question: Is it possible to run a J# application on a system with the main .Net Framework installed but not the J# Runtime Package installed but I redistribute vjscore.dll and vjslib.dll with my application? |
|
I tried it myself. I did a simple "Hello World" J# console application and added vjscor.dll, vjslib.dll and vjsnativ.dll to the same directory as the exe-file and the application started.
Is this safe to do? Is it legal? This is much simplier than demand all customers to install the J# Runtime Package.
/Fredrik
J# is indeed pure IL code, otherwise it wont run on CLR:)
*Lets try to run J# application on a machine which has ONLY .NET Framework*
1) Lets try to run executable of following program
[lets call the executable as Test.exe]
class A{
public static void main(){
System.out.println("Hello World");
}
}
2) We include Test.exe, vjslib.dll and vjsnativ.dll in the same directory.
3) Run Test.exe
4) Output: Hello World
Cool ! it works !
Just incase you use attributes like protected or com calls in your program, just include vjscor.dll and vjslibcw.dll.
Anyways, while u try to run your app without appropriate dlls, it would crash and tell you which dll is missing -:)
Flip side - If 20 vendors distribute these dlls with their app, then customer computer will have multiple copies of same dlls, needless wastage of space-:(
Cheers,
Varun
Jaiprakash Sharma wrote: |
|
I know it's freely available but our installation process are already very complicated for our customers (they are not very good with computers). We already have some more installations that are required before they could install our applications and one more install (J#) is one to many.
Varun Gupta wrote: |
Flip side - If 20 vendors distribute these dlls with their app, then customer computer will have multiple copies of same dlls, needless wastage of space-:( |
|
Yes, that's not good. The best thing would be that Microsoft wrote some instructions how to develop a own installation that installs these dll:s in a correct way so they only get installed if they has to be installed. (Se my other post why I only want to have just one install.)
Hi Fredrik,
I tried to enquire that can a user redistribute few of the J# redist assemblies with his/her product and is that legal? Here are my findings...
This scenario might work, but note that we do not test such a scenario, and we do not certify that it will work if the user redists only a few of the J# assemblies.
Also our EULA does not permit him/her to redist our assemblies in a piece-meal fashion.
Bottomline: We do not support this scenario.Thanks.
Jaiprakash Sharma wrote: |
Hi Fredrik, I tried to enquire that can a user redistribute few of the J# redist assemblies with his/her product and is that legal? Here are my findings...
|
|
Thanks for your answer.
/Fredrik