-4

I have created a game called "WordHunt" and I want to burn it to a cd/dvd..

Is there a proper way to burn java files especially GUI into the cd/dvd?? Is there a tutorial about it? can u please show it to me. I really want to learn it badly.

maksimov
  • 5,792
  • 1
  • 30
  • 38
Asaka Ghurl
  • 41
  • 2
  • 8
  • In the context of burning onto a DVD why GUI is so important? Did you mean to ask that you want the GUI to autostart when DVD is inserted? Please clarify your question. – maksimov Feb 20 '13 at 14:12
  • why do you want to burn to cd/dvd? most ppl download software these days – mcalex Feb 20 '13 at 14:12
  • because my program is in GUI form.. I want it to burn on a cd/dvd and I don't know how. Should I just copy the ".java" file and burn it or? what is the proper way how to do it? – Asaka Ghurl Feb 20 '13 at 14:14
  • If you are burning for storage purposes I suggest you archive your files and then burn your archive onto the CD/DVD. – maksimov Feb 20 '13 at 14:16
  • It's my project, our teacher want it to be in a cd/dvd. – Asaka Ghurl Feb 20 '13 at 14:17
  • 1
    If teacher didn't specify the format you can just burn all your project files as they are, i.e. copy project directory and burn. It's hard to say if they are going to take marks off you for archiving the files. Archives are easier to handle generally. – maksimov Feb 20 '13 at 14:19
  • -1 For absolutely no visible effort... – fresskoma Feb 20 '13 at 14:28

2 Answers2

1

I'm assuming you have a game that you'd like to install a game you've written in Java from a CD/DVD. For that, you might want to use one of a series of freely available installer generators (found here).

If in fact you are simply trying to create a CD/DVD which autostarts a Java game, this explanation of Windows autostart procedures might help you:

[...]

If Windows finds a (plain text) file called AUTORUN.INF in the root directory of a CD then it follows the instructions in this file to run a program, as per the above descriptions. This example AUTORUN.INF file tells Windows to run program shellrun.exe (from the root directory of the CD) which in turn will show web page default.htm in the user's default browser. The other options are described below.

[autorun]
open=shellrun.exe default.htm
icon=shellrun.exe
action=Start ShellRun-CD
label=ShellRun-powered CD

Use the Windows Notepad application to edit plain text files (it is in the Start+All Programs+Accessories menu). Your CD users may have switched off AutoRun. This might be because they are concerned about viruses. Also, if they press the Shift key down while inserting the CD, AutoRun is disabled.

There is no way to force your users to use AutoRun. It is therefore good practice to provide instructions so that users know how to start your CD, eg tell them to open file default.htm in their browser. These instructions are also required if your CD might be viewed by non-Windows users.

[...]


Having said that, the more "Java-like" solution to this problem would probably be something like a Java Web Start application. You might want to look into that technology before you go with physical distribution :)

Community
  • 1
  • 1
fresskoma
  • 25,481
  • 10
  • 85
  • 128
  • It's my project, our teacher want it to be in a cd/dvd. – Asaka Ghurl Feb 20 '13 at 14:17
  • Well then you've got two possible solutions besides Java Web Start ;) – fresskoma Feb 20 '13 at 14:18
  • Apparently this is just for copying purposes, nothing to do with installation, autorun or even Java for that matter. – maksimov Feb 20 '13 at 14:20
  • yeah, All I want is that my program would be in a cd/dvd.. and I dont know what files or steps to do, to burn it in the cd. – Asaka Ghurl Feb 20 '13 at 14:22
  • Sorry, but you really should read the links I've sent you. Nobody will create the DVD for you... I've quoted part of the explanation in one of my links, though. – fresskoma Feb 20 '13 at 14:23
  • typically teachers want just the .java files and they'll compile it themselves to see if it will compile. if you did this in an IDE like eclipse, then you could just copy the entire project folder and put it on a CD like you would any other folder – Jeff Hawthorne Feb 20 '13 at 14:23
  • oh.. so I would just copy the entire folder(where my program is?) then burn it in the CD? like that.? – Asaka Ghurl Feb 20 '13 at 14:26
  • I'm using NetBeans IDE 7.1.2 – Asaka Ghurl Feb 20 '13 at 14:26
1

Is there a proper way to burn java files especially GUI into the cd/dvd?

Don't do it!

The best way to distribute software to users these days is over the net. For deploying Java based desktop clients from a link, look to Java Web Start.

Java Web Start (JWS) is the Oracle Corporation technology used to launch rich client (Swing, AWT, SWT) desktop applications directly from a network or internet link. It offers 'one click' installation for platforms that support Java.

JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..

Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433