首页 \ 问答 \ 在Eclipse上运行SolrJ(Running SolrJ on Eclipse)

在Eclipse上运行SolrJ(Running SolrJ on Eclipse)

我正在尝试按照http://lucidworks.com/blog/indexing-with-solrj/中的示例使用Eclipse设置SolrJ

但是,当我尝试使用“运行方式” - >“Java应用程序”运行代码时,它返回时显示“选择不包含主类型”的错误。 但我发现代码中有一个主要方法,它已经被添加到我在Eclipse中的代码中。 除了路径名和文档名之外,我的eclipse与示例的代码相同。

为了让代码在Eclipse中成功运行,我是否需要错过任何东西?


I'm trying to setup a SolrJ using Eclipse by following the example in http://lucidworks.com/blog/indexing-with-solrj/

However, when I try to run the code using Run As -> Java Application, it came back with an error saying that 'Selection does not contain a main type'. But I see that that there's a main method in the code, and it has already been added to my code in Eclipse. My eclipse has got the same code as the example, except for the path name and document name.

Is there any thing required that I missed out in order for the code to run successfully in Eclipse?


原文:https://stackoverflow.com/questions/29669446
更新时间:2023-09-20 06:09

最满意答案

如果您可以获取始发进程的句柄,则可以使用DuplicateHandle()为您有权访问的进程中的任何内核对象创建句柄。


If you can get the handle of the originating process, you can use DuplicateHandle() to create a handle to any kernel object within that process that you have access to.

相关问答

更多
  • i是一个静态变量 - 只有一个实例。 每次调用printf时,都会将其地址传递给线程并取消引用它。 因此,当主线程更改i的值时, 所有工作线程立即看到新值。 由于这个原因,你会看到线程#5 - 一旦for()循环结束,这就是i的值。 而不是(LPVOID)&i ,传递(LPVOID)i ,并在线程内部使用(int)param而不是*((int*)param) 。 将指针转换为int和back在C中是合法的(尽管如果误用则是危险的)。 i is a static variable - there's only ...
  • 您可以使用一次调用将任何Swing程序的外观设置设置为本机操作系统。 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()) 可以在嵌套布局示例中看到Windows PLAF。 You can set the look and feel of any Swing program to the native operating system's with one call. UIManager.setLookAndFeel(UIM ...
  • 要删除继承的ACE,请调用SetNamedSecurityInfo并传递DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION SecurityInfo参数的DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION 。 PROTECTED_DACL_SECURITY_INFORMATION标志可防止将父级的可继承ACE添加到您指定的ACL中。 如果您不需要复制其他继承 ...
  • 正如您自己想象的那样,您无法在Windows运行时组件中公开从其他人继承的类; 即使您尝试将抽象类用作父类,也是如此。 这是使WinRT组件与WinRT框架支持的所有其他语言一起使用所需的“缺点”。 解决此问题的唯一方法是避免继承。 您只能使用可以模拟继承行为的接口或对象组合,例如: public sealed class A { public void Method() { } } public sealed class B { A a; public void Method() ...
  • 您将double的地址传递给CreateThread,然后尝试将其视为线程func中的int *。 改变double x; 到int x; You're passing the address of a double to CreateThread, then you try to treat it as an int * in the thread func. Change double x; to int x;
  • 如果您可以获取始发进程的句柄,则可以使用DuplicateHandle()为您有权访问的进程中的任何内核对象创建句柄。 If you can get the handle of the originating process, you can use DuplicateHandle() to create a handle to any kernel object within that process that you have access to.
  • 您应该声明一个通常在ResourceDictionary定义的ControlTemplate 。 例如: