how to adjust .lnk file to set classpath where length is exceeding 255 characters

I have an java application run on MC3000 device by using a .lnk file. The problem is that when I set the classpath to a specific directory it is exceeding 255 characters. The content of .lnk file is as follows:

i want to know whether we have any particular way to set the classpath for the jars without using the .lnk file such that we only mention to run the main class in the lnk file

497#"\Application\CrEme\bin\CrEme.exe" -Of -classpath \Application\Picking\;\Application\Picking\saaj.jar;\Application\Picking\;\Application\Picking\commons-logging.jar;\Application\Picking\axis.jar;\Application\Picking\axis-ant.jar;\Application\Picking\jaxrpc.jar;\Application\Picking\jndi.jar;\Application\Picking\log4j-1.2.8.jar;\Application\Picking\wsdl4j.jar;\Application\Picking\commons-discovery.jar;\Application\Picking\picking.jar com.vuitton.picking.startup.Bootstrap

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

On the link, what happens if you make the Work in folder equal: "\Application\Picking\"
you can the take the "\Application\Picking\" off all the extra sections, if you understand.
(Not the first one)
#"\Application\CrEme\bin\CrEme.exe" -Of -classpath;saaj.jar;;commons-logging.jar;axis.jar;axis-ant.jar;jaxrpc.jar;jndi.jar;log4j-1.2.8.jar;wsdl4j.jar;commons-discovery.jar;picking.jar com.vuitton.picking.startup.Bootstrap

Open in new window

Or rename the folders to shorter names "\Application\" could be "\app\"
Or move all the files into the same folder if thats not an issue.
AnupKumar_BAuthor Commented:
Thanks for the response

If I remove "\Application\Picking" before each JAR path in the lnk file......I need to put all these JARS in the root folderin the device . As it is required to specifically put these files inside "\Application\Picking" could there be any other solution to set the path.
I have tried out  different ways like:

But when I run the application the path "\Application\Picking\config\" is not identified and it results in an error saying NoClassDefFound error for the specified classes required from the above JARS
183#"\Windows\CrEme\bin\CrEme.exe" -Of -classpath .;\Application\Picking\;\Application\Picking\config\;\Application\Picking\resource\;\Application\Picking\picking.jar com.vuitton.picking.startup.Bootstrap

Open in new window

OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

You could add the path as a windows VAR.
Add to the "set path"
so they will look something like ;%picking%\saaj.jar

AnupKumar_BAuthor Commented:
yes I assume that this may be the most probable solution, but I am not able to locatw where to set/create a new windows VAR on the MC3000 device

Could you please help in settjng up a VAR in Windows CE for this device.

Thanks for your response
In windows XP you need to add an Environment Variable.
To do this goto Control Panel / System, then the Advanced tab.
At the bottom is the button for Environment Variabls. Click it

Now im going to say we should set this up as a system variable so,
click new at the bottom of the screen.

name = picking
value = c:\folder1\folder2\application\picking

Click OK and restart the computer.
What version of CE is running on the device
Within windows XP (might be the same for CE)

Varables are held in the registy at
HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Session Manager\ Environment
Or you could create a .bat file with the string inside.  Then just link to the .bat file
AnupKumar_BAuthor Commented:
This device uses Windows CE 5.0.

But i am unable to find the regstry editor for this version of windows, not even tringing "regedit" or any other command does work

Could you please help me with this.
Thanks for your response
AnupKumar_BAuthor Commented:
I was aware of creating a new environment variable in Windows XP......I  initially checked for this option on the devise but I have not even able to locate the "Environment variables" option in Control panel/system
I also have a CE5.0 hand held. (MX7)

It has regedit on it...  I have attched.

OK i can't find it the regisrty or anything.  I found DOS environment variable in CE 5 but they are empty.

I think your going to have to use a .bat file.

Is that an option?
AnupKumar_BAuthor Commented:
Thank you for this solution.  

yes I think using a .bat file and invoking it would help.... I am trying to run the batch file to set the classpath from the shortcut(.lnk file). Is this the right procedure? i do not have much knowledge on .lnk files and the commands to invoke .bat files from the short cut file Can u please help me in this regard

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AnupKumar_BAuthor Commented:
Just for the purpose of testing......I have tried setting the classpath to all the JARS from command prompt...and then started the application (I mean ran the Bootstrap class from jar).....but I get the same errors in console.....which occur when the JARS are not found in the classpath.....i feel this is because the classpath set from commandprompt is not recognised when we run the application using the lnk file.(I have modified the lnk file as shown:)
183#"\Windows\CrEme\bin\CrEme.exe" -Of -classpath .;\Application\Picking\config\;\Application\Picking\resource\;\Application\Picking\picking.jar com.vuitton.picking.startup.Bootstrap

Open in new window

You don't even need a .lnk file. You can just run the .bat file.

bat file should read:
START "c:\Application\CrEme\bin\CrEme.exe" -Of -classpath c:\Application\Picking\;c:\Application\Picking\saaj.jar;c:\Application\Picking\;c:\Application\Picking\commons-logging.jar;c:\Application\Picking\axis.jar;c:\Application\Picking\axis-ant.jar;c:\Application\Picking\jaxrpc.jar;c:\Application\Picking\jndi.jar;c:\Application\Picking\log4j-1.2.8.jar;c:\Application\Picking\wsdl4j.jar;c:\Application\Picking\commons-discovery.jar;c:\Application\Picking\picking.jar com.vuitton.picking.startup.Bootstrap

Open in new window

does your string work if you put it in RUN?
AnupKumar_BAuthor Commented:
Hi I have tried using the .bat file with the code as specified in your previous comment ......but I am not able to start the application ...i think START command is not able to run the application.....I even tried to generate a .log file to generate what error was occuring...but i was not able to generate the log
AnupKumar_BAuthor Commented:
Hi Thank You for the .bat solution.  It works!! I am sorry as I had not properly written the .bat file previously.....the code provided is as follows:
START "\Windows\CrEme\bin\CrEme.exe" -Of -classpath \Application\Picking\;\Application\Picking\saaj.jar;\Application\Picking\;\Application\Picking\commons-logging.jar;\Application\Picking\axis.jar;\Application\Picking\axis-ant.jar;\Application\Picking\jaxrpc.jar;\Application\Picking\jndi.jar;\Application\Picking\log4j-1.2.8.jar;\Application\Picking\wsdl4j.jar;\Application\Picking\commons-discovery.jar;\Application\Picking\picking.jar com.vuitton.picking.startup.Bootstrap

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.