[英]In eclipse how to create a class without a java project?
This is the Question asked in one of the interview... Usually in eclipse we write class after creating a java project. 这是面试中的一个问题...通常在Eclipse中,我们在创建Java项目后编写类。 Is it possible to have a class without a java project?
有没有Java项目的类是否可能?
There is no way of creating a class in Eclipse without creating a project first. 如果不先创建项目,就无法在Eclipse中创建类。 I am sure you will know how to create a new project but just in case:
我相信您会知道如何创建一个新项目,但以防万一:
File -> New -> java project 文件->新建-> Java项目
Yes, What you need to do is do FILE ---> New Class -----> (The type the class name). 是的,您需要做的是FILE ---> New Class ----->(键入类名)。 Then add that to a Java Project.
然后将其添加到Java项目。 Any more question Ask my profile
还有其他问题请问我的个人资料
Eclipse essentially does require you to create a project and put your Java source code into it. Eclipse本质上确实需要您创建一个项目并将Java源代码放入其中。
It's actually possible to just use File | 实际上可以只使用File | Open... to open a Java file and edit it, but the editor will have reduced functionality;
打开...打开Java文件并进行编辑,但是编辑器的功能有所减少; it will act more like a plain text editor and won't be able to help you write code and find errors the way the full editor can.
它会更像纯文本编辑器,并且将无法像完整编辑器一样帮助您编写代码和发现错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.