How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLProg Your Own Question

ATLProg
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 8685
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
44910485
Type Your Homework Question Here...
ATLProg is online now
A new question is answered every 9 seconds

Need help with Syntax errors on my Retail Calculator. Main.class

Resolved Question:

Need help with Syntax errors on my Retail Calculator. Main.class and jframe issues to fix. Very simple.
Submitted: 1 year ago.
Category: Homework
Expert:  ATLProg replied 1 year ago.

Hello Welcome. Thank you for your question, I’m ATLProg and I’ll try to help you.

 

Can you please go to www.wikisend.com and upload your file ? Once you do that you will get a page that has the "File ID" and "Download Link". Copy the "Download Link" or "File ID" and please paste it in your reply here.

 

Customer: replied 1 year ago.

http://wikisend.com/download/949492/RetailCalculator.java


RetailCalculator.java

Expert:  ATLProg replied 1 year ago.
Please download solution from

http://wikisend.com/download/981264/RetailCalculator.java

I hope i was able to assist you. If you are happy with my service please rate my service . If your are not 100% satisfied, please reply to me so that i can help you better. Please start your question with "For ATLProg only" to request me again
Customer: replied 1 year ago.

hi, i uploaded the file you said you fixed and its the same, I dont see any changes and I still am getting "no main classes found"

Expert:  ATLProg replied 1 year ago.
There was an extra bracket at the end.
If you want i can put this code in netbeans and send it to you
Customer: replied 1 year ago.

What I did was copy and paste the whole file you sent back into Netbeans. I basically took out what I had and pasted what you gave back and I still get the main class error. So if doing it in Netbeans will make it work, then okay.


Am I doing this right by copy and pasting the code?


let me know that too

Expert:  ATLProg replied 1 year ago.
It should have worked
Please find solution below

http://wikisend.com/download/732484/RetailApp.zip

http://wikisend.com/download/677160/HowTo_Open_NetBeans_Project.doc
Customer: replied 1 year ago.

okay. Let me try your instructions but another question before I try.


 


I use the new .java file you sent and open the file in NetBeans as instructed.


Then I should have a calculator that works.


 


So by copy and pasting the code from notepad is not the correct way for the file to "work correctly". Right?


I know copy and paste from Word is not good as I went through that mess. Am I correct? Let me know and I will see your answer as I am trying your instructions so give me a few minutes please.


Stay tuned.


Thank You

Expert:  ATLProg replied 1 year ago.
I better to do development in some IDE like netbeans or eclipse then Notepad to avoid such issues
Customer: replied 1 year ago.

Hi, thanks for waiting.


So I did as you instructed.


First how do I save it if I already have a file called RetailCalculator.java.


So I will have to erase mine and then use this one as the name is important.


Next, there are two "errors" that are probably inter related.


First line 21 has a syntax error that says "Class RetailCalculator is public and should be declared.


Next is the "error" from the output screen.


run:
java.lang.UnsupportedClassVersionError: retailcalculator/RetailCalculator : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: retailcalculator.RetailCalculator. Program will exit.
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)


Let me know


 

Expert:  ATLProg replied 1 year ago.
Try this..

1. Right click on RetailApp in Netbeans and select "Run"

If that doesnt work Please send me a snapshot of your netbeans should project layout
Customer: replied 1 year ago.

Same error, I have attached a word doc with screen shot. I believe it is same error

Attachment: 2013-09-25_023337_same_error_and_screen_shot.docx

Expert:  ATLProg replied 1 year ago.
What is RetailCalculator1.java? It wasnt part of project i sent please remove that infact delete the complete project and try and reopen the project i sent
Customer: replied 1 year ago.

Will do

Customer: replied 1 year ago.

I got the same error. See below.


Also, how do I save it as RetailCalculator? Netbeans is saying there is something else named that and I thought I erased it already.


 


run:
java.lang.UnsupportedClassVersionError: retailcalculator/RetailCalculator : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: retailcalculator.RetailCalculator. Program will exit.
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

Expert:  ATLProg replied 1 year ago.
this is taking too much time my friend now
Please all RetailCalculator projects you may have and use just the one i sent.
And if that doesnt work please send me snapshot
Customer: replied 1 year ago.

okay I will again


Attachment: 2013-09-25_025510_same_error_and_screen_shot_v2.docx


screen shot attached

Expert:  ATLProg replied 1 year ago.
Do this first do
1. Right click on project and select "Build" and then do "Run"
Customer: replied 1 year ago.

I did what you said but dont I need to save it first before I build it?


I did the clean and build as that was my only choice


I have attached another word doc with a screen shot as you like


take a look

Attachment: 2013-09-25_030114_same_error_and_screen_shot_v3.docx

attached!

Expert:  ATLProg replied 1 year ago.
i am not sure why you are getting that..looks like you are using a jdk version other than 1.7.
Can you create a new Netbeans project and add RetailCalculator.java in retailcalculator package
Customer: replied 1 year ago.

IT WORKS IT WORKS IT WORKS.


Lets get done with our transaction. OMG it works!!

Expert:  ATLProg replied 1 year ago.
good..remember to look me up next time :) Please start your question with "For ATLProg only" to request me again
Customer: replied 1 year ago.

I will, I have seen you before.


One quick question. Can you give me the line number or numbers you fixed so I can see and take note!!


Then I am good. as I have to point out what was added/fixed.


Thank You again.

Expert:  ATLProg replied 1 year ago.
you program was perfect except that it had an extra ending brace at the end
Customer: replied 1 year ago.

are you kidding me UGH really


Well I have to say I learned a lot I did not know about NetBeans and so got training on that and this wasnt a total bust.


Thanks again.


so what are next steps?

Expert:  ATLProg replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 8685
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
ATLProg and 5 other Homework Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

    1781
    3,000+ satisfied customers, all topics, A+ work
 
 
 

Related Homework Questions