-
November 12th, 2012, 09:09 PM
#1
debugging=runs fine normally=fails
I have a java program that seems to work okay when I'm debugging it or running it from the Eclipse IDE. But when I export it into a jar file and run it through a jnlp it hangs at a certain step.
I'm not exactly sure but I think the problem might be a step when I'm converting a file into a text file.
Code:
private File INPUT;
private JTextArea innerTextArea;
protected boolean rangeArgsProvided = false;
Converter(File INPUT, JTextArea innerTextArea) {
//initialize
this.INPUT = INPUT;
this.innerTextArea = innerTextArea;
}
@Override
public File doInBackground() {//replaces doWork
File convertedBAM = new File("convertedFile.txt");
int convertstepcounter=0, convertstepcounter2=0;
I'm not specifying any specific location to get or put the file convertedFile.txt in. Its just a variable that will take the converted information and then pass on in a later step and not be used anymore. Is there a possible problem with this or is the hanging likely due to something else?
PS the jar runs from the Local Settings/Temp Folder in windows. Someone else made it that way.
-
November 15th, 2012, 07:07 AM
#2
Re: debugging=runs fine normally=fails
It's probably a security manager issue, check out this article http://www.techrepublic.com/article/...andbox/5035300
-
December 1st, 2012, 10:54 PM
#3
Re: debugging=runs fine normally=fails
Originally Posted by keang
I signed my jars and they've run before...
It 'crashes' as shown below...I put in text statements to pinpoint the position. Can't dig deeper without a lot of extra trouble because doing so would be going into a jar library file.
INPUT is a file chosen by the user using a file browser.
Code:
selectedFile = jfileChooser.getSelectedFile();
final FileConversion task = new FileConversion(selectedFile, txtArea);
//Conversion Function
FileConversion(File INPUT, JTextArea innerTextArea) {
//initialize
this.INPUT = INPUT;
this.innerTextArea = innerTextArea;
}
@Override
public File doInBackground() {
File convertedFile = new File("convertedFile.txt");
int convertstepcounter=0, convertstepcounter2=0;
publish( 1 );
IoUtil.assertFileIsReadable(INPUT);//crashes here
publish( 2 );
final SAMFileReader reader = new SAMFileReader(INPUT);//or here if above line is disabled.
publish ( 3 );
-
December 3rd, 2012, 12:53 AM
#4
Re: debugging=runs fine normally=fails
I also set all permission in the jnlp file and it doesn't help
-
December 3rd, 2012, 10:47 AM
#5
Re: debugging=runs fine normally=fails
It could be throwing an exception that you're not aware of. You could try putting throw new Exception("see if I can see this"); after publish( 1 ). If you don't see that exception then the problem is that you're not setup so that you can see exceptions when thrown from that piece of code.
-
December 3rd, 2012, 10:48 AM
#6
Re: debugging=runs fine normally=fails
...thinking about it, that might not help. Assuming your 'publish' method simply wraps System.out.println. Why not just post an SSCCE?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|