How do you fix UnsupportedClassVersionError

I have created an application that will run on any computer with the JDK. I want to make it an executable file so that you don't have to have the JDK to run it. I downloaded a Native compiler that will compile your Java application into an executable. It asks you for two things: The directory with all your application's .java and .class files. It asks you to specify a main .class file. It comes with a few sample applications that you can compile. I am using the most simple one the hello world application. Here is the hello.java file
public class hello
static public void main(String args[])
System.out.println("Hello, World!");
Now, this file came in a directory with the files hello.class and hello.java. If I use the native compiler (Excelsior JET is it's name) and i specify the directory that contains the hello.class and hello.java file as the application's working directory, and Hello.class as the main class and then click test, the native compiler will run the hello world application just fine. After testing I can click compile and it will turn that application and to a hello.exe file that will run on any windows computer without a JDK. Now, if specify the information for my own Java application, (which would be it's working directory C:\Vocab\) and Vocab.class as the main class, the native compiler will not be able to test and certainly not compile it and it and will give me this output:
The application has started with command line:
java -cp C:\Vocab Vocab
Exception in thread "main" java.lang.UnsupportedClassVersionError
at java.lang.Void.<unknown>(Unknown Source)
at java.lang.Void.<unknown>(Unknown Source)
at java.lang.Void.<unknown>(Unknown Source)
at java.lang.Void.<unknown>(Unknown Source)
The application has terminated with exit code: 1
You see the part that says java -cp C:\Vocab Vocab? If I type that into the command prompt, my application will run. So why wont it run here? I think the answer lies here:
Before you begin
Before using Excelsior JET to compile your Java application, make sure that the application runs properly on the reference implementation of the Java platform, such as Sun JRE 5.0.
Ok that is in the help section that comes with Excelsior JET, the main compiler. Now back to that hello world application. As i mentioned before it comes with the hello.java and hello.class file. I can take that hello.java file and use either jGrasp, Netbeans, or go to the directory
C:\Program Files\Java\jdk1.6.0\bin and use the javac.exe file to generate a hello.class file. Now if I take that hello.class file that was generated from the hello.java file that was in the hello world directory, and overwrite the hello.class file that came with the native compiler, I can try testing the compiler but i just get the same error that i get when trying to test/compile my own application. Let me clarify:
hello.class that came with the compiler will test and compile
hello.class that i made with jGrasp, Netbeans, or Javac will not test or compile.
So what do I use to create the proper .class files that will test/compile?

That means the box is having trouble communicating to the VOD servers. Please reseat the coax cord from both ends (the wall end and the box end). Once the coax cord is back on, reboot the box by unplugging power cord for 20 seconds then plugging back in. If you continue having problems with the VOD connectivity, please send me a private message so I can get your info directly.
Anthony_VZ
**If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

Similar Messages

  • When I go to my downloads folder on my dock and click the file all the content shows up but as soon as I go to open it in the finder, I get a blank window. Has anyone else had this problem, if so, How do you fix it.

    When I go to my downloads folder on my dock and click the file all the content shows up but as soon as I go to open it in the finder, I get a blank window. Has anyone else had this problem, if so, How do you fix it. I also cant delete anything from this folder because of it. Any help would be greatly appreciated.

    Hey Allen,
    I am having the same issue here in September.  How did yor situation get resolved.  My iPad Siri works great.  My iPhone 5 Siri has been out of comission (OOC) for almost a month and I am beginning to get a little frustrated since Siri works so well in July....ANY assistance would be highly appreciated... Thanx

  • How do you fix the 2 to 3 second voice delay when answering iphone 5 this is with multiple carriers and its unaceptable on a phone that cost almost 700 dollars it did not happen on my cheap prepay samsung

    how do you fix the 2 to 3 second delay on hearing somones voice when answering the iphone 5 this happens on lots of  iphone 5s with differant carriers so its not one carriers problem its probably apples this is unacceptable on such an expensive phone and very irratating. my last cheap samsung t mobile 50 dollar pre pay never did this,im new in my  contract an will take the phone back if i have to put up with this for 2 years.other than that huge problem i love the phone. i dont understand why this did not get covered like the maps problem,cause its a lot of phones and its probably an ios problem.

    Wow!
    I'm not going to be of much use regarding answers but I sure am going to watching this post like a hawk for any replies. My package is a slightly diluted version of this and I do find the BBtalk and data limits hard to make the most of as well.
    If nothing else this totally highlights how complicated BT have managed to make their packages.
    A cynic would assume that they are trying to catch us out at every step and for us to either be overspending or not really getting the moneys worth.

  • How do you fix an ipod that has a black screen and it turns on but when it turns on the screen gets a lighter black but you still can't see the apps or anything?

    How do you fix an ipod that has a black screen and it turns on but when it turns on the screen gets a lighter black but you still can't see the apps or anything?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar              
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price                       
    A third-party place like the following maybe less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the screen yourself if you are up to it
    iPod Touch Repair – iFixit

  • TS3212 What does this mean, and how do you fix it? "There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vender."

    What does this mean, and how do you fix it?
    "There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vender."
    Trying to install iTunes 10.7, first attempt; downloaded and ran with everything closed, seccond atttempt; just click on run, third attempt; ran upgrade with iTunes open. All of the results were the same.
    Is there something wrong with the iTunes 10.7 Windows installer package?

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • After upgrading my iPhone4 to the latest IO it no longer connects to wifi, how do you fix this?

    After upgrading my iPhone4 to the latest IO it no longer connects to wifi, how do you fix this?

    knifepainter wrote:
    What I know is that the phone worked perfectly fine until I upgraded the software. I've tried resetting the network settings to no avail. I've shut the phone off, put it in a ziplock baggie and then into the freezer for 15 minutes. This made the wifi work temporarily but then it goes back to being grayed out. The wifi does not work at other wifi sites away from my home as well. Seems like an apple issue to me and would appreciate someone coming up with a fix, apparently I'm not the only one having this problem. Thanks for replying to my query, any ideas?
    It's likely a hardware issue.  The iOS will not directly cause this issue.
    Use this article first:
    iOS: Wi-Fi settings grayed out or dim - http://support.apple.com/en-us/TS1559
    If that fails to resolve it, then try setting it up as new and testing again.
    How to erase your iOS device and then set it up as a new device or restore it from backups - http://support.apple.com/en-us/HT4137
    If the issue remains even after set up as new, it's a hardware problem, not a software problem.  You'll need to contact Apple for you hardware service options.  If within warranty it should be free.  If not, expect to pay $149 USD + tax if it's an iPhone 4, $199 USD + tax if it's an iPhone 4S.

  • I installed the new version of iTunes today. It's 12.1.1. After completing the installation, including restarting my computer, I was no longer able to use Windows Internet Explorer. Has anybody else experienced this? If so, how did you fix Explorer?

    I installed the new version of iTunes today. It's 12.1.1. After completing the installation, including restarting my computer, I was no longer able to use Windows Internet Explorer. Has anybody else experienced this? If so, how did you fix Explorer? I was using Explorer 11 and Windows 7, installed on an HP Pavilion g series

    Never heard of that being caused by installing iTunes. Try asking on a Windows forum. This isn't a problem with iTunes or any other Apple product. If you believe it is, uninstall iTunes. If the problem persists, you'll have to seek advice on a Windows forum or contact Microsoft for support.

  • How can you fix your ipod touch when apps are closing on you, how can you fix your ipod touch when apps are closing on you

    How can you fix your ipod when apps keep crashing on you while your in that app?

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • How can you fix your iphone5 if it freezes?

    How can you fix your iphone5 if it freezes?

    Straight from the User Guide:  do a reset--hold the on/off switch and home button together until the Apple logo appears, generally around 20 - 30 seconds.

  • If you've changed your startup options on mac to start in windows, how do you fix and go back to mac on startup?

    if you've changed your startup options on mac to start in windows, how do you fix and go back to mac. I can't get my mac to switch back to mac, it is like stuck in widows mode, I have tried holding down the options key upon start up and that did not fix it either.
    Please help! Thank you so much!

    The Apple drivers you install in Windows also puts a Startup Drive icon in the Task Bar. Choose that to change the startup disk back OS X.

  • Since I changed to the iOS 7, my gyro doesn't work. How do you fix it ?

    Whenevr I turn my phone sideways to watch or text something. It won't work. Ever since I changed to the ios 7. How do you fix it ?

    Try reset all settings
    Settings>General>Reset>Reset All Settings
    Note: Data will not be affected but settings will be reset.

  • I can't click on the tabs on my desktop firefox, firefox 30, how do you fix this?

    I have reset and still get this issue, I would go and click on open new tab and then I would see the tab on the toolbar. I would go and try to open the tab by clicking on it and it would not work. How do you fix this? I know about shortcuts but its irritating and I share the computer and the shortcuts is slowing productivity. Thank you in advance.

    The mouse does not activate a tab, but a keyboard shortcut like Ctrl+2 to activate the second tab on the bar, does work?
    The Reset was a good thing to try. But some add-ons may reinstall after a Reset so those are worth reviewing again.
    Users have reported some new tab dysfunction is associated with Conduit add-ons, such as a Conduit plugin and/or a "Community Toolbar" extension.
    You can check for and disable extensions on the Add-ons page. Either:
    * <u>Windows: Ctrl+Shift+a</u> , Mac: Command+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Often a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Does that help with the "+" button? If so, could you name the specific extension that caused the problem?
    You might also check the Plugins section of the Add-ons page. You can use "Never Activate" to disable plugins that you don't ordinarily use.
    Does that help at all?

  • Just bought a new printer ( Canonpixmaip4920) all other files print ok but when I print a I Tunes cover playlist in comes out backwards or mirror image? How do you fix this?

    Hi,
    I just bought a new canon pixma ip 4920 printer... all other files print ok except when I try to print a playlist from I tunes it prints out backwards or a mirror image? How do you fix this?
    Jim

    Unfortunately changing the epub text size does not change the view at all. The images do not seem to change when the text size setting is changed.
    The resolution of my machine is already at the max setting, so increasing the resolution is kind of impossible.
    Any other suggestions I could try?  Thank you for your suggestions!

  • I just installed the yahoo messenger. Every time I do that my extensions go missing. How do you fix this instead of having to keep re installing firefox?

    I just installed the yahoo messenger. Every time I do that my extensions go missing. How do you fix this instead of having to keep re installing firefox?

    hello, this sounds like the files in your [[Profiles|profile folder]] that store the information about your extensions might have become corrupted. please go to ''firefox > help > troubleshooting information > profile - show folder...'' then windows explorer should open up your profile folder. in there look for the files named extensions.ini, extensions.sqlite, extensions.sqlite-journal (and in some cases also extensions.txt, extensions.rdf). delete or rename those files and quit firefox, they will be regenerated the next time you launch firefox.
    also see [https://support.mozilla.org/en-US/kb/Unable%20to%20install%20add-ons#w_corrupt-extension-files Corrupt extension files]

  • What is causing, and how do you fix, a song stopping during playback? I have latest iTunes 12.0.1 and Yosemite 10.10.1

    What is causing and how do you fix a song stopping during playback? I have latest iTunes 12.0.1 and Yosemite 10.10.1.
    It stops then after several seconds (like 25 secs) then it starts again ... and then several seconds later it stops again!
    I have the latest software so I don't know what to do?
        David V.

    When you have the problem, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for