0
votes

Trying to user the Eclipse plugin android-sqlite-browser-for-eclipse on my mac but get the error listed below when trying to open a db-file on the emulator.

Some googling lead me to this so I downloaded the antlr-runtime-3.0.1.jar but where should I put it and how do I make the plugin find it?

java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.tmatesoft.sqljet.core.table.SqlJetDb$2.runWithLock(SqlJetDb.java:249) at org.tmatesoft.sqljet.core.table.SqlJetDb.runWithLock(SqlJetDb.java:307) at org.tmatesoft.sqljet.core.table.SqlJetDb.readSchema(SqlJetDb.java:244) at org.tmatesoft.sqljet.core.table.SqlJetDb.refreshSchema(SqlJetDb.java:715) at org.tmatesoft.sqljet.core.table.SqlJetDb.getSchemaInternal(SqlJetDb.java:338) at org.tmatesoft.sqljet.core.table.SqlJetDb.getSchema(SqlJetDb.java:333) at com.questoid.sqlitebrowser.view.SqliteBrowserView.getSqlJetSchema(SqliteBrowserView.java:168) at com.questoid.sqlitebrowser.view.SqliteBrowserView.createPartControl(SqliteBrowserView.java:77) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:386) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:240) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245) at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1145) at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3925) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3922) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3898) at com.questoid.sqlitebrowser.SqliteBrowserPluginStartup$3$1.run(SqliteBrowserPluginStartup.java:150) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4605) at com.questoid.sqlitebrowser.SqliteBrowserPluginStartup$3.run(SqliteBrowserPluginStartup.java:141) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

2

2 Answers

0
votes

I have not used eclipse on MAC but what we do in Windows or Linux is, copy the antlr.jar to your application lib folder. If you have already added your lib folder in the classpath just refresh the project from eclipse and it will work.

If you have not added the lib path, right click on the Project on the ProjectExplorer pane , click Properties, Select Java on the left pane -> BuildPath -> User Libraries Select Add External Jars button Browse to the location where the antlr jar is located and select the antlr jar. Click OK Click Finish Refresh and Build again

0
votes

Change the extension of the jar to zip. Do not extract the zip folder. Open it in the winrar or anyother archiver. Copy the antlr-runtime.jar to the lib folder.

Copy the MANIFEST file from the META-INF folder to desktop. Open it in notepad. You will find the jars needed by the plugin mentioned in the following line Bundle-ClassPath: .,lib/sqljet-1.0.7.jar. Modify it as Bundle-ClassPath: .,lib/sqljet-1.0.7.jar, lib/antlr-runtime-3.0.1.jar.

Save the MANIFEST file and copy it to the META-INF folder in the archiver. After this close the archiver and rename the extension from .zip to .jar.

Copy the jar to the eclipse/plugins folder and restart eclipse.