Can Netbeans put a jar file In a jar file?

I just went through the process of getting Eclipse to create a jar file that would execute from a command prompt using a plugin called fatjar :
http://fjep.sourceforge.net/
Details from other thread :http://forum.java.sun.com/thread.jspa?threadID=5219638&tstart=0
I really would like to use netbeans but i now have the exact same problem trying to make a jar file in netbeans 5.5.1
I am using a package from icaste.com It has a
.dll file to put in the windows directory
JCommSerial_3_0.jar file that contains all the classes
I can compile and run a file in the IDE and it works fine
The Jar file does not contain the classes so i get errors when running from command line.
Here is the layout of my screen and result of run command in IDE
http://www.acousticlights.com/netbeans.png
What do I need to try?

georgemc wrote:
Why is everyone so obsessed with doing this? The gains are minimal and the problems numerousBecause we are new and don't understand how the java VM actually runs code and the error messages sent by the java machine are cryptic.
My first attempt at using an external jar in a java program lead me to believe that all of the code for a java program would be in a jar file including external jar files, after all the JDK standard library has tons of jars in it so I assumed the external jar file would be linked (as most other programming compiler/linkers I have worked with in my top down programming life).
I find out the answer is so simple that the external jar file could not be found by the VM running my jar file. Like I said, if the VM would have just gave me an error that it could not find a file on a specific directory i never would have perused the idea of jar in a jar (fatjar plugin for Eclipse for example)
Really this is like getting into a race car and not knowing at what RPM to shift gears, sure you can press the pedal and make it go but if you don't understand how it works under the hood you are going to blow the engine if you keep it in first gear.
I have read many posts on these errors, the reason is the error message is just not very descriptive of the original problem. If I try and open a database called xyz.dbf that has one field defined as lastname, in C for example, I would not give the error message "Lastname could not be found) when indeed the lastname could not be found but the reason it could not be found was because the database xyz.dbf could not be found. Further , adding to the error message that the system is looking for xyz.dbf on drive X- subdirectory -mydatabases would complete the error message and allow the user to fix the error. Just what is a non java programmer that is using my java program suppose to do with an Ecception Error in (main) bla bla bla... I know now I need to check for library files myself within my own java programs and give a better error message to the user before the java VM sends out it's cryptic message.
Edited by: metron9 on Sep 25, 2007 11:00 AM

