Long line mangling

When creating a jar file and specify a class-path for the manifest, the jar utility mangles my nicely-divide lines. For example...
Given a manifest file (mani.txt) that includesClass-Path: jar1.jar
jar2.jar
jar3.jar
...Then running the commands:
jar -cfm Mine.jar mani.txt *
jar -xf Mine.jar META-INF/MANIFEST.MF
cat META-INF/MANIFEST.MFI see a new class-path entry:
Class-Path: jar1.jar jar2.jar jar3.jar ...This entry includes all of the individual lines as before, but with line breaks removed. This is fine, until I hit the 72 byte limit for the total length. Then the jar utility inserts an line break at EXACTLY 72 bytes (breaking jar names/paths across lines). This prevents the files specified from being found. For example, I might see:
Class-Path: path/jar1.jar ... path/ja
rX.jar path/jarX1.jarHow can I get the jar command to include my pre-divided line set exactly as I divided it?
I'm running java 1.5.0_13 on Mac OS X 10 v. 10.5.3 (but similar behavior was observed on a OS X v10.4 and a Red-Hat linux box).

Please allow me to clarify. I AM NOT trying to refer to other jar files that are contained in my jar file. Rather, I am trying to use the jar Class-Path mechanism to allow me to use my jar with other jars that reside in various directories. This is described as a method to use multiple jars together by [The Java Tutorials|http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html] .
According to JavaGlossary , this is the only way to specify the classpath when using the -jar switch invoking from the command line (the -cp, -classpath and environment variables being ignored). Also according to JavaGlossary, lines of the manifest may not exceed 72 bytes.
Building off of various examples I found in other forums, I constructed a Class-Path entry for my manifest file. My problem is the re-formating that the 'jar' command seems to be performing. How can I get my manifests Class-Path entry into my jar file without it merging it all into one line then inserting its own line breaks? Stated slightly different, the 'jar' tool takes the 'm' option as a list of pairs to name:value pairs to modify the Class-Path with. Is there a way I can instruct the jar utility to include the values preserving whitespace, or to bypassing the auto generation and just insert a manifest file of my crafting directly?

