Skip to content
Advertisement

Tag: eclipse

Getting error in Eclipse: syntax error on token start identifier expected

I am getting a strange error while creating a simple thread program in JAVA using Eclipse. The code is: I am getting error “syntax error on token start identifier expected” in the line ts.start();. Why am I getting this? EDIT I have used the code from http://tutorials.jenkov.com/java-concurrency/creating-and-starting-threads.html#thread-subclass Answer Found a very bad mistake done my me. Forgot to add public

TestNG. can’t run a single test method

I have Selenium+Eclipse+Java Project+Eclipse TestNG plugin. For example, my code is: When i run TestClass as TestNG, both tests are executed. I can’t understand why test2 is executed also. Because there is a comment “//” before @Test annotations. Any ideas? thanks in advance Answer First, you should clean the class files, then compile the project again

Plugin org.apache.maven.plugins:maven-compiler-plugin or one of its dependencies could not be resolved

I’m having some issues to configure properly my eclipse to work with maven. I create a new project, this one is correctly build with maven in command line (mvn install), but in Eclipse I got this error: CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not

Can we call another project java class from our project in eclipse

Answer You can do either this way: In the dependency you can add the other projects to your project. Right click on project -> properties -> java build path -> projects. Add your project here. OR Make the classes of project into jar and add it to other project Dependencies should be added in classpath In run time, make sure

How to change a package name in Eclipse?

In Eclipse I have a simple Java project that contains a package named (default package) and inside this package I have a class. I want to rename this package into something like: com.myCompany.executable I tried to select the (default package) —> right click —> refactor but now I see only the single voice named: Infer generic type arguments but not

Eclipse Content Assist is Appending Class Name to Variable Suggestions

Content Assist in Eclipse Juno is appending the Class name of variables to suggestions. For example, if I start to type: and hit Return, Eclipse changes this to: I don’t know if this is specific to Juno or if I accidentally turned this ‘feature’ on, but it is really annoying. Any idea how to get rid of this? Answer I

How can I import javax.json in eclipse

I have installed eclipse ide for EE developers and I am receiving an import error for I have right clicked on project folder -> clicked properties -> clicked Java build path -> add library -> JRE System Library, but the dependencies that show up are already imported. How can I import the javax.json package? Answer If using Maven, add this

Advertisement