Similar Messages

  • In one product can we put multiple swcv? In idoc to file

    in one product can we put multiple swcv? In idoc to file  thanq

    hi krish,
    SAP R/3 is a product....
    one product can have multiople components....
    so u can define many SWCV's and define usage dependecies between those.....
    sasi
    <b>Reward with points if helpful</b>....

  • How can i put a system.out.println into txt file

    i want to generate a txt file instead of system.out.println. for the output How can i do that and what code can i use for that??
    Edited by: crystalarun on Oct 14, 2007 11:40 AM

    suppose u ant output in "Output.txt"
    then code can be
    PrintStream out = new PrintStream(new FileOutputStream("Output.txt"));
    System.setOut(out)

  • How can I put my songs on my IPod into files?

    Is there a way that I can do that? I just want my comedy on one file, latin on another, rock on another etc. how can I do that? Thank you Liz

    I'm not quite sure what you want, but try making playlists for different genres (comedy, latin, etc).
    Then tell your iPod opions to update, using those playlists.

  • How can we put the leading zeros for the extract file.

    hello experts..
           Iam extracting values from one ztable in this for one filed length will be 2, for this field i need leading zero s at the time of extract... please help me....

    Hi,
    Declare the field as NUMC data type, automatically you will get the leading zeroes.
    Regards,
    Subramanian

  • How can i put Jar Files in Java Runtime.?

    HI,
    how can i put jar files in JRE so that they are accessible every where.? is there some way.?
    Regards,
    AA

    Closest you could get to this I think is to explode all your jars into the same parent directory. Then if you put that directory on the classpath, you should be able to access all classes in all jar files

  • Netbeans 551: Include all libs in project jar file. Possible?

    Is it possible to manually, or automaticly, include the /dist/lib directory into my "GonioLabt,jar" to make it more 'stand alone', file wise.
    Netbeans generates this dist/README.TXT
    ========================
    BUILD OUTPUT DESCRIPTION
    ========================
    When you build an Java application project that has a main class, the IDE
    automatically copies all of the JAR
    files on the projects classpath to your projects dist/lib folder. The IDE
    also adds each of the JAR files to the Class-Path element in the application
    JAR files manifest file (MANIFEST.MF).
    To run the project from the command line, go to the dist folder and
    type the following:
    java -jar "GonioLab.jar"
    To distribute this project, zip up the dist folder (including the lib folder)
    and distribute the ZIP file.
    Notes:
    * If two JAR files on the project classpath have the same name, only the first
    JAR file is copied to the lib folder.
    * If the classpath contains a folder of classes or resources, none of the
    classpath elements are copied to the dist folder.
    * If a library on the projects classpath also has a Class-Path element
    specified in the manifest,the content of the Class-Path element has to be on
    the projects runtime path.
    * To set a main class in a standard Java project, right-click the project node
    in the Projects window and choose Properties. Then click Run and enter the
    class name in the Main Class field. Alternatively, you can manually type the
    class name in the manifest Main-Class element.

    Yes it is possible. The same question has been
    killing me all day. Here is how I did it.
    (I'm on Mac OS 10.4, but this should work anywhere)
    Netbeans produces the following:
    dist/myJar.jar
    dist/lib/swing-layout-1.0.jar
    I would prefer to have only:
    dist/myJar.jar
    But, as you know, myJar.jar requires the class files
    stored in swing-layout-1.0.jar. I unpacked the jar
    files and examined the manifest files. Here is how to
    unpack and repack the jar files into a single jar
    file:
    First, I renamed myJar.jar to myJar.zip and let OS X
    unarchive the jar for me. I did the same for
    swing-layout-1.0.jar.
    I then dropped the MANIFEST.MF file from
    MyJar/META-INF/ into a new folder on my harddrive
    Then, I dropped the package (its a folder full of
    class files) from MyJar/ into the same new folder on
    my harddrive.
    At this point, the new folder contains:
    /newFolder/MANIFEST.MF
    /newFolder/myPackage/
    Then, I grabbed /dist/lib/swing-layout-1.0/org/ and
    dropped that into the new folder.
    We now have in the new folder:
    /newFolder/MANIFEST.MF
    /newFolder/myPackage/
    /newFolder/org/
    Almost done:
    Open the MANIFEST.MF file with a text editor. Mine
    looked like this:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.5
    Created-By: 1.5.0_07-87 ("Apple Computer, Inc.")
    Main-Class: ohm.GUI
    Class-Path: lib/swing-layout-1.0.jar
    X-COMMENT: Main-Class will be added automatically by
    build
    I replaced the ENTIRE contents of the file with
    this:
    Manifest-Version: 1.0
    Main-Class: myPackage/Main
    Where 'myPackage' is the folder containing my class
    files, and 'Main' is the class containing the
    'main(String[] args) method.
    Save the file and we're ready to repack the archive.
    Open the command line (in OS X this is the Terminal)
    I assume the syntax is the same in windoze; Navigate
    to the new folder you created.
    In OSX: cd /newFolder
    in windoze: cd \newFolder
    Then use java's jar command:
    jar cmf MANIFEST.MF MyJar.jar *
    What this does:
    jar is the command. cmf are flags: the 'c' is for
    creating a new jar archive, the 'm' is to specify a
    premade manifest file, the 'f' tells jar to write the
    results to a file. MyJar.jar is the name you have
    chosen for the resulting .jar file. the '*' is a
    wildcard character that tells jar to put every file
    in the present working directory into the new .jar
    Thats it! This produced myJar.jar which worked fine
    by itself, as it included all the classes from
    swing-layout-1.0.jar. It would be a trivial matter to
    write a shell script to do all this for you, unless
    of course you use something silly like windows, in
    which case you'll have to write a batch file or use
    python or something. Good luck, I hope this saves
    others time, drop me a e-mail if this was at all
    confusing! [email protected]
    You should be aware that doing this may well violate the licensing terms for third-party libraries
    By the way, what's silly about using Windows? Are you saying you don't develop for Windows because it's "silly"?

  • Creating a JAR in Eclipse...can't access files in the JAR properly.

    Hi all! I'm a newbie at JAR creation, and am having troubles. I have a project that loads images from image files in my project. I can create the JAR and all, and it runs, but the buttons that have ImageIcons with those IO loaded images are blank. I've tried to include the images when creating the JAR, but it keeps acting like the images never existed. When I run the JAR and have the images separately included in the directory (instead of packing them up too), it won't work as well...UNLESS those images are put in my $HOME directory (Linux).
    Does anyone know how I can properly refer to the images that I'm trying to pack into the JAR from within the JAR? Or, is there a way for the JAR to understand where those images are supposed to be (redirect the focus from the $HOME directory to the JAR's directory)? Any help would be greatly appreciated! :)
    -Keith

    Hi,
    Can the user execute the program through explorer? In Windows Server 2003, the Users group does not have Read and Execute permissions to the command processor (Cmd.exe). 
    You could refer to the article below to resolve the issue:
    "Access is denied" error message when you run a batch job on a Windows Server 2003-based computer
    http://support.microsoft.com/kb/867466
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Can't find file in a jar

    I have an mp3 file in my jar and I access it by doing:
    FileInputStream fis = new FileInputStream("Track_4.mp3");
    I know that this is the exact name of the file for two reasons:
    1. It said it was in the verbose output when i created the jar.
    2. I created a mini-test program with the same chunk of code and it worked.
    The difference between the test-program and my real application is that the test program contained: Test.class Track_4.mp3 and MP3Player
    The application's class that gets the stream for the mp3 is inside a bunch of folder: client/util/SoundControl.class
    I put Track_4.mp3 inside the util/ folder and it doesnt work!
    java.io.FileNotFoundException: Track_4.mp3 (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at client.util.SoundControl.playMP3(SoundControl.java:109)
         at client.util.SoundControl.playSoundtrack(SoundControl.java:104)
         at client.battle.GameMaster.run(GameMaster.java:264)
    Is there a way I can like find out what directory the FileInputStream is trying to load? or another solution?
    THanks

    I'm not sure I understand what you're describing. If the mp3 is an entry in a jar, then it's not a file at all. Use Resources to load it (as in, Class.getResourceAsStream).

  • How can  I include my database file into my jar file?

    Hi,
    I am doing several tests for the jar command....
    I tried to put the database file into my jar file, but when the program run, it just couldn't find the database file, so how may I include the database file into the jar file? Not only that, it also can't find the policy file etc.

    sorry, I think I found the solution, I should have had read the API more carefully.

  • How can I put OSX 10.7 on a new Macbook Air. Maverick no longer allows "open file in a new window" and I really miss it. At the Apple Store they told me it can't be added to the new OSX 10.10 so I  want to change the OSX on the new Macbook Air and it

    I have been using a 2012 Mac pro to do HD video editing. I bought a new portable Macbook Air only to find that Maverick no longer has "open files in a new window" which I use all the time in the very large folders of video clips and royalty-free music. I asked at the Apple Store how I could get this back on the Macbook Air and they said it couldn't be done so I thought I would re-format the HD and install 10.7 on it and was notified by the Macbook Air I can't put 10.7 on that computer. Apple use to give this as an option but now they have gone more to the attitude of "Do it our way or go to ****!" In anger I went out and bought a Dell Laptop and Pinnacle Studio 17 which I have been learning to use. I have been an Apple/Mac user since 1979 and would still rather do my video editing on a Mac. Is there any way that I can force the Macbook Air to let me load in OSX 10.7 where there is still the option to  "open files in a new window" or is there a way to add this to Maverick? The experts at the Madison, WI Couldn't give me any help on this.

    Choose Preferences from the Finder menu, click on the General tab, and uncheck the box to open folders in a new tab.
    (117195)

  • I have put all the education apps in one file on my iPad is there a way to lock that file when I open it so that my niece can not leave that file

    I have put all the education apps in one file and would like to be able to lock it when it is opened to keep my niece from going other places, does anyone know if this can be done and if so how?

    Maybe you can let her play on your computer where it may be easier to restrict what she can do, provided there's an OS X equivalent. Of course supervision is probably the safest solution until she is old enough to understand she shouldn't do anything that's not permitted. But then she'd probably be old enough not to need to learn her ABSs.

  • My entire music library (purchased and my own) can't be put onto my itouch.  All these files have a little explanation point next to it.  When I click on it to play it it says file could not be found.  How do I get my music back?

    I've downloaded a normal software upgrade and now my computer doesn't recognize that my music files are mine....I guess.  Itunes library has tons of songs that I've either downloaded from disc or purchased from itunes.  Now, they all have this little explanation point next to the file name.  Can't put them on my itouch and can't play them on the computer.
    Tried to ask apple to help...they want $29.  I don't understand...I was simply upgrading my itouch with their software updates and now this.  Had the same problem with my apps.  Had to redownload all of them individually.  Didn't have to pay for them again.  They, too, had the little explanation mark next to them.
    Help me.
    I'm music-less.
    Kathy

    Ok, I had a glitch, forced to restart, and lost my train of thought.
    Reinstalling iTunes should fix the major issue that might have gone wrong, perhaps your explaination points will disappear and everything will be peachy again.
    But if they don't, you can open the XML file in iTunes Folder using a Text edit program to see what the common pathname is to the iTunes Music folder or where your content is located.
    If you moved the itunes folder, it needs to go back.
    I can't  download iTunes to my Vista virtual machine to test it out right now because iTunes is down, so I can't verify the pathname, perhaps your issue and the iTunes being down are related somehow?
    You don't want to import all your music again, but it's a option, but you lose all your playlists, that's what I'm trying to recover.
    If oyu don't have a whole lot of playlists, then simply select all the explaimation point music and delete, select File from the menu and import your itunes folder again.

  • Please can someone tell me how to save a MP3 file from my email on my iPad so I can put in on Facebook? Thankyou

    Please can someone tell me how to save a MP3 file from my email on my iPad so I can put it on Faceboo? I use hotmail and please tell me step by step as I am not a tech guru lol. Thankyou

    Hi jscher200,
    Thank you for your reply, sorry for the VERY late late response, but I have just figured out how to control this separate 'panel'. I find it really useful for monitoring Google Analytics in as it can just sit there running. It does have its limitations, as it's a limited size (you can't expand it to full screen view), so you can only ever see a vertical section of a website and need to scroll to look to the right or left, but I have the live view of people accessing my website running on there and if the numbers start racking up at any time, I can scroll to look and see what pages they are accessing, where they've been referred from, etc.
    To get it to work, you save a website address in the Bookmarks Toolbar and when you can see it sitting on the toolbar at the top of the screen with its little icon, right click on it then click 'properties', then tick the box 'Load this bookmark in the sidebar'. The next time you click on this bookmark to open the website, it will load in this sidebar, which looks like a separate 'window' but is immovable. You can only have one sidebar application running at a time, but can change it by right clicking on the bookmark you want to load in there and it will then change to that one next time you click on that bookmark.
    I hope this might be useful to others, as I asked for help with this on loads of forums and not one person knew that this existed - even really skilled techies!

  • Hello Guys. I had problems in the Computer before and changed my HD. I saved in my all files documents in (Time Capsule). How can I put all my files, pictures documents on my new HD? Please Help. Thank You

    Hello Guys.
    I had problems in the Computer before and changed my HD. I saved in my all files documents in (Time Capsule). How can I put all my files, pictures documents on my new HD?
    Please Help.
    Thank You
    Julio Skov

    Hey
    Thank you very much for replay.
    Would you explain to me how can I do?
    I don't really understand these processes.
    Thak you very much
    Julio

Maybe you are looking for

  • Could you please help me understand the logic behind certain things in OSX?

    Ok, so I try to be an open-minded guy, and I bear no particular allegiance to either OS. I own a Sony TZ and a Mac mini, and my wife has a MacBook Pro. I use both Oses. There are certain things I have trouble understanding in th Mac OS, so what I'd r

  • ITunes Remote used to work with my iPod Touch...now not so much!

    Hello. I was using iTunes Remote on my iPod Touch a couple of weeks ago with no problem. Now, when I try to use it, iTunes does not seem to see the iPod via the wireless network. I'm running iTunes 9.2.1 and iOS4 on the iPod...I think I upgraded both

  • How can I reduce wind noise in Final Cut Pro X?

    The footage has been shot.  I used a Sony HDR-SR12 for the footage.  We were shooting outside in what was almost a wind tunnel it seemed. I have only just started into FCPx with no other experience.  The only other production software I have is Garag

  • In AE CS6 I have 2 3D text layers swapping poition as the camera pulls back from them.

    In AE CS6 I have 2 3D text layers swapping poition as the camera pulls back from them. One layer has a blur added and if I switch off the fx then they stay in the correct order. The whole comp consists of 25 tiles (2500x2500px) laid out in 3D as a su

  • Date in PO

    Hi,      In PO we have date format before the delivery date which indicates whether the delivery date is to be entered and displayed as a calendar day, week or month. Following formats are in SAP: 1     Day format     Day          Day 2     Week form