Help with jars webstart and InputStream

I am currently attempting to fix all the things that break
the minute you attempt to use a jar under webstart.
I have attempted to find an answer by searching the forums.
I cannot determine how to overcome the following.
I have third party jars for "Jasper reports" and the loadReport
function requires a java.io.InputStream as input.
"public static JasperReport loadReport(java.io.InputStream inputStream) throws JRException"
The report templates are in my jar file in a sub directory "\sreports".
I was loading the template with the following code.
JasperReport template = JasperManager.loadReport(new FileInputStream(reportFile));
Where
String reportFile = ".\\sreports\\Std"+tableName+".jasper";
I have tried several things including below.
FileInputStream fs = new FileInputStream(getClass().getResource("sreports/StdEquipmentType.jasper"));
which does not even complile.
Rykk

Get your input stream like:
InputStream in = getClass().getResourceAsStream("path/to/file.txt");
note that you use "/" and not "\" or "\\" no matter what OS you are using.

Similar Messages

  • Help with jar files and running them

    I have been trying to figure out how to run executable java files, now I have heard that a million and one people have asked this already. Though when I see the answer to these questions I am still quite confused, I would like to understand some things. First thing is how do you even save your java code as a jar file. Secondly, what is a jar file. Thirdly, I have seen many people talking about batch files, what are they? And finally, I have used many "wrappers" and I still cannot get it to work. Plz help

    A quick google search gave me [url http://neptune.netcomp.monash.edu.au/JavaHelp/howto/jar.htm]this website about jars.

  • Need help with Blog, Wiki and Gallery

    Hi Team,
    Need help with Blog, Wiki and Gallery startup. I have newly started visiting forums and quite interested to contribute towards these areas also.
    Please help.
    Thanks,
    Santosh Singh
    Santosh Singh

    Hello Santhosh,
    Blog is for Microsoft employees only. However, you can contribute towards WIKI and GALLERY using the below links.
    http://social.technet.microsoft.com/wiki/
    http://gallery.technet.microsoft.com/

  • What's the phone number I should call for help with my iPhone and ihome dock?

    What's the phone number I should call for help with my iPhone and ihome dock?

    http://www.ihomeaudio.com/support/

  • Help with photoshop quitting and AMD graphics

    help with photoshop quitting and AMD graphics
    im not a techy, but it appears i have to do someting with my amd graphics card - this might be why my software is crashing - ive no idea what to do though

    Hi Chris
    I have tried to go on the website, then i tried to download the automatic detect because i wasnt sure which driver i had or needed - but it has just downloaded a load of game software - which i dont want ( i dont think)
    i have find out my laptop has a amd radeon HD 8750M card, but i dont know what im doing! i would hate to mess my computer up as i am in thailand with no one to help me!
    its frustrating as i am paying for CC but cant use it!

  • Need a little help with JAR creation

    I've created a JAVA program with the Forte IDE and now I want to make it executable without the IDE. I read on this forum that all I had to do was create a JAR file, so I tried but I get an error (see below). Could someone point out my error please.
    Directory Tree:
    vio082\vio\app\
    DOS command to create executable JAR:
    "java -jar cmf trackerManifest.txt trackerTest.jar trackerTest.Class"
    ERROR I RECEIVED:
    "Exception in thread "main" java.util.zip.ZipException: The system cannot find the file specified
         at java.util.zip.ZipFile.open<Native Method>
         at java.util.zip.ZipFile.<init><Unknown Source>
         at java.util.zip.ZipFile.<init><Unknown Source>
         at java.util.zip.ZipFile.<init><Unknown Source>"
    This was my file trackerManifest.txt:
    Main Class: trackerTest
    [cr]
    This is the begining of my file trackerTest.Class:
    package vio.app;
    import javax.comm.*;
    import vio.tracker.*;
    import java.net.*;
    import java.io.*;
    public class trackerTest {
         public static void main (String argv[]) {

    Thanks for the help so far. My first problem was that the directory with the "jar" command was not in my path (now that fixed). My application still won't execute and I think it has to do with the following:
    My application uses the serial port to communicate with a device and uses a socket server to communicate with a C++ program. The following JAVA utilities are imported to make my application work:
    javax.comm.
    java.net.
    ijava.io.
    If I use the command:
    "jar cvfm trackerTest.jar trackerManifest.txt trackerTest.Class"
    will the appropriate files from javax.comm, java.net and ijava.io also be incorporated into the jar file? If not, how are they made available when I distribute my jar to other users?
    Second question:
    Should I be using:
    "jar cvfm trackerTest.jar trackerManifest.txt vio082/*.*"
    to capture all the other classes required by my package that are in other directories above and below the trackerTest.class directory?
    Any help is greatly appreciated.
    JAM

  • Please Help With Jar File

    I have a jar file named Helper.jar with
    com.xyz.util.Helper.class in it.
    Now I have a SrcFile.java that
    imports com.xyz.util.Helper;
    It compiles fine with:
    java -classpath Helper.jar;. SrcFile.java
    ...and runs fine with:
    java -cp Helper.jar;. SrcFile
    When I jar it with:
    jar cvfm SrcFile.jar SrcFile.mf *.class
    ...and run it with:
    java -cp Helper.jar;. -jar SrcFile.jar
    I get the following exception:
    java.lang.NoClassDefFoundError: com/xyz/util/Helper
    ...but yet, Helpler.jar runs fine with:
    java -jar Helper.jar
    Does anyone have any idea what I am doing wrong or
    do I have to un-jar the Helper.jar file and
    re-jar SrcFile.jar with all the .class files?

    I've replied to this same thread in the New To Java Technology fourm, see there for a suggestion.

  • Help with RMI tutorial (and Eclipse)

    Hi!
    I need a little help with RMI tutorial. I have all source files from tutorial downloaded, but I never did anything like this and don't know, how to run it. I somehow did Building a JAR File of Interface Classes from [http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/rmi/compiling.html], but got stuck on simple HTTP server, I didn't understand, what to do.
    Bonus question: is it possible to do those commands from Eclipse? How?
    Thanks a lot!

    It seems that the example provided (in the link) requires a web serverNo it doesn't. It requires an HTTP server.
    tomcat will be a better option which you can useThe Apache HTTP server might be more to the point.
    But If you are new to RMI and need to understand the exact flow of RMI I think this will not be a better exercise to start withI agree. I would get it running without the codebase feature. This isn't as widely used as you might think, and anyway it is a deployment option not something you need to engage with much when developing.
    @OP: ignore the HTTP stuff and the codebase feature and build 3 JAR files:
    (a) the common stuff (remote interface, stubs if any, and any classes referecned by the remote interface)
    (b) the server (the remote object itself and anything server-side it uses)
    (c) the client.
    The common JAR file should be deployed to both the server and the client, and both the other JARs should name it in their Class-Path entry in the manifest.

  • Need help with Boot Camp and Win 7

    I have iMac 27" (iMac11,1) 2.8 GHz, quad core, 8MB of L3, 8GB of Memory, Boot ROM Version IM111.0034.B02 and SMC Version 1.54f36 and can't get this machine to run Windows 7 using Boot Camp.  I have successfully loaded Win 7 but when it claims to be starting I only get a black screen after initial start up.
    I have checked and rechecked my software updates and have read and reread the instructions, however, I can't update my Boot Camp to 3.1 (my machine says i'm running 3.0.4) and I need 3.1 but can't load 3.1 because it is an exe file that has to be loaded into Windows after I load Windows but can't open Windows because I can't load Boot Camp 3.1.  That's my excuse anyway, so I'm missing something I just can't figure out what it is....this is where you come in!
    Thanks.
    Mike

    Mike,
    I'm not going to be much help with Boot Camp however I can direct you to the Boot Camp forum where there are more people that know how to troubleshoot it and Windoze 7. You can find it at:
    https://discussions.apple.com/community/windows_software/boot_camp
    Roger

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

  • Hello I have a few questions and I need some help with my iTunes and  iPod

    Hello iTunes people.
    I have a little problem with my iTunes. I actually almost know nothing about iTunes really. But I have had a 80 gig ipod .. ummm I think it's a iPod classic maybe. A long time ago I just downloaded iTunes. I think one of my tech friends already had put the program onto my PC so I did not even have to download it. Anyways I put my life's collection of mp3's onto iTunes and then syncs it with my iPod and it worked great. Here is my problem. I just recently bought a MONSTER PC. I have lovingly named it " ED209 " I downloaded iTunes for it and I have the most up to date version.8.1.1 is the most current version correct? Ok well here is my problem. What I want to do is I want to put everything that is currently on my iPod ONTO the iTunes library. I DO NOT want to import anything from the library or playlist or whatever you call it ONTO the iPod because there is nothing in the library. Now this is were its gets weird and possibly silly. A person I was chatting with on Facebook sort of made fun of me because she was like " Dude! Just push " Sync " But the reason I am paranoid is because THIS is the message I get....
    " The iPod " Aaron's iPod " is synced with another iTunes library. Do you want to erase this ipod and sync with this iTunes library? "
    HOLY COW!! That girl on Facebook was making fun of me but READ THAT. That exactly says ERASE the "iPod" and Sync with THIS library " It does not say put what is ON the iPod into THIS Library. It says it the other way around. Clear as day it says it will ERASE the " Ipod " it does not say " Fill the library with whats on your iPod "
    Do I all of a sudden not understand English or something???? I know how to freaking read and from what it says is sounds a 100 percent like " we will ERASE youe iPod and put everything from this playist or library onto your iPiod" But there is NOTHING in my library? Am I mentally challenged or what?
    I hope someone can help me here and I have another request. Could someone just tell me all the cool things I can do with iTunes and my iPod? I am trying to read the help files and the FAQ and whatever else Apple provides you with but it has SO MUCH crap that looks usless. I find myself reading a whole paragraph about some simple little section of s section of a section of a feature! Know what I mean. Someone give me the long and short of the neat things I can do with this stuff. I have windows Vista with a wicked computer that has like 6 gigs of ram and m iPod is a 80 GB Classic
    help !!
    PROTEUS

    *What I want to do is I want to put everything that is currently on my iPod ONTO the iTunes library.*
    1). Connect your iPod to your computer. When you get the message that it is linked to a different library and asking if you want to link to this one and replace all your songs etc, press "Cancel". Pressing "Erase and Sync" will irretrievably remove all the songs from your iPod.
    2). When your iPod appears in the iTunes source list change the update setting to manual, that will let you continue to use your iPod without the risk of accidentally erasing it. Check the "manually manage music and videos" box in Summary then press the Apply button. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default: Managing content manually on iPod and iPhone
    3). Once you are connected and your iPod is safely in manual mode there are a few things you can do to restore your iTunes from the iPod. iTunes will only let you copy your purchases directly from an iPod to the computer, you'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
    For everything else (music from CDs, other downloads and including iTunes purchases) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. You can read reviews and comparisons of some of them here:
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    A selection of iPod to iTunes utilities:
    TuneJack Windows Only (iPhone and iPod Touch compatible)
    SharePod Windows Only (iPhone and iPod Touch compatible)
    iPod2PC Windows Only
    iDump Windows Only
    YamiPod Mac and Windows
    iPod Music Liberator Mac & Windows
    Floola Mac & Windows
    iPodRip Mac & Windows (iPhone and iPod Touch compatible)
    iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
    Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
    There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide
    4). Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync.
    5). I would also advise that you get yourself an external hard drive and back your stuff up, relying on an iPod as your sole backup is not a good idea and external drives are comparatively inexpensive these days, you can get loads of storage for a reasonable outlay: Back up your iTunes library by copying to an external hard drive

  • Can you please help with importing CDs and audio books?

    I tried to search for this topic, but had no luck.
    Have been happy with IPOD until today. On trying to import a new audio book to iTunes and then updating IPOD to install on it, I can see the title in both the iTunes Library and menu of IPOD. However, instead of seeing a normal 57:32 (or similar stop time), I am seeing 789:57:13.152. When I try to play it through iTunes or IPOD, it skips it as if it wasn't there and plays something else. I checked out importing a music CD, and find the same problem.
    Appreciate any advice you can give.
    Dell   Windows XP   Itunes 6.0

    However, instead of seeing a normal 57:32 (or similar stop time), I am seeing 789:57:13.152. When I try to play it through iTunes or IPOD, it skips it as if it wasn't there and plays something else. I checked out importing a music CD, and find the same problem.
    let's first see if you can get the CDs to import normally if you switch off "error correction" in the iTunes Advanced-Importing preferences subtab.
    but if no joy there, try checking through the other suggestions from the following document:
    You can't import or play music from an audio CD in iTunes for Windows
    ... and these resources might be helpful with that:
    Using CD Diagnostics in iTunes for Windows to troubleshoot CD/DVD drive issues
    iTunes for Windows: Updating the firmware on your CD or DVD drive
    Updating the drivers on your Windows PC
    Where to find firmware for your CD/DVD drive

  • Help with my ipod and USB!! PLEASE!!

    I have recently had to re-install a new ( genuine ) copy of Windows XP, and now my ipod is not being recognised by my USB ports, it states that no drivers have been installed, I have re-installed my installation disc and itunes 3 times now but still no luck!!
    I have also tested ALL of my USB ports with other devices and they work fine!
    Someone help me please!!
    Lee.

    Check these out:
    iPod Does Not Appear in My Computer
    iPod Appears in Windows but not in iTunes
    I hope this helps, post back!

  • Help with computer setup and PP settings for faster/better previews

    I have been using Cyberlink PowerDirector software for video editing.  It is very easy to use and can do quite a bit.  It was also accelerated by Intel HD graphics built into my system, so I could see a lot of my work at a pretty high resolution in real time.
    However, I wanted to see what PP was capable of, specifically the Warp Stabilizer.
    So I downloaded PP and have been trying to use it, but it was just slow as heck to preview anything (chop stop chop stop...), with render times being insanely long (12 hours for five minutes of footage vs. about 30 minutes with PowerDirector).
    Thinking it was a problem with my system and I needed to get a real graphics card, I got an EVGA GTX 670 (FTW) for $400, and popped it in.  I modified the text file so PP would see it as a compatible card, opened up PP and changed the engine to the new card. 
    Things are faster, but I was expecting a lot more.  Here's what I'm doing:
    1. Shooting Canon 5D mark II (now III) clips 20-60 seconds long, 1080p.
    2. Import to PP and sequence them.
    3. Adding effects:
         A. Top adjustment layer for fast color correction (white balance)
         B. Next adjustment layer: 3-way color, shadow/highlight, unsharp mask, fast blur
         C. Video 1 layer has the clips with warp stabilizer applied to each, and dissolves.
    My final output will be 720p.  ( I shoot 1080p so the Warp Stabilizer will have more to work with, and I can crop without feeling like I'm degrading quality).
    My system: i7 2600k, 16GB RAM, GTX 670 graphics, 120GB SSD "Max IOPS", 2TB 7200rpm internal, 2TB 7200rpm external (USB 2.0, backup drive).
    I can currently preview at 1/4 res in realtime.  I would really like to be able to get to 1/2 res (of course full would be great).  One thing that worries me is that GPU-Z indicates that my GPU is only running at about 2% while previewing, while CPU usage is at around 50%.  I was under the impression that the Mercury thing would use GPU/CUDA to process previews and effects that are supported (that includes Warp Stabilizer).
    I've looked at Sequence Settings and fiddled with Preview File Format and size, but that doesn't seem to do anything.  I'm currently looking around at codecs (Cineform, DNxHD), but don't know if those can help.
    What settings should I alter to get better previews? 

    Well I'm still pretty clueless about this, but for anyone who is looking at this and wondering, here's what I've gleaned:
    1.  After Effects, especially CS6, makes much more and better use of graphics cards than does Premiere Pro.  I'm guessing that PP will, in future versions, make better use of them.  For now, no need to spend more than a couple hundred bucks on one.
    2.  Update the software.  PP and AE both performed substantially better after installing the .01 update from adobe.  After you install the update, be sure to re-do the CUDA hack, if necessary.
    3.  As it stands, money for a PP system is best spent on a processor, as in the newest Intel (currently Ivy Bridge), and overclocked.  This is where performance happens.  I'd say on a 2012 system, 16 GB RAM should be considered a minimum for video editing, and 24 or 32 if you can afford it.  More than that probably won't be utilized.  Hard disks can affect performance, but I don't think it's a bottleneck unless you're doing something that requires VERY fast/large reads and writes (4k source?).  Most people who have high-end editing stations also have a bunch of drives in RAID, but if you look at the performance chart, the SECOND highest scoring tester did not use RAID (though did use a presumably fast and large SSD).
    Keep in mind that all of this has to do with RENDER speeds.  I still don't know what the bottleneck is for PREVIEWS, but I'm just going to assume it's the same.

  • Need help with Apps misbehaving and upgrading the MacOS: The all-in-one post. ;)

    Hi there,
    So, I've been browsing the SL and Mavericks forums for the last days but although I have fetched some useful tips and answers, still need some help. Let me put it diary-style so I can be more concise ;)
    Here's my current system profile:
    iMac 27" (aluminium back- if I'm no wrong, from around late 2009-mid 2010)
    MacOS 10.6.1 Never updated.
    3.06 Ghz Intel Core2 Duo
    4Gb RAM
    LaCie Big Disk via FireWire 800
    Internet access via Ethernet port (cable)
    And here's The Issues Log:
    – Day one: First ever Kernel Panic. Restart. Nothing (apparently) wrong.
    – 3 weeks elapsed: Second Kernel Panic. Same. iMac restarts fine. Apps fine. No missing files. No misbehaviour experiences.
    – After a month or so: One morning, Skype decides on its own to stop launching. The night before, I chatted with one of my clients, fine as always, but at the next day, nothing. Computer is usually shut off for the night. And so it was that night. Updated Skype and also did all the guest account trick / repaired permissions / repair ACLs. Nothing worked. Overwrote the Skype app with a former functioning version I have in an MacOS 10.5 system. Didn't work. Now I have to chat on the MacOS 10.5 computer. No good.
    – 15 days ago or so: After realising that I no longer have my HP1515n printer (it ran out of inks and thrashed it. It costs more to refill than to buy a new one), I deleted the printer from the printers list in the System Prefs Pane.
    – Last week: Acrobat (CS4) won't launch a PDF file and freezes. Spinning beach ball. Force quit and try opening the PDF file again. Freezes again. And again. And again. With that file and every other PDF.
    Photoshop CS5 fails to open or crashes when attempting to open any jpg or tiff file. InDesign and Illustrator CS5 are frozen and had to force quit both. MacOS 10.5
    Restart the iMac thinking it is just a "common" bad day and hoping everything will be alright after the restart, but nope.
    Not only the CS5 stops working; MSOffice stops working too. Spinning beach ball. Begin to suspect of the deletion of the printer, however, I also deleted the same printer in the above mentioned 10.5 system and I'm not experiencing anything strange. Reinstalled the HP drivers but nothing remarkable happens.
    Then, try to uninstall CS5, CS4, Office, etc. Try to reinstall Acrobat CS4 and the CS5 apps. Reinstall Office. Nothing. Just Outlook works.
    Since I had to desperately meet deadlines, convinced a colleague to come over to the studio and -I know, I know- allowed me to install a copy of CS6. It seems to work fine, except for Acrobat, which randomly freezes/hangs/works and Photoshop, which works fine unless you want to open a layered file containing text layers or if you want to type text on a normal file, because it freezes as soon as the Text Tool is pressed in the toolbar, of course, spinning beach ball again.
    Well, Illustrator CS6 sometimes shows a strange black thin frame overlaid on the interface but goes away by switching to another workspace and then back to the current. InDesign CS6 seems to be fine and making PDFs as expected. However, as I said before, it is pure luck if Acrobat accepts to open the file or even if it launches. Spinning beach ball when freezing/hanging.  
    As a method for eliminating possible culprits, did a clean up of the Suitcase Fusion database, removed duplicate and a few (less than 10) corrupted fonts.
    Removed completely MSOffice reinstalled and updated. Nothing. Now I neither have MSoffice running.
    I am no rookie but I can't even imagine what can cause such amount of misbehaviour, (kernel panics have something to do? malware? lack of system updates? MacHD is damaged?) so I'm thinking of a few scenarios:
    Backing up my projects and user folder –anything else to backup? (In fact I've already done that)– and:
    1. Do a clean install. Not sure if it will be best to completely erase the whole drive or if a standard reinstallation will be enough.
    2. Take the machine to a Genius Bar to see if there's anything that can be done without major OS messes.
    3. Erase the drive and go through the Mavericks upgrading (SL to Ln to MLn to Mavcks), although not sure if this upgrade is worth yet.
    4. Replace HD for a brand new one and either step 1 or 3.
    5. As a complement, I'm thinking of adding more RAM.
    Well. It is really the first time I don't know what to do. I have work to do and would not want to face a week away from my main computer and since most of the files are CS5-6 and hence, can't move to my wife's iMac...
    Apologies if this post feels too long, but I will truly appreciate any kind of input and advice on one of more of the issues mentioned in this post.
    And if it fits best in any other forum, please also let me know.
    Cheers and thanks in advantage.

    You have to use the Base Station Menu on the Menu Bar at the very top of your screen.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

Maybe you are looking for

  • How can i change the email address in facetime which people can use to call me on my mac book?

    i have an ipad and a mackbook air both using the same apple id. i would want to use different email address for my ipad and macbook. where can i change the email address in facetime for macbook. currently both the device use the same email address(ap

  • Backlight is not working

    I was snowboarding with my ipod and it fell out and got wet in the snow. The backlight now turns on for about a second and then dies. the light only turns on after i press the home button when it is locked. Is there hope for it since it turns on just

  • How to configure automatic reloading the class in jboss-3.2.1_tomcat-4.1.24

    HI, In tomcat, web context is specified in Server .xml file with <!-- Tomcat Examples Context --> <Context path="/examples" docBase="examples" debug="0" reloadable="true" crossContext="true" />. this will deploy my examples webapplication in Tomcat s

  • Developer Server 6i

    Hi, i want to install Forms and Reports Server on SuSE Linux 6.4, but i get always an error message: 'rdbms' Software is not available in the current distribution source and has not installed. You must obtain and .... Must I install it in the same Ho

  • MIDI Timeout on start up GarageBand 11

    Got a brand new iMac in February, GarageBand will not start up due to a freeze in MIDI the following is the error message I Get: GarageBand has detected a MIDI timeout. Please restart your computer, then relaunch GarageBand. If the problem persists,