Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make exe. + how do i open internet explorer from stand alone application

 
p sata
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
I want make exe file like we make in vb....how do i do...
second...
I have made one stand alone application... in its menu item i have one item call "about us" ... when user clicks that internet explorer should open and if user is connected ..than should go to that website....
so any one can say what should i write in onaction performed
if any one know do mail me
Thnx in advance
 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We try to steer clear of making EXE files with Java because it takes away its platform independance. HOWEVER the is a program called J2EXE that will do it for you.
BUT EVEN BETTER...if you after just a clickable icon, do this:
1) create a shortcut on your desktop that points to your c:\jdk1.3\bin\javaw.exe file (or wherever that file is in your configuration)
2) save the shortcut then right click on it and modify the path to look like this including the quotes:
"c:\jdk1.3\bin\javaw.exe c:\pathtoyourclassfiles\yourclassfile"
and save it again. That should work in place of your EXE.
EVEN EASIER..copy javaw.exe to the same directory as your class files and make the shortcut point to javaw.exe yourclassfile.
As for the internet explorer thing use this code:

If you want to open a web site as you open IE do this first:

Hope that helps, my code may not be exactly right, but I think its darn close.
[This message has been edited by ryan headley (edited March 01, 2001).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"p sata",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic