• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Edit and run a .java file. How to do this?

austin316

Diamond Member
Ok, I downloaded a .java file and added lines of code as was instructed. Now, when I try to run it, it won't see I need a main method. How do I go about doing this? I'm using JBuilder. Thanks in advance.
 
Are you trying to figure out how to compile the file? I am a little confused to what you are saying/asking. Can you clarify what you meant by this:


Now, when I try to run it, it won't see I need a main method. How do I go about doing this?
 
i downloaded a .java file. when I open the file I see all the code and everything. When I try to run it, it says I'm missing the main method. Usually when I run a java file I need to attach a class. I don't know how to do this with a program that I did not create myself.
 
assuming there are no errors in this file, you should be able to do

javac WrapperDemo.java

then to run it

java WrapperDemo


you will need to have the Java SDK installed for this to work...
 
Back
Top