Source not found when open Java Imported Class on Eclipse Luna - java

I have some problem to open the class inside my project libraries on Eclipse Luna. For the beginning I have .war file of my web apps, I imported that .war files to Eclipse Luna and I could open index.jps files and other files under Web Content folder. But when I'm tried to open the engine class file I got Source not found. This is the screenshot of the errors.
I'm new in Java code and with Eclipse. What's wrong with that errors and how to resolve that problems ? Please anybody knows could help me. Thanks before.

WAR files don't usually contain the Java source code, just the compiled class files which is what you are seeing.
If you have the Java source elsewhere you can use the 'Attach Source...' button shown in that screenshot to tell Eclipse about it.

Related

Decompiled .class file in Android studio

I got problem during adding library into Android Studio project.
I add jar file to directory libs. I clicked Add as library and the problem is that when I try to run project, it fails.
The problem is decompiled .class file bytecode version 51.0 (Java 7).
Error in Android Monitor is NoClassDefFound.
What I got for now, is that I should have java files, but I have .class files.
Can anybody tell me how to solve this problem?
I solve my problem just using Java Decompiler and adding new java files to project.

Where does Grails/IntelliJ IDEA store .class files?

I just can't seem to find the .class files for my Groovy source code in IntelliJ IDEA Grails projekt. I've created a grails app "qotd" and a plugin "selenium" which is kind of a grails app itself, as you might know. So just to keep things tidy here's a screenshot of my Grails View:
Grails View
As you can see I have source code for both Java and Groovy. Both share the same package "de.it2m.testcases". Could this be a problem? Anyway, now I need to know where the .class files are stored. I've compiled both the "qotd" app and its "selenium" plugin using the "grails run-app" command without errors, so I'm sure there must be the .class files somewhere. I already found the class file for the "SeGridTest.java" class in:
...IntelliJ workspace\qotd\out\production\selenium-inplacePlugin\de\it2m\testcases
Unfortunately the "SeleniumTest.class" is missing in this directory (as I would have expected it there). I was browsing the ".grails" directory as well but without any success.
Where could the SeleniumTest.class hide...?
Note: I'm working on Windows 8.1 Pro, IntelliJ ultimate 13.1.4 and Grails 2.3.8
#Tinku Saini
Thanks for your help! The .class files get into the "target" directory

How to open existing tomcat web application project in eclipse

I want to open my web application which I made using Terminal/Text Editor on Linux into eclipse on windows.
I tried to open it by doing Import existing project but I don't see my servlet files i.e .java files in it and i also see error mark on my WEB.XML.
ty154 is my project name.
My Directory structure is
Tomcat -> Webapp->ty154
Ty154->Images & ->webinfo
Webinfo->classes
I have my JSP files in the ty154 folder and Images inside Image folder.
I have my .JAVA and .Class file inside Classes folder.
Please help me how to open and configure my project in eclipse.
Thanks in advance !!
Its not possible to import the project that you have created using terminal/text editor in to eclipse.You have to create a Dynamic Web Project under eclipse and copy paste the java files under source directory of the project. The jsp and other html files will go in to WebContents folder of the project. Once this is done the eclipse project can be copied and can be imported in to any other eclipse installations.The best read is:http://goo.gl/hPVapt
As you have written source code in terminal environment so you wouldn't be having an eclipse project file to be imported properly. First you need to create an eclipse project and then you can add source from your code directories. This link describes it pretty well:
http://thusithamabotuwana.wordpress.com/2011/06/15/importing-existing-source-code-into-eclipse/
If you have the war file, then you can import the war file directly in eclipse. Go to File>import then select war
For this you need to have Eclipse IDE for Java EE developers
The "Import Existing Project" entry only works for Eclipse projects.
In your situation with a simple project I would create a new Dynamic Web project and copy in the sources to the source folder - just Ctrl-c the files outside Eclipse, and Ctrl-v them inside Eclipse - and the static files to the publish location. You essentially need to know what has been done to ensure it has been done right.

Not able to see the .class files in eclipse after configuring the Jadeclipse plugin

I had configured the Jadeclipse plugin for viewing .class files, but it is still showing "source can't be found" in the particular JAR file.
Can anybody help me with this?
Have a look at JADClipse not working with Eclipse 3.6 for help. Also ensure that Path to decompiler is correct under Preferences in Java -> JadClipse.

FreeTTS Portability Issue

I'm writing an application that makes use of Java's speech API and FreeTTS. The application works fine when I run it from the Netbeans IDE, but when I try to run it from a jar file on my local machine or on other machines, I get the following error:
"java.lang.NoClassDefFoundError: com/sun/speech/freetts/VoiceManager"
Is there any way for me to include the FreeTTS files in my jar file so it can run anywhere?
Any help would be greatly appreciated.
i had the same problem and i found this page:
http://ondra.zizka.cz/stranky/programovani/java/misc/freetts-line-unavailable-classcastexception-kevinvoicedirectory-error-opening-zipfile.texy
I did the easy way, which was to add the freetts installation to my dist folder, change the manifest of my jar on where to find the jsapi.jar, freetts.jar etc. and it is worked. I am just distributing freetts inside my folder.
The hard way is on the link above.

Categories