I am working on a java plugin and I was wondering if anyone could help me.
I need to import a plugin that goes by the name of "LogBlock" and it has a lot of files if I compile it. So I was wondering if theres a way to import it into my eclipse workspace. (Decompile it and be able to edit it).
Sorry if this question is unclear, if you need any questions about this question answered just say so. Thanks!
The easiest and simplest way to go is to use JD-GUI. A super simple decompiler. Once decomplied there are 2 things you can do:
1 - Import the files into eclipse. This could take a LONG time depending on the files.
2 Recommended - Take the files pop them in a folder named LogBlock and then go to your root folder for eclipse. Open that, you should see all your eclipse projects there. Just drag and drop the folder named LogBlock. When you launch eclipse there will be your LogBlock Java Project. Open it up and you will see a ton of files. Organize them as you saw in JD-GUI.
If you need further help with this I could make a video and give you the link to it.
Java Decompiler will do the trick.
From there you can import those files into Eclipse by right clicking your project, and choosing import from the options menu. You shouldn't be editing a released plugin however..
Related
Please bear with me as I am brand new to Java and Eclipse programming. I was looking around for some cool example projects to learn from, and I came across this:
http://www.java-gaming.org/index.php?topic=23775.0
It seemed very interesting, and I would love to see how it works on the inside. However, I am having a great deal of trouble compiling and running this project in my personal Eclipse workspace. So in short, how would I run this project in my own Eclipse workspace? Any help is appreciated for this issue. The words "thank you" do not get used nearly enough on this site, so I would like to thank you all for being a part of what makes this forum such a helpful place for beginners.
Go to File -> New -> Java Project. Give your project an arbitrary name. Keep the defaults suggested and press "Finish". Unzip your zip somewhere, then copy the "com" folder to the clip board and paste it into the "src" folder in your Eclipse project. It should start to compile automatically when you do that. Then in your package explorer view, expand the "src" folder and then "com.springworldgames.jcgmusic". Select "SongCreatorApplication" and press the green "Run SongCreatorApplication" button in the menu at the top. It should launch.
Your link does not seem to be a repository, it has a downloadable jar.
Use JD GUI. Open the application, drag and drop your JAR file into it.
After take the code and import it into Eclipse.
I've an existing project(in SVN Respository) developed using Struts1. Now I need to import it in the eclipse IDE.
When I try to import the project, I've 2 problems :
If, I place the files from my project to a newly created "Dynamic Web Project", its showing errors with all the javascript, jsp and java files(All import statements are shown as error)
If, I use SVN Checkout/Import, its working fine, no errors. But the links are not available on the java code, like when I click on a function/variable name, it should go the function/variable declaration/definition(Eclipse - Open Declaration/Open Implementation).
Someone please help on this.
I would always prefer to import projects as Maven projects (if they are) so that it would downloads the dependencies on the go.
If the import statements are not recognized means, you should configure the corresponding JRE. This may help you.
Finally, there are so many aspects while configuring an existing project. Please Check your project Wiki if any. If not do create one while you short out them.
Firstly, I have seen several question related to this issue but it seems like those questions might be some steps ahead of my understanding.
I am fairly new to java and consider myself as a self learning beginner. Mostly I face this problem where I do an import. I need it because that import is linked with the use of some really nice and powerful function(s), but always fail if import does not work and end up not using that.
The message is, e.g. "The import com.google can not be resolved".
I have been using eclipse in Ubuntu.
After trying some of the given solutions without being able to view them in the proper context, I already have messed up my eclipse environment and the trouble is still there.
Can anybody kindly show me the complete steps of doing these imports successfully in eclipse for java?
For using 3rd party jars you need to add the jars in the build path.
Follow the following step
right click project
click build path
click libraries tab
then add external jar
Now give the path of the jar location
This is purely for personal work. Just messing around stuff so it doesn't really bother me if it could cause problems for others trying to use my code.
Basically what I want to do is allow all of my projects to be able to import a common jar that I always use the same way it can be done with the in built jars in java.
for example
import javax.swing.*;
import common.stuff.*;
I would like to be able to do this without having to import external jars on every project I make.
Thanks in advance :)
I'm not sure that it possible to archive with default eclipse settings, but you can do next trick:
Go to Window -> Preferences
Click Java -> Installed JREs
Find you default JRE, click edit
Click Add External JARs
So you'll add libraries you want to be in every project by putting them to default JRE libraries.
I've been a c++ programmer for 10 years, i'm used to just creating libraries and then linking to them from my existing project. However in java, i have 2 projects, one is my game engine, the other is the test environment that i would like to use, here is how it is structured:
com.logic.engine
com.logic.testapp
yet in my test app, i cannot do
import com.logic.engine.*;
it simply cannot find the reference.
How can I do this without having to copy and paste my engine into every program i write with it?
Package your engine as a jar, and add the jar to the classpath of the projects that use it.
In eclipse you can also declare that your test prgram depends on your game engine. The classes will then be available. Check in the build paths dialog available from the context menu in the project view.
In eclipse, right click on your test project in the Project Explorer and select Properties. In the "Java Build Path" section, go to the Projects tab and add your engine project.
You need to change the classpath to include the folder containing your engine.
java -cp /path/to/engine testapp
I just fired up Eclipse to check this out.
You should see a red wavy underline on import com.logic.engine.*; - mouse over this and it'll tell you that the import could not be resolved and offer you a number of so-called quick fixes. One of those should be Fix Project Setup - that will offer to fix things for you, in this case to add one project to the other's build path.