Why do I receive Java error messages when using the SYSTEM command?

2 views (last 30 days)
When I use the command:
str1 = 'C:\Progra~1\WinZip\Wzzip "C:\Documents and Settings\mchechelnitsky.000\Desktop\BRIEFCASES\AccessDatabases" "g:\avm\Input_Database\Operational_Database_Input.mdb"';
system (str1);
I receive the following error:
WinZip(R) Command Line Support Add-On Version 1.0 (Build 3181)
Copyright (c) WinZip Computing, Inc. 1991-2000 - All Rights Reserved
Searching... ... ..
Adding Operational_Database_Input.mdb................................
...............................
...............................
.............java.lang.IllegalArgumentException: bad position: 1572
at javax.swing.text.JTextComponent.setCaretPosition(Unknown Source)
at
com.mathworks.mde.cmdwin.CmdWinEditorKit$CWReturnAction.actionPerformed(CmdWinEditorKit.java:955)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at
com.mathworks.mde.cmdwin.XCmdWndView.processKeyEvent(XCmdWndView.java:2662)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processE
The above Java error is probably because of a message that should be printed to the screen but fails.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0 (R14) when using the SYSTEM command to execute a command that would update the system command window dynamically.
To work around this issue, use the SYSTEM command with output variables. For example:
str1 = 'C:\Progra~1\WinZip\Wzzip "C:\Documents and Settings\mchechelnitsky.000\Desktop\BRIEFCASES\AccessDatabases" "g:\avm\Input_Database\Operational_Database_Input.mdb"';
[s,r] = system(str1);
This will supress printing a message to the screen.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!