Eclipse new project no java

Eclipse new project no java

java.lang.NullPointerException
at
org.eclipse.jdt.internal.LaunchingPlugin.getFileInPlugin(Lau nchingPlugin.java:405)

(note — a more helpful error message here would be nice, instead of having
to dig through the logs. . just a thought)

And, (this is key!) When I run it as root, it works just fine, which makes
me think it’s a permissions problem.

Details:
Eclipse Europa installed in /usr/lib/eclipse with PHPEclipse plugin
Workspace is in my home directory.
Java is Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
OS is CentOS 5

I’m looking forward to any help/suggestions.
Thanks in advance,
Steve

Try installing eclipse into ~/eclipse instead of /usr/lib/eclipse, and
everything should work fine. Or, fix the permissions in the eclipse/ dir
such that users can write there (configuration data must be added when
plugins are installed (such as phpeclipse).

I only ever use Eclipse installed in my home dir, and never run into
permission issues. BTW, Eclipse Ganymede SR1 (3.4.1) is out in a couple
weeks. Might be time to upgrade — and yes, phpeclipse works for 3.4 if
you install from the nightly update site,
http://phpeclipse.sourceforge.net/update/nightly/

Steve wrote:
> I’ve been using Eclipse on Windows and Ubuntu for a while now, and have
> just installed it on CentOS. I’m using the PHPEclipse plugin, and have
> been successfully working on PHP projects for several months using this
> install.
> Recently I tried to create a new java project using the wizard and it
> doesn’t work (clicking «next» after the first wizard step fails to
> proceed). The eclipse error log shows a null pointer exception:
> java.lang.NullPointerException
> org.eclipse.jdt.internal.LaunchingPlugin.getFileInPlugin(Lau nchingPlugin.java:405)
> (note — a more helpful error message here would be nice, instead of
> having to dig through the logs. . just a thought)
> And, (this is key!) When I run it as root, it works just fine, which
> makes me think it’s a permissions problem.

Читайте также:  Функция активации relu python

I don’t have an option to create Java Project at all.

Here what I have installed:
— Freshly installed Ubuntu 12.04 64bit
— Oracle Java 1.7 build 5
— Eclipse Platform 3.7.2
— Eclipse JDT Plugin (Eclipse IDE does see it)

JAVA_HOME is set correctly.
I run update-alternatives —config java to point to Oracle Java 1.7

Problem:
In Eclipse menu when choosing:
— File/New/Project, there is no option «Java Project»
Eclipse treats java files as ordinary text files.
Eclipse does not know how to run java files. Tells «The selection cannot be launched, and there are no recent launches» when pressing «Run».
I DO HAVE Java perspective.

I have experience with Eclipse IDE and I know, that it should be straightforward and trivial to have support for Java Development in Eclipse.
But in my case it does not work by some reason.
What could I do wrong?

Any help is highly appreciated.

Dani
>
> I have experience with Eclipse IDE and I know, that it should be
> straightforward and trivial to have support for Java Development in
> Eclipse.
> But in my case it does not work by some reason.
> What could I do wrong?
>
> Any help is highly appreciated.

Источник

How to Create a New Java Project in Eclipse

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 16 people, some anonymous, worked to edit and improve it over time.

This article has been viewed 325,437 times.

Eclipse is one of the most popular development environments for Java, as it contains everything you need to build a Java project from scratch. Before you can start working on your new project, you’ll need to create it first. Creating a new Java project in Eclipse is fairly straightforward, but can be confusing if you’ve already installed Eclipse for a different programming language.

Image titled Create a New Java Project in Eclipse Step 1

  • If you installed Eclipse for a different programming language, you can add Java support from within Eclipse. Click the «Help» menu and select «Install New Software». Select «All Available Sites» from the top drop-down menu, and then type «java» into the Filter field. Check the «Eclipse Java Development Tools» box and click «Next». Follow the prompts to download and install the Java tools. Eclipse will restart once the installation is complete.

Image titled Create a New Java Project in Eclipse Step 2

  • If you don’t see the «Java Project» option but have the Java Development Tools installed, select «Project. » from the «New» menu. Expand the «Java» folder and select «Java Project».

Image titled Create a New Java Project in Eclipse Step 3

Give the project a name. This doesn’t have to be the final name for your program, but should help you and others identify the project.

Image titled Create a New Java Project in Eclipse Step 4

Select the location for the project files. The files are saved to the Eclipse directory by default. You can set a custom location if you prefer.

Image titled Create a New Java Project in Eclipse Step 5

Select Java Runtime Environment (JRE) you want to use. If you are creating a program for a specific JRE, select it from the drop-down menu. By default, the newest JRE will be selected.

Image titled Create a New Java Project in Eclipse Step 6

Select your project layout. You can choose to either use the project folder, or create separate folders for sources and class files. The default option is «Create separate folders. «, though you may need to change depending on the needs of your project. [2] X Research source

Image titled Create a New Java Project in Eclipse Step 7

Click «Next» to open the «Java Settings» window. This is where you’ll define additional sources as well as add libraries to your project.

Image titled Create a New Java Project in Eclipse Step 8

Use the Source tab to define your build path. The build path is what the compiler uses to build the program. You can create additional source folders, link external sources, and add or remove folders from the build path. The compiler uses the build path to determine which sources to compile.

Image titled Create a New Java Project in Eclipse Step 9

Use the Libraries tab to add libraries to the project. This tab will allow you to add JAR files to include in your project, as well as select built-in libraries to use. Importing JAR files allows you to use libraries from other projects.

Image titled Create a New Java Project in Eclipse Step 10

  • Your project will be displayed in the «Package Explorer» frame on the left side of the window. If you just see the Eclipse Welcome tab, click the small Java button on the left side of the window. [3] X Research source
  • See How to Write Your First Program in Java for a detailed guide on creating your first Java program.

Community Q&A

Eclipse is useful as it streamlines certain activities that are done regularly in Java programming. These activities include running, debugging, and compiling. Eclipse also checks the syntax of your code and makes sure the classes you use actually exist. It can also help you add libraries.

Thanks! We’re glad this was helpful.
Thank you for your feedback.
As a small thank you, we’d like to offer you a $30 gift card (valid at GoNift.com). Use it to try out great new products and services nationwide without paying full price—wine, food delivery, clothing and more. Enjoy! Claim Your Gift If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow

Assuming the server is running Linux, you’ll want to export the project into an executable jar by right-clicking and selecting Export, then going through the wizard. After this, you can use something like WinSCP to transfer the file to your server. Then you can log into your server (make sure Java is installed) on putty, create a new tmux session (by typing tmux) and run the program (sudo java -jar *name*.jar).

Thanks! We’re glad this was helpful.
Thank you for your feedback.
As a small thank you, we’d like to offer you a $30 gift card (valid at GoNift.com). Use it to try out great new products and services nationwide without paying full price—wine, food delivery, clothing and more. Enjoy! Claim Your Gift If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow

Thanks! We’re glad this was helpful.
Thank you for your feedback.
As a small thank you, we’d like to offer you a $30 gift card (valid at GoNift.com). Use it to try out great new products and services nationwide without paying full price—wine, food delivery, clothing and more. Enjoy! Claim Your Gift If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow

Источник

Eclipse — Create Java Project

New Button

  • By clicking on the File menu and choosing New →Java Project.
  • By right clicking anywhere in the Project Explorer and selecting New → Java Project.
  • By clicking on the New button ( ) in the Tool bar and selecting Java Project.

Using the New Java Project wizard

The New Java Project Wizard has two pages. On the first page −

New Java Project

  • Enter the Project Name
  • Select the Java Runtime Environment (JRE) or leave it at the default
  • Select the Project Layout which determines whether there would be a separate folder for the source codes and class files. The recommended option is to create separate folders for sources and class files.

You can click on the Finish button to create the project or click on the Next button to change the java build settings.

On the second page you can change the Java Build Settings like setting the Project dependency (if there are multiple projects) and adding additional jar files to the build path.

Viewing the Newly Created Project

The package explorer shows the newly created Java project. The icon that represents a Project is decorated with a J to show that it is a Java Project. The folder icon is decorated to show that it is a java source folder.

Источник

Нет опции java-проекта в eclipse

Там может быть очень простой ответ на этот вопрос, но, зайдя в Google в течение часа, я прибегаю к просьбе здесь.

Я просто пытаюсь установить eclipse Indigo (3.7.2) на Ubuntu 12.04 и заставить его сделать Java-приложение.

sudo apt-get install eclipse 

чтобы получить eclipse, который также устанавливает пакет jdt, необходимый для создания Java-проектов.

Однако, когда я перехожу к новому → проекту, мне не предоставляется опция мастера проекта java (см. снимок экрана).

New eclipse project

Кто-нибудь знает, как это исправить?

РЕДАКТИРОВАТЬ: Погрузите сам .tar.gz и распакуйте его, похоже, отлично. Я не уверен, почему apt-get не работал.

ОТВЕТЫ

Ответ 1

Окно > Открыть Перспективa > Java

Я чувствую себя идиотом, сколько времени мне понадобилось, чтобы понять это. Теперь это не очень интуитивно, не так ли?. > & Л;

Ответ 2

У меня была та же проблема. Попробуйте сделать это:

sudo apt-get update && sudo apt-get upgrade sudo apt-get remove eclipse sudo apt-get purge eclipse rm -r ~/.eclipse sudo apt-get install eclipse 

Мне не нужно было удалять все места, которые появились на экране whereis eclipse, например, сказал Стив Беер.

Кроме того, вы также можете попробовать сделать

sudo apt-get install --reinstall eclipse-jdt 

если предыдущие команды не работают.

Ответ 3

У меня была такая же проблема, и я смог ее разрешить при удалении всего каталога ~/.eclipse вместе со всем в рабочем пространстве eclipse. Когда я запустил eclipse после этого, снова можно было добавить java-проекты.

Ответ 4

У меня была такая же проблема и выяснилось, что это было потому, что я установил другую версию eclipse, которую я загрузил вручную. Я просто удалил пакет снова ( «sudo apt-get remove eclipse» ) и удалил все, что касалось eclipse:

а затем переустановить его, используя «sudo apt-get install eclipse». Работал хорошо для меня.

Ответ 5

Убедитесь, что установлен JDK. sudo apt-get install openjdk-7-jdk

также убедитесь, что установщик обновлен: sudo apt-get update , sudo apt-get upgrade

У вас есть другой вариант. Попробуйте загрузить eclipse с веб-сайта Eclipse www.eclipse.org

загрузите соответствующую версию для своей машины и попробуйте запустить ее из командной строки непосредственно yourDownloadPath/eclipse

Ответ 6

То же, что и @thiagowfx, просто нужно добавить * в последний commant

sudo apt-get remove eclipse* sudo apt-get purge eclipse* rm -r ~/.eclipse* rm -r workspace* 
sudo apt-get install eclipse 

Ответ 7

эти обе команды полностью решили проблему для меня:

sudo apt-get install —reinstall eclipse-jdt

Источник

Оцените статью