"This is a lesson that we should never keep quiet when those in power break the law," he told the crowds in his mother-tongue, Zulu.
Judge Chris Nicholson said the decision to prosecute without consulting Mr Zuma, 66, had been invalid and ordered the charges to be set aside - for the moment.
"I must repeat that this application has nothing to do with the guilt or otherwise of the applicant. It deals only with the procedural point relating to his [Zuma's] right to making representations before the respondent [the prosecution] makes a decision on whether to charge him," AFP news agency quotes him as saying.
The judge said the charges could be resubmitted but correspondents say prosecutors will come under huge pressure to drop the case altogether.
A jubilant Mr Zuma embraced his lawyer after the ruling, AP news agency reports.
Our correspondent says Mr Zuma's lawyers are due back in court before the end of the year to try and get a permanent stay of prosecution.
Under South African law, a president does not have immunity from prosecution.
The charges against Mr Zuma related to South Africa's largest post-apartheid arms deal, involving contracts totalling 30bn rand ($3.7bn; £2bn) to modernise its national defence force.
The deal involved companies from Germany, Italy, Sweden, Britain, France and South Africa.
Mr Zuma has mass grass-roots support in the ruling ANC
Mr Zuma was sacked as South Africa's deputy president in 2005, when his financial adviser was found guilty of soliciting a bribe on behalf of Mr Zuma and jailed for 15 years in connection with the deal.
He then went on trial, but the case collapsed in 2006 when the prosecution said it was not ready to proceed.
He was charged again last December shortly after winning a bitter campaign against President Thabo Mbeki to become ANC leader in what his allies say was a political conspiracy to prevent him becoming president.
Elections are due to be held in April or May 2009.
Tension was raised this week, following the publication of a cartoon showing Mr Zuma about to rape a figure labelled "Justice System" - a reference to the criticism of judges by Mr Zuma's supporters.
"We will eliminate any forces that come our way," ANC Youth League president Julius Malema said on Wednesday, according to local media.
In April 2006, Mr Zuma was acquitted of rape in a separate case, though he was widely criticised for comments about sex and HIV/Aids.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.