Hi ,
Please help me understanding i am able to create package in java but could not able to access and run in eclipse cam you please help me out in this.
Regards,
Nilesh
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi ,
Please help me understanding i am able to create package in java but could not able to access and run in eclipse cam you please help me out in this.
Regards,
Nilesh
This is why I recommend novices use a basic text editor to write their code and the command line to compile and run it.
You need a class that contains a main() method in order to run a program.
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Can you let us know the project structure and the package name you have created. Also have you created a class inside the package and run that?
Thanks and regards,
Sambit Swain
Hi Sambit,
I have created a simple package name's mypackage in which i am having only one method show(), and i am having main class within javapackage1 class where i want to access mypackage.
yeah sambit i have created class within package and tried to run but it is giving error when i am trying to run that code.
Kindly suggest.
Regards,
Nilesh
Java class names begin with capital letters.
All methods should reside in classes, so you should have 2 classes. It sounds like you're asking how to access one class from another, both in the same package, but your question isn't clear. If you do have 2 classes, post both of them.
Show your code and post your error, the text of the error copied and pasted directly into a post, no pictures or attachments. To see how to post code correctly and gather other info useful for newcomers, please read this topic.