Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JRE_CONTAINER empty when creating a new JavaProject
icon5.gif  JRE_CONTAINER empty when creating a new JavaProject [message #657373] Wed, 02 March 2011 15:30
Iain F is currently offline Iain FFriend
Messages: 1
Registered: March 2011
Junior Member
Hi,

I have been constructing an RCP application that uses the JDT JavaNature however when the project is created using JavaProject.create there is nothing in the JRE_CONTAINER container. I have tried various things to set the class path but I don't want to have a static path to the JRE in the code as this is terribly bad practice.

When I start the application up the JDT components are used to edit the Java files but there are a number of errors there which isn't a great surprise as even simple things like java.lang.Object cannot be resolved, however when I attempt to fix the build path using the built in Wizards/dialogues to add a new library there is not an option to add a 'JRE System Library' in the list presented by the Add Library wizard, the only option is 'User Library', I have been told that this contribution can be found in org.eclipse.jdt.debug.ui however when I add this to the project there are unmatched dependencies and the project will not start.

So can anyone tell me one or more of the following:
* what does org.eclipse.jdt.debug.ui depend on?
* Is there a way to ensure the JRE_CONTAINER is set to something sensible at the time of creation?
* How can I add the other options to the 'Add Library' wizard.

In an ideal world I would like to find out the answers to all this however any help that you can provide would be very much appreciated.

thanks
Iain

I have now resolved the loading of org.eclipse.jdt.debug.ui which has added the 'JRE System Library' option to the wizard, however when I select it and click next I get the following stack dump (truncated)


java.lang.NullPointerException
	at  org.eclipse.jdt.internal.debug.ui.jres.BuildJREDescriptor.ge tDescription(BuildJREDescriptor.java:26)
	at  org.eclipse.jdt.internal.debug.ui.jres.JREsComboBlock.create DefaultJREControls(JREsComboBlock.java:271)
	at  org.eclipse.jdt.internal.debug.ui.jres.JREsComboBlock.create Control(JREsComboBlock.java:186)
	at  org.eclipse.jdt.internal.debug.ui.jres.JREContainerWizardPag e.createControl(JREContainerWizardPage.java:100)
	at  org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDi alog.java:1226)
	at  org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog. java:1218)
	at  org.eclipse.jface.wizard.WizardDialog$6.run(WizardDialog.jav a:1207)
	at  org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
	at  org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog. java:1205)
	at  org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:894)
	at  org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:426)
	at  org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
	at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:234)
	at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
	at  org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at  org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 187)
	at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3622)
	at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3277)
	at  org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at  org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathCont ainerWizard.openWizard(ClasspathContainerWizard.java:225)
	at  org.eclipse.jdt.ui.wizards.BuildPathDialogAccess.chooseConta inerEntries(BuildPathDialogAccess.java:276)
	at  org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWork bookPage.openContainerSelectionDialog(LibrariesWorkbookPage. java:868)
	at  org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWork bookPage.libaryPageCustomButtonPressed(LibrariesWorkbookPage .java:262)
	at  org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWork bookPage.access$0(LibrariesWorkbookPage.java:249)
	at  org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWork bookPage$LibrariesAdapter.customButtonPressed(LibrariesWorkb ookPage.java:198)
	at  org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDia logField.buttonPressed(TreeListDialogField.java:169)
	at  org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDia logField.doButtonSelected(TreeListDialogField.java:387)
	at  org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDia logField.access$2(TreeListDialogField.java:383)
	at  org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDia logField$2.widgetSelected(TreeListDialogField.java:348)
	at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:234)
	at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
	at  org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at  org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 187)
	at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3622)
	at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3277)
	at  org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
	at org.eclipse.jface.window.Window.open(Window.java:801)


Any thoughts?

[Updated on: Wed, 02 March 2011 15:58]

Report message to a moderator

Previous Topic:Make Eclipse not to follow symbolic links
Next Topic:How can I pass arguments to the main method?
Goto Forum:
  


Current Time: Sat Apr 27 02:26:25 GMT 2024

Powered by FUDForum. Page generated in 0.02723 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top