Similar Messages

  • How to handle long lines in a JAD file?

    Hi all,
    setting MIDlet permissions in a JAD file easily expands the length of one line so that they need to get wrapped into 2 or more lines. AFAIK JADs actually are manifest files and the manifest file spec says that a line continuation is marked by a line beginning with a single space. I use Ant to create the JAD file and Ant's manifest task does it exactly like this. Example:
    MIDlet-Permissions: javax.microedition.io.Connector.bluetooth.client,j
    avax.microedition.io.Connector.socketThis works on my Sony Ericsson phone and in the MicroEmu emulator, but the WTK (2.5.2) emulator complains about that by throwing an exception:
    com.sun.midp.midletsuite.InvalidJadException: Reason = 28
         at com.sun.midp.midletsuite.JadProperties.partialLoad(+259)
         at com.sun.midp.midletsuite.JadProperties.load(+8)
         at com.sun.midp.dev.DevMIDletSuiteImpl.create(+252)
         at com.sun.midp.dev.DevMIDletSuiteImpl.create(+74)
         at com.sun.midp.main.Main.runLocalClass(+20)
         at com.sun.midp.main.Main.main(+80)So who is wrong here?
    Thanks for some information!
    Best regards,
    Brian

    MIDlet-Permissions: javax.microedition.io.Connector.bluetooth.client,j
    avax.microedition.io.Connector.socketif memory serves, inability to handle stuff like above is a known WTK bug.
    Try workarounds like "glueing" permissions into single (long) line or splitting them on commas

  • How can I change the view in Show Page Source from one long line to a more readable view

    When using Develop --> Show Page Source in Safari 6.0.1 I get a view of the html that is just one long line. I can scroll along to the right but it is not very easy to use.
    It seems to me that when I first used this feature I had a formatted view, that is the text was broken into separate lines and was easier to read.
    But I think I clicked on something and it change to one line. I can't find a way to change it back.
    Is anyone familiar with this? Or can point me to more information about Show Page Source formatting?
    Thanks.

    Oh, I see the problem.
    The one long line view only occurs when I'm viewing a page locally on my own computer. (When I choose Show Page Source for any page on the internet the display is formatted normally.)
    So obviously if I want to see the code in my own files I can just go open them in the text editor. I used to use View Page Source (previous version of Safari) as a shortcut for a quick peek. If there is a solution to this formatting thing for local files I'd love to know it, otherwise I'll just put it on the you-can't-do-that-anymore list.

  • How to print a text file with long lines?

    I am trying to print a text file which contains many long lines. I find that the long lines are truncated on the printouts. How do I wrap up these long lines? Could you give me some examples?
    Thank you very much!

    Here's an example. The "\n" makes anything after it go to the next line. I hope this helps. Look at the Private void getTable() section.
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class LabNine extends Frame implements ActionListener, WindowListener {
         private TextField txtInfo;
         private List lstInfo;
         private Button btnAddInfo;
         private BorderLayout borderlayout;
         private Connection databaseConnection;
         Statement statement;
         ResultSet resultSet;
    public LabNine( ) {
         super("Lab Nine");
         // addWindowListener to close application
         addWindowListener(this);
         // create layout
         borderlayout = new BorderLayout();
         setLayout(borderlayout);
         // create text field so the file input that is selected will be seen in here
         txtInfo = new TextField();
         txtInfo.setEnabled(false);
         Color color = new Color(255, 136, 183);
         txtInfo.setBackground(color);
         add(txtInfo, BorderLayout.NORTH);
         // create list so the file input can be populated in here
         lstInfo = new List();
         add(lstInfo, BorderLayout.CENTER);
         // create button to add selected input file in the text field
         btnAddInfo = new Button("Add Info");
         btnAddInfo.setBackground(Color.cyan);
         btnAddInfo.setFont(new Font("TimesRoman", Font.BOLD, 16));
         btnAddInfo.addActionListener( this );          
         add(btnAddInfo, BorderLayout.SOUTH);
         // set frame attributes
         setSize(450, 250);
         setResizable( false );
         show();
         // get the table/ get the query
         loadConnection();
         getTable();
    public void actionPerformed(java.awt.event.ActionEvent e) {
         // if add button is pushed then it will check to see if an item was selected.
         // if not, then an error message will be displayed else the selected item will be in the text box
         if ( e.getSource() == btnAddInfo ) {
              if ( lstInfo.getSelectedIndex() == -1 ) {
                   System.out.print( "You have not selected an item" );
              else {
                   txtInfo.setText(( lstInfo.getSelectedItem() ));
    private void getTable() {
         try {
              String query = "SELECT FIRST, LAST, EMAIL FROM Names";
              statement = databaseConnection.createStatement();
              resultSet = statement.executeQuery( query );
              while ( resultSet.next() ) {
                   lstInfo.add( resultSet.getString( "FIRST" ) + " " + resultSet.getString( "LAST") + " " +
                        resultSet.getString( "EMAIL" ) + "\n" );
              statement.close();     
         catch ( Exception e ) {
              System.err.println( e );
    private void loadConnection() {
         // define the data source for the driver
         String sourceURL = "jdbc:odbc:people";
         String username = "";
         String password = "";
         // load the driver
         try {
              // load the drive class
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              // create a connection through the drivermanager
              databaseConnection = DriverManager.getConnection( sourceURL , username, password );     
         catch( ClassNotFoundException cnfe ) {
              System.err.println( cnfe );
         catch( SQLException sqle ) {
              System.err.println( sqle );
    public static void main(java.lang.String[] args) {
         LabNine aLabNine = new LabNine( );
    public void windowActivated(java.awt.event.WindowEvent e) {
    public void windowClosed(java.awt.event.WindowEvent e) {
         // closes the application
         System.exit( 0 );
    public void windowClosing(java.awt.event.WindowEvent e) {
         // closes the application
         System.exit( 0 );

  • When using the "Fill & Sign PDF" feature, is there a way to stretch to size the text box, for a specific area on the page...instead of it going on in one straight long line...?

    When using the "Fill & Sign PDF" feature, is there a way to stretch to size the text box on a specific area of the page...instead of the text box going on in one straight long line....? I'm not seeing there's an option or ability to do so, just wanting to confirm.

    Improving the handling of multiple line text fields is in our plans, but for now, you will have to add manual carriage returns (Enter).
    Thanks,
    Josh

  • Where is the long line "--" on the key board?

    where is the long line "--" on the key board? I can only find a short one and thus have to press is twice.

    Here's a somewhat more helpful answer:
    option-shift-hyphen
    This will give you what's called an em-dash. If you also want an en-dash (commonly used to separate groups of numerals, as in phone numbers in printed materials):
    option-hyphen
    Here's more about typing special characters and symbols:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1064.html
    Good luck!

  • Long lines corupt script output

    When SQL run as Script (F5) produces too long lines any Script Output gets blank. Text is there in tab Script Output and I can copy and past it but I can't see it.
    What setting could affect this?
    --This SQL is working fine
    select rpad('Test1',4000), rpad(' ',996) from dual;
    --and this sql output is white on white:
    select rpad('Test2',4000), rpad(' ',997) from dual;
    Adam Dziurda
    PS. Affected version Oracle SQL Developer Version 4.0.0.12.27 (aka 4.0 EA1)

    Yes, I see that. I've logged bug 17218146 for it.
    Thanks
    Barry

  • I have successfully exported subtitles (XML files) from FC version 7 to FC version 6, by choosing Apple XML Interchange Format Version 4. Now the exported subtitles suddenly read in one long line, at the top, not registering any "Enter" keystrokes.

    I have successfully exported subtitles (XML files) from FC version 7 to FC version 6, by choosing Apple XML Interchange Format Version 4. Now the exported subtitles suddenly read in one long line, at the top, not registering any "Enter" keystrokes. The same happens even if I re-import the XML file into Final Cut Version 7 (from where I exported the subtitles). Any tips on how to fix this?

    You might see if you can bring the xml file into Title Exchange Pro
    http://www.spherico.com/filmtools/TitleExchange/
    It's a great program and the author was very responsive when I had a problem.
    If it reads correctly, you can probably save it back out. 
    If you want to send it to me, I'll see if it opens.
    [email protected]

  • How to break down long lines of code

    Is there a way to break a long line of code so that it will fit on an A4 sheet?

    You can break on most dots between variable name and method name, between spaces in operators, after a comma that separates parameter names, etc. Just about the only thing you can't break is a long literal String--though you could type it on multiple lines by breaking it into pieces and putting a + in between the pieces.

  • ADSL or ADSL2 on a long line?

    i have BT business boadband (office unlimited ADSL2 Next Gen (up to 20 Mb)). Historically i have had poor broadband hence swapping to business to try and improve matters. i have now ditched the home hub and gone to a 7800N which has made a big difference. although over Christmas the flashing lights played havoc with the broadband and now i have a high SNR margin and interleaving..
    However, my main question is will it be worth me pushing for ADSL2 given my line (stats from DSL stats below). currently my router will only connect with G.DMT so i am assuming i can only get ADSL? Will ADSL2 or indeed 2+ improve speed/stability on a long line with attenuation around 62 dB?
    thanks everyone
    DSLAM/MSAN type:                       IFTN:0x71c8 / v0x71c8
    Modem/router firmware:            AnnexA version - A2pB025f.d22k
    DSL mode:                          G
    Status:                 Showtime
    Uptime:                               3 days 15 hours 12 min 13 sec
    Resyncs:                              1 (since 16 Jan 2015 09:24:44)
                                                                    Downstream      Upstream
    Line attenuation (dB):    62.0                        31.5
    Signal attenuation (dB):                Not monitored                 
    Connection speed (kbps):            2944                       448
    SNR margin (dB):              9.7                          9.0
    Power (dBm):                    17.8                        12.6
    Interleave depth:            16                           4
    INP:                       0.65                        1.88
    RSCorr/RS (%):                  0.0225                   0.0051
    RSUnCorr/RS (%):            0.0093                   0.0000
    ES/hour:                              0                              0
    adsl info --stats
    adsl: ADSL driver and PHY status
    Status: Showtime
    Retrain Reason: 8000
    Max:    Upstream rate = 688 Kbps, Downstream rate = 3264 Kbps
    Channel:        INTR, Upstream rate = 448 Kbps, Downstream rate = 2944 Kbps
    Link Power State:       L0
    Mode:                   G.DMT
    TPS-TC:                 ATM Mode
    Trellis:                ON
    Line Status:            No Defect
    Training Status:        Showtime
                    Down            Up
    SNR (dB):        9.6             9.0
    Attn(dB):        62.0            31.5
    Pwr(dBm):        17.8            12.6
                            G.dmt framing
    K:              93(0)           15
    R:              8               16
    S:              2               8
    D:              16              4
                            Counters
    SF:             18470539                18470803
    SFErr:          4432            697
    RS:             627998338               157001825
    RSCorr:         141398          8020
    RSUnCorr:       58116           0
    HEC:            3611            586
    OCD:            78              8
    LCD:            0               2
    Total Cells:    2179945133              0
    Data Cells:     84244409                0
    Drop Cells:     37
    Bit Errors:     0               0
    ES:             2322            0
    SES:            49              0
    UAS:            98              98
    AS:             314005
    INP:            0.65            1.88
    PER:            1.75            1.75
    delay:          8.00            8.00
    OR:             32.00           32.00
    Bitswap:        28562           750
    Total time = 1 days 19 hours 20 min 38 sec
    FEC:            213384          0
    CRC:            5918            0
    ES:             2322            0
    SES:            49              0
    UAS:            98              98
    LOS:            1               0
    LOF:            9               0
    Latest 15 minutes time = 5 min 38 sec
    FEC:            1740            0
    CRC:            36              0
    ES:             9               0
    SES:            0               0
    UAS:            0               0
    LOS:            0               0
    LOF:            0               0
    Previous 15 minutes time = 15 min 0 sec
    FEC:            29484           0
    CRC:            440             0
    ES:             75              0
    SES:            1               0
    UAS:            0               0
    LOS:            0               0
    LOF:            0               0
    Latest 1 day time = 19 hours 20 min 38 sec
    FEC:            57861           0
    CRC:            1256            0
    ES:             426             0
    SES:            9               0
    UAS:            0               0
    LOS:            0               0
    LOF:            0               0
    Previous 1 day time = 24 hours 0 sec
    FEC:            16164           0
    CRC:            422             0
    ES:             228             0
    SES:            2               0
    UAS:            0               0
    LOS:            0               0
    LOF:            0               0
    Since Link time = 3 days 15 hours 13 min 23 sec
    FEC:            141398          8020
    CRC:            4432            697
    ES:             1803            0
    SES:            28              0
    UAS:            0               0
    LOS:            0               0
    LOF:            0               0
    Solved!
    Go to Solution.

    Welcome to the BT Residential Customers forum
    As you are a business user, please could you may be better posting on the  BT Business forum at http://business.forums.bt.com/
    PS   With that amount of line loss, there would be no advantage in moving to ADSL2 or ADSL2+.
    Line attenuation (dB):    62.0  
    Estimation of your maximum rate adaptive adsl speed
    Downstream
    Attenuation
    dB
    Approx
    Line Length
    km
    dslMAX (20CN)
    kbps
    IP Profile
    kbps
    BT 21CN WBC
    & adsl2+
    kbps
    IP Profile
    kbps
    adsl2+ (LLU)
    kbps
    Throughput
    kbps
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • How can long lines of code be cut / separated into multiple short

    In Java, How can long lines of code be cut / separated into multiple short lines?
    Example
    System.out.printf( "%d\t%d\t%s\t%s\t%s\t%s\t\t%s\n", arrayIndex ,  part[ arrayIndex ], name[arrayIndex], units[arrayIndex], price[arrayIndex], units[arrayIndex] * price[arrayIndex], total[ arrayIndex ]   );Thanks

    System.out.printf( "%d\t%d\t%s\t%s\t%s\t%s\t\t%s\n",
    arrayIndex , 
    part[ arrayIndex ],
    name[arrayIndex],
    units[arrayIndex],
    price[arrayIndex],
    units[arrayIndex] * price[arrayIndex],
    total[ arrayIndex ]   );P.S. It looks to me like you have an array for each attribute of something. This is not OO and you should consider creating a class holding the information about each 'Part' or whatever it is. You will then just need a collection of Parts.

  • Sending/receiving email with long lines of text.

    Using mail with yahoo plus. Composed emails have long lines of text. Recipients complain that they have to scroll left to right to view them. Not so on a PC with Outlook, anyone know of a solution to this. Thanks

    Hi Chris,
    Thanks for the response. No, there were no rules set, but your query gave me ideas. I'd never been in the rules section before, but I played with it for a while with some trial and error and finally made a rule that set all the emails to show with black text, and duplicated it for all the mailboxes, and voila! there were all the emails listed in black text.
    While I'm sure there are more effective ways of writing a rule, my rule worked fine. I had it say that if "any" of the following conditions are met: "From" "Contains" "@", perform the following actions: "Set color" "of text" "Other [black]" and applied it to the mailbox.
    Thanks for the spark of the idea.
    Gail

  • OS X Mail long lines of text don't re-flow

    Using Mail in OS 10.4.11 when I receive emails from some clients they include disclaimers etc. which do not re-flow to the width of the email window. Consequently when I print the email the whole of the long line is fitted across the page making the text of the message too small to read. Even changing the page orientation doesn't make the text readable. Anyone have any suggestions?

    To add more; I first noticed this 2 days ago and reported it to Apple. When I did notice it, I went to preferences and changed how many lines of the content preview shows, then I closed the message view column and expanded the preview column as wide as I could get it. On one of the messages, it kept continuing after it ran out of space in the preview, for a running total of at least 100 words. Even then, in the actual message viewer, it only showed 1 complete message of about 25 words.

  • Post 21CN WBC Experiences - Long Line?

    Hi
    My rural exchange is due for 21CN WBC upgrade this June
    I was wondering if anyone has had a good experience following this type of upgrade -  specifically on a long line
    The 'experts' claim there will be no positive impact for low speed long line sufferers but interested to hear from anyone with 'real life' experience of this
    My stats:
    Sync around 1.3meg
    D/Load around 900k
    U/Load around 280k
    snr down 6db
    Line Att 74db
    Router/modem BT 2Wire 2700
    Faceplate fitted

    big difference from 55 to 74 though  a 1.3mb connection with 74 attenuation is good
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • How to increase your speed on long lines

    After 4 engineer visits and everyone saying that at 1300m from the cabinet 12mb was going to be the best speed I could get I have found a way to nearly double my speed. Dumped the homehub5 and replaced it with a Billion 8800NL and now have a steady 21.5mb and not one dropped connection.
    So if you are on a longer line its worth a try for £68 from Amazon.
    Thought I would share this as I found it so frustrating that I could get nowhere near the speed I was sold now im just 1mb away from the lower estimate so I can live with that.

    That's an amazing speed for your attenuation
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

Maybe you are looking for