Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Windows long filenames inside jar manifest

Posted on 2007-08-06
9
Medium Priority
?
357 Views
Last Modified: 2013-12-29
Is there a way to use windows long filenames inside a jar's manifest file?  I'm trying to set the classpath and it works when I use short file names but I can't get it to work using long filenames.
0
Comment
Question by:csalem05
  • 5
  • 4
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 19641120
>>Is there a way to use windows long filenames inside a jar's manifest file?

I'm going to assume you mean short there or the rest doesn't make sense.

Make you own manifest - you can put what you like in it
0
 

Author Comment

by:csalem05
ID: 19641318
When I set the classpath in the manifest to this, It works:
/C:/PROGRA~1/OPENOF~1.2/program/classes/agenda.jar /C:/PROGRA~1/OPENOF~1.2/program/classes/aportisdoc.jar

If I set the classpath to this it doesn't work:
/C:/program files/openoffice.org 2.2/program/classes/agenda.jar
/C:/program files/openoffice.org 2.2/program/classes/aportisdoc.jar

I tried surrounding each path with quotes but that didn't work.  Is there any way to get it to work?
0
 

Author Comment

by:csalem05
ID: 19641620
Also, is there any way to use environment variables inside a manifest's classpath?

For example:
If I set $OOPATH=C:\program files\openoffice.org 2.2\

is there a way for me to have the classpath in my manifest something like:
%OOPATH%\program\classes\agenda.jar
%OOPATH%\program\classes\aportisdoc.jar

I tried this and it didn't work.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 86

Expert Comment

by:CEHJ
ID: 19641647
>> Is there any way to get it to work?

What's wrong with the way you got it to work?

>>is there a way for me to have the classpath in my manifest something like:

Not without custom classloading
0
 

Author Comment

by:csalem05
ID: 19641866
Because I wrote a little program for building ant files that has a JFileChooser that returns the selected files that should be included in the classpath, there's no way to get the short filename from that.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19641879
>>there's no way to get the short filename from that.

There is - the algo is quite simple
0
 

Author Comment

by:csalem05
ID: 19641975
Well then, another question would be what's the algorithm?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 800 total points
ID: 19642068
See my contribution here. I'm not sure if it's 100% sound though

http://www.experts-exchange.com/Programming/Languages/Java/Q_20881391.html
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19646383
:-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question