File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can Java run standalone / Can just load dlls ?

 
Tomer Gal
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
New to this forum and this is my first post.
I Got 2 questions.

- Can a Java application run standalone ?
I mean can it be converted to an .exe file for running.
I'm planning to write a commercial application and because I assume lots of newbies wont know how to run java files and wont like to mess with it thats why I'm investigating if such an application could be converted to a .exe.

- Can a Java application use .dll files ?
If the answer is yes then how...

Thanks in advanced guys
[ December 18, 2004: Message edited by: The Matrix ]
 
Honour Cook
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For your first question, the answer is YES. Please refer to this url to get more information.

http://uk.builder.com/programming/java/0,39026606,20283101,00.htm
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, The.

Using the search link, I found that this question has been asked about 150 times or so. That's probably why it can be found 15. How do I make an .exe of my Java program? in the FAQ.

What do you have in mind when you ask about using dlls?

Please adjust your display name, The Matrix, to meet the JavaRanch Naming Policy.
You can change it here.

Thanks!
[ December 19, 2004: Message edited by: Marilyn de Queiroz ]
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JNI a java program call the methods in a dll.
[ December 19, 2004: Message edited by: srini vasan ]
 
Tomer Gal
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help guys, I Think I'm gonna like this place
And updated my profile with the name, have a good day all
 
Rajith Vidanaarachchi
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tormer,
For your first question the answer is YES. You can do this using J2exe. You can download it in the internet.(There is a tutorial too)To find it search in google.
Bye
 
Ryan Parker
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's what I would do:

Option 1 (Easy)
Make a jar and a .bat file with a customized ICO icon to look like .exe app and include commands to load it.
e.g:
>echo off
>java -jar <myapp.jar>

Option 2 (Tricky)
Make an .exe file using another Windows-Based language (VB,Delphi,C++) whose only job would be to execute the necessary commands in shell (e.g. shell("c:\jdk\java.exe -jar c:\myapp\myapp.jar")). So the user thinks it's an .exe (i also think that J2exe does the same thing!)

To make it more complete (in a professional way) you could also use the included Installation Wizards that VB or Delphi have to deploy your apps using a CD and prepare the necessary .bat file. In that case I would suggest including the \bin directory of your JRE version to avoid installing JRE on clients machine.

It takes some work done but it gets as standalone as possible and once done, you can use it for all your apps and if using the System UI skin (included in Java) they will never know it's Java!!!

Hope that helped
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic