• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

making a stand alone application..

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there,
i have a couple of java source files and i was wondering if any of you folks could tell me how to make a standalone application from these source files that i can install on any computer without having to install java in that computer.the main page(the front screen of the application) is a java frame,and i am calling various other java files from this frame.
would really appreciate it,its kinda urgent.
thanks in advance
karan
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to have java on the machine to run a java stand alone application. You do not have to do an official install. You can just bundle the java code with your application code, and when you invoke the application you use the -cp option to dynamically name the classpath to find the java class files. Of course you will also need to dynamically tinker with the path parameter to tack on the directory that has the java.exe stuff in it.
You can put all that in a .bat file or whatever and just have the user double click the bat file - or make an icon that points at the bat file.
Of course this assumes that the Frame that is your GUI has a main method in it that the java.exe will find when you invoke it.
 
karan, chopra
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi cindy,
thanks for such a prompt reply..i am sorry but i didnt quite understand what u said i nthe following statements:
"You can just bundle the java code with your application code, and when you invoke the application you use the -cp option to dynamically name the classpath to find the java class files. Of course you will also need to dynamically tinker with the path parameter to tack on the directory that has the java.exe stuff in it. "
what i have right now are some java source files thats it,so whenever i run my GUI i go to the command prompt and type "java mainfilename" and my main frame pops up.of course i can write this command("java mainfilename") in a batch file and make an icon for it for the user to click and start it but again for the frame to open,there has to be javan in the user's computer right?i mean there has to be java.exe somewhere in the users computer and its path should be set in the system environment of the users computer,right?
is there no way by which i can probably make some executable file of my java source files so that the user just have to double click that executable file in order to start my application and without having to install java in his computer?
appreciate ur help in this matter..
cheers
karan
 
Get out of my mind! Look! A tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic