• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

OS Independent CD

I know it's possible to start a java program on inserting a cd, but I want to assume there is no JVM installed on the OS.  On inserting the CD you have to use the appropriete JVM supplied on the CD.  
0
wgilster
Asked:
wgilster
  • 4
  • 3
  • 2
  • +3
1 Solution
 
OviCommented:
yes, you must put your project, JVM, and like an autorun file on the CD.
0
 
wgilsterAuthor Commented:
That sounds like a plan, but how will the autorun file know which JVM to use on the CD?
0
 
OviCommented:
The autorun must know only about one file called run.bat which must do the start of the java program, by using the JVM stored on the CD. This run.bat must set itself the paths to the JRE, the classpath, and so on.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
wgilsterAuthor Commented:
That still doesn't answer my question.  If I have multiple JVM's on the CD how will the run.bat know which JVM to use for the specific platform that I'm on?
0
 
smileyxxCommented:
You need to have a different run.bat for each platform.
E.g. for windows you might have run-windows.bat, unix might have run-unix.sh and so on. On Mac you'll have to build a little program launcher with the MRJ. Each platform does things differently so it's impossible to have a single launcher for each. You can't have a single script that detects which OS is running. After all, detecting the OS is OS dependent! For instance on UNIX, you could use the uname command in a shell script, but that won't work on Windows and certainly not on the Mac.
0
 
wgilsterAuthor Commented:
I follow what your saying exactly smileyxx, but I need a little more detail.  I know that Windows has an "Autorun.ini" file that controls what program to launch when a cd is inserted, but I don't know how other operating systems handle the "cd insert" event.  Or maybe you could point me in the direction of where I could find out more information about this.
0
 
NeutronCommented:
Autorun is Windows-specific.

Greetings,
    Ntr:)
0
 
wgilsterAuthor Commented:
I didn't realize that Autorun was Windows-specific.  I thought the Mac had some type of autorun capibility?  What about when you click on the cd-rom drive on a Mac, doesn't execute a program, or do you have to tell it which program to start?
0
 
NeutronCommented:
Yes, ISO9660 discs with Autorun.INF are for windows only.

However, you can write an "hybrid" disc with sections for Mac and Windows separately. For Mac, Acapdec TOAST supports this and there is a possibility to run selected
program on Mac portion of the disc.

Take look at this link.
http://www.union.edu/RESOURCES/curriculum/tips/hybrid/

For RedHat Linux there's  the  'magicdev' which supports
autorun scripts, but that's RedHat specific and it is optional, so you cannot count on that.
Presumably, there are more 3rd party autorunners for Linux.

For this magicdev, take a look at
http://www.ccs.neu.edu/home/bchafy/magicdev.html
which describes it and there you have an example of the script, taken from RedHat distribution.

So, all these things are specific for the platform (especially for Mac) and there is no standard way to cover all Java target platforms.

Greetings,
    Ntr:)


Greetings,
    Ntr:)
0
 
smileyxxCommented:
As Neutron says, autorun.inf is windows-specific.
And have you noticed that it doesn't always work?
Mac and most UNIX do not have autorun capabilities, but what typically happens is that the disc is automounted and an icon for it appears on the desktop (Solaris will bring up a file manager window).

The best you can do is clearly indicate which program to run for each particular platform.
0
 
smileyxxCommented:
I partially take that back: if installed, QuickTime 2.0 does add autostart capabilities to Mac OS.

See here:

http://developer.apple.com/qa/qtpc/qtpc12.html

0
 
CleanupPingCommented:
wgilster:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
sudhakar_koundinyaCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to Neutron]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now