Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
I'm not sure whether LimeWire selfdownloads the JVM on other OS besides Windows...haven't tried it. Anyway, thnx for the code. I don't know any C++, so this should be fun! If I finish this program I'm writing, I'll include your name in the credits. > I'll just leave it there for a day or two, so let me know when you've got it. Two of the three projects are built with Borland C++ Builder, so if you don't have it, you have a couple options: 1) Buy it (I think you can get a pretty good student discount and it is a great tool, well worth having), 2) just extract the relevevant code snippets and put it into whatever framework you are using. > You asked earlier in the thread about the API for rebooting machine; it is ExitWindowsEx(). A VB app that reboots, will just call the same thing in the VB way. It has options to control wether it is a reboot, shutdown, restart, etc. Under Windows 9x/Me, you can simply call it. Under NT/2k/XP, you have to jump through a bunch of hoops with security tokens and then you can call it. You'll see in the Rebooter code in MainForm.cpp that I've made a function that will handle both cases, so it should work on all flavors of Windows (or your money back!). You can either leave these programs intact and run them with exec(), or you can take the code and make a dll that can be accessed with JNI. By the way, run them with the parameter "/?" to see what command line options they support and be alert when you run ProcessKiller or Rebooter -- if you have programs with open, modified documents, you may regret it -- but don't panic, they both default to giving you plenty of time to cancel and show you a progress bar, so you can tell when they will do their thing. > I've seen the posts about making an exe for a Java program, but I haven't tried it. Since I am working on Linux and Windows, I like the platform indepence -- an exe only runs on Windows, so while I was mildly interested, looking into it is low priority. I haven't tried LimeWire, but I like that idea of a smart installer. I installed something (jikes, ant? I forget what it was) that came in a big class file which was a self-installer, but of course, I had to already have the JVM installed. Assuming you already have a JVM, it is pretty nice though. An installer that automatically goes and gets the JVM is even better, but then you have to make the stub for every platform. Maybe we can ask the LimeWire guys whether they came up with that themselves, or if someone (like maybe Wise installer) already packages that feature with their installer. Does LimeWire also do that same trick for Linux, Mac and other platforms? > - mfg Replies: |
Sponsored Links
|