Skip to main content

CVM, command line parameters, several JARs

6 replies [Last post]
manenkov
Offline
Joined: 2008-01-04

Hello all,

I trying to run CVM with several jars in classpath. I use this format (it is a .LNK file on Windows Mobile, for running my java apps):

for 1 jar:

31#"\phoneme\personal\bin\cvm.exe" -classpath "\phoneme\test\MFFM.jar" "Test"

-its work perfectly.

for 2 (or more) jars:

31#"\phoneme\personal\bin\cvm.exe" -classpath "\phoneme\test\MFFM.jar; \phoneme\test\MFFMTools.jar" "Test" (for example)

and its ia not working. Application just not starting.

It is correct syntax for using several jars or I do something wrong?

Best regards,
Ilya

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
manenkov
Offline
Joined: 2008-01-04

It seems list a problem is solved...My fault.

Thanks a lot to all for help!

best regards,
Manenkov

gaganmalik
Offline
Joined: 2008-06-11

Hi Manenkov..

Can u tell what the problem was? and the solution ofcourse :)

- Gagan

lada
Offline
Joined: 2007-10-31

so how is it goimg? It just came to my mind that you gave us only simplified example and your real commandline after adding the second jar got so long that you exceeded maximum shortcut length of 255 chars.

manenkov
Offline
Joined: 2008-01-04

No, the problem is still exist.

What exactly I doing (is just experiment):

First class:

package demo2jar;

import java.util.Date;
public class Test {
public static String getString(){
return new Date().toString();
}
}

building it to jar Demo2Jar.jar with Netbeans & java1.6.

Second class:

package demo2jar2;

import demo2jar.Test;

public class Main extends javax.swing.JFrame
....
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
jLabel1.setText(Test.getString());
}
...
building it to jar Demo2Jar2.jar with Netbeans & java1.6.

Then I copy these jars to WM emulator, and use a link:
250#\phoneme\personal\bin\cvm.exe -classpath "\Storage Card\Demo2Jar.jar;\Storage Card\Demo2Jar2.jar" demo2jar2.Main

And its not work...

lada
Offline
Joined: 2007-10-31

Try increasing that 31# to your new commandline length. You can also take out the space after ; and of course all " - if there are no meaningful spaces in your paths (like e.g. Program Files) then you don't have to enclose everything in "

cjplummer
Offline
Joined: 2006-10-16

I always use 01#, even for long lines. I think the problem is the space after the ; in your -classpath option. Try leaving it out.

Chris