opening of eclipse files written to java - java

I want to open a file in eclipse but I get this error
my friends i want to open the eclipse file that i write from befroe on other pc but it does not open and tell me this error;

It looks like you are trying to open a .class file which is not in the current workspace. The class file editor does not support this and gives this error when you do this.
Note: The class file editor does not attempt to convert the contents to Java, it just shows you the Java bytecode.

I guess the file is visible in eclipse but it is impossible for you to open it. Try to Project -> clean workspace.

Related

how do i compile and run simple java files on eclipse from a src folder?

I am in an intro cs course learning Java and the prof gives us unfinished files to complete for our projects. The last projects have been simple and Ive been able to just open eclipse, start a new project, and create a new class with a the same name and just copy and paste the plain text from the files he gives us. However this time that approach isnt working. Basically I have the folder called "src" and i need to know exactly how I can open it in eclipse and start working on the project and be able to run it. Please help me.
basically i downloaded "Project3" from my prof's website. I unzipped it and it conatined project3.pdf - the project outline, and the folder named "src"
inside the src folder are Project3.java and sample3.java that are both used together in the project. All i need to know how to do is to be able to open them in eclipse and start working on it. If i copy and paste the plain text fro the java files to a new project in eclipse i get all kinds of errors.
First of all, you can just copy-paste the files into eclipse.
Second, you can use File -> Import -> General -> File System to import files from the file system into eclipse after creating a new Java project.

Unable to open class

Provided is what my Netbeans program looks like right now, I've been trying to google this for hours but have found nothing that has helped. For an assignment I am supposed to open the 'Dealership.class' class and modify it, when I do the following nothing happens;
Double clicking the .class file
file > open file > dealership.class
dragging dealership.class into the editor window
When I double click the file I get an error from Netbeans saying "Cannot open, no source".
Can anyone tell me why this is occurring?
What my Netbeans looks like via Gyazo
Don't open the class file, open
Dealership.java
Instead, that is the uncompiled text version that is readable
If you don't have dealership.java,
There is No way when using normal IDEs.
Use JD to decompile the file to a .java and open it.

Cannot open Eclipse after opening once? (Error included)

After opening Eclipse once and without updating, it does not open again. It spits out the error "The Eclipse executable launcher was unable to locate its companion shared library." and does not open. I have Windows and used 7-Zip to unzip the file (I have read that windows default unzip tool corrupts the file). I would like to emphasize that it works once and without updating, but then if closed, will not open again. Thanks for any answers.
That's a very weird behavior.
The The Eclipse executable launcher was unable to locate its companion shared library error popup does indeed happen when you don't expand the archive according to Windows' bizarre requirements, and it seems you've documented yourself well enough before posting this.
I would advise:
erasing the eclipse folder
copying the downloaded archive to a "safe" folder like "My Documents"
right-clicking the archive there, and "extract here"
moving the extracted folder back to its location (32-bit or 64-bit
Program Files)
trying to launch again

Can't open my Java project in NetBeans

I am working with JDA+NetBeans. Suddenly my project refuses to open. I get the error
Invalid byte 1 of 1-byte UTF-8 sequence.
How can I fix it?
I suggest to look for UTF-8 characters (such as umlauts etc.) and delete/replace them; you could also try to open the file with another editor, save it and try Netbeans again.
open your files in notepad++ choose
Format -> convert To UTF-8
If the project get not opened, one of the project configuration files in the nbproject folder are corrupt. You can do:
Create a new project and copy the sources to the new project (and all the other things you did in the old project)
Open the corrupt project thru the Favorites window. Have a look into the nbproject files, maybe save again the files when opened from the Favorites window.

When trying to open a .java file from windows explorer I get a "No project found to open file in" error message

So, when I double click a file in windows explorer, Intellij fires up, but instead of just showing me the file I want to see, shows up the following message:
I think I get what it means: it means this given .java file isn't associated with an Intellij project.
That's actually true, but even so I'd like to be able to open the file and see it with syntax highlighting and such.
How to overcome this problem?
Thanks
It's a known limitation which we plan to address in the future versions to allow opening and editing individual files without project context.
Please watch/vote the related issue.
I don't think you can'tcan by default. I'm assuming you are opening downloaded files or such. What I would is create a project (Scrapbook for example is a good name) on desktop and I would put/download the file I want to see in the corresponding src folder. That way when I'm clicking it would open properly.
Most of the syntax highlight and such goodness of idea comes from a proper project setup (proper JDK paths, libraries, etc).

Categories

Resources