Solved

Java, setting a CLASSPATH within a manifest of a jar

Posted on 2014-01-16
2
268 Views
Last Modified: 2014-01-17
I do not understand the rules of setting a classpath within a manifest of a jar

I seem to get it to work and then not get it to work.  I only know you cant use wildcards from the documentation I have read so far


Could someone please post an example of how to wrap around more than one line for the classpath within a manifest of a jar

Could you please post more than one example?

Thanks


Thanks
0
Comment
Question by:Los Angeles1
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
Comment Utility
That, my friend, is quite a tricky issue. Here's one answer:

 Main-Class: PackTest
Class-Path: /tmp/root/bin1/ 
 dep2.jar

Open in new window


0000000: 4d61 696e 2d43 6c61 7373 3a20 5061 636b  Main-Class: Pack
0000010: 5465 7374 0a43 6c61 7373 2d50 6174 683a  Test.Class-Path:
0000020: 202f 746d 702f 726f 6f74 2f62 696e 312f   /tmp/root/bin1/
0000030: 200a 2064 6570 322e 6a61 720a 0a          . dep2.jar..

Open in new window


If you're using Windows, your line feeds will be 0x0d0a, not 0x0a
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigHeights  challenge 13 55
noX challenge 17 76
mapShare challenge 13 68
Eclipse Neon and jdk 1.8.0 11 65
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

743 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now