#1 Burning Software

It is currently Sat Apr 27, 2024 9:29 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Nothing written in Cd
PostPosted: Thu Oct 15, 2009 2:34 pm 
Offline

Joined: Thu Oct 15, 2009 1:01 pm
Posts: 1
Hello All,

I am using JStarBurn SDK and DLLs with JAVA , I have Implemented a code which can take a file from my hard disk which is to be written to the CD.

It shows that program runs successfully and also CD drive seems to writing (acting) something but it never shows any data in the written CD, also it locked the CD for any further writing (even if I am writing only few KB data), I have corrupted 2-3 CDs because of this.

I am sending the code below. Here "F:" is the CD/DVD writer drive name and "mma_ons.txt" is the file name to be written on the CD.
This sample is also taken from your SDK samples(BurnTree) and I modified it according to my use and also I am not supplying the arguments through argument list in main as I am developing it on Netbeans IDEs.



public void burn()
{
try
{
JStarBurnBurnerGrabber.register(null);
JStarBurnBurnerGrabber jstarburnburnergrabber = null;


jstarburnburnergrabber = new JStarBurnBurnerGrabber("F:", new Callback());
DiscInfo discinfo = jstarburnburnergrabber.getDiscInformation();

if(discinfo.getType() == 14)
{
System.out.println("no disc");
throw new JStarBurnException("No disc in drive");
}
jstarburnburnergrabber.setTestMode(true);
jstarburnburnergrabber.setVerifyNeeded(true);

jstarburnburnergrabber.CollisionDetectionDisabled(true);
jstarburnburnergrabber.addFile("C:\\Documents and Settings\\akhilk\\Desktop\\mma_ons.txt");

jstarburnburnergrabber.createDir("test");
jstarburnburnergrabber.addFile("test", "C:\\Documents and Settings\\akhilk\\Desktop\\mma_ons.txt");

// if(as.length < 4)
// jstarburnburnergrabber.saveTreeToImage("F:"); // :arrow: If I uncomment this line I get exception of
// // com.rocketdivision.jstarburn.JStarBurnException: CStarBurn_ISO9660FileTree::
//// BuildImage(): m__BOOLEAN__IsImageBuild is TRUE already at
// // com.rocketdivision.jstarburn.JStarBurnBurnerGrabber.burnTree(Native Method)

// else

jstarburnburnergrabber.burnFileTree();

jstarburnburnergrabber.ejectDisc();

System.out.println("finished!");
jstarburnburnergrabber.freeResources();

JStarBurnBurnerGrabber.unregister();
}
catch(Exception exception)
{
exception.printStackTrace();
System.out.println((new StringBuilder()).append("Error occured. Error message: ").append(exception.getMessage()).toString());
}
}
}

Please guide me if I am doing something wrong. :(

Thanks in advance
Akhil


Top
 Profile  
 
 Post subject: Re: Nothing written in Cd
PostPosted: Thu Oct 15, 2009 6:36 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
This is the answer:

jstarburnburnergrabber.setTestMode(true);

You burn in so-called "test mode". So the discs are not corrupted. They are not even touched by laser.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group