LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Eclipse Problem: Nullpointerexception (https://www.linuxquestions.org/questions/ubuntu-63/eclipse-problem-nullpointerexception-516194/)

JAdj 01-04-2007 05:49 AM

Eclipse Problem: Nullpointerexception
 
Hi all.

Yesterday I installed Ubuntu 6.10 on my computer.

I also installed Jdk 1.5 and eclipse, because I need to develop some things in java.

Here is the deal: When I try to create a New java project in Eclipse, I get an error window.

I look at the error log and see that the error given is a NullPointerException.

HAs anybody had this problem before? Do I need to install something else besides what Ubuntu already has built-in?

Some months ago I did the same installation under a Red Hat 9 and it worked fine from the start.

Thanks for your help.

JAdj 01-04-2007 01:23 PM

More details about my error:

java.lang.NullPointerException
at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage$JREGroup.getDefaultJVMName(JavaProjec tWizardFirstPage.java:443)
at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage$JREGroup.getDefaultJVMLabel(JavaProje ctWizardFirstPage.java:447)
at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage$JREGroup.<init>(JavaProjectWizardFirs tPage.java:349)
at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizardFirstPage.createControl(JavaProjectWizardFirstP age.java:751)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:180)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:614)
at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:502)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:142)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:151)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:461)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424)
at org.eclipse.ui.internal.cheatsheets.CommandRunner.executeCommand(CommandRunner.java:67)
at org.eclipse.ui.internal.cheatsheets.data.CheatSheetCommand.execute(CheatSheetCommand.java:44)
at org.eclipse.ui.internal.cheatsheets.views.CoreItem.runExecutable(CoreItem.java:476)
at org.eclipse.ui.internal.cheatsheets.views.CoreItem.runExecutable(CoreItem.java:471)
at org.eclipse.ui.internal.cheatsheets.views.CheatSheetViewer.runPerformExecutable(CheatSheetViewer.jav a:991)
at org.eclipse.ui.internal.cheatsheets.views.CoreItem$1.linkActivated(CoreItem.java:91)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:208)
at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:174)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:289)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$1(AbstractHyperlink.java:273)
at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:110)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java: 92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at java.lang.reflect.Method.invoke(libgcj.so.70)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)

Has anybody had this problem? how did you solve it?

kpjava 01-10-2007 05:47 PM

Eclipse Problem: Nullpointerexception
 
I'm having the same problem. At the moment, I'm trying a previous version of eclipse.

kpjava 01-10-2007 06:15 PM

Ahh. A solution
 
Simply install a real Java JRE or JDK and specify it in Eclipse (menu->Windows->Preferences->Java->Installed JREs. Restart eclipse, and it should work.

The problem is caused by Ubuntu's default java.

JAdj 01-11-2007 02:04 AM

Quote:

Originally Posted by kpjava
Simply install a real Java JRE or JDK and specify it in Eclipse (menu->Windows->Preferences->Java->Installed JREs. Restart eclipse, and it should work.

The problem is caused by Ubuntu's default java.

I installed ubuntu 6.06 instead of 6.10, and it all worked fine.

I was suspicious about 6.10 installation because some things worked a little weird. For example, when installing in graphical mode, the prompt says: Choose a root (/) filesystem. I chosed it, clicked next, and it said: You haven't chosen a root filesystem.

So I had to install in text mode.

By the way, I installed a real jdk and the same problem happened.


All times are GMT -5. The time now is 04:44 PM.