I had a simple Java class files in a project (really basic Java programming) on my local SSD. I uploaded them to OneDrive, but when I try to run these files from one drive, they no longer are able to run, and it says "Java file outside of source root", but when it runs on my local disk, it is able to run fine.
I tried copying an IML from a project that I created in OneDrive, but it still did not work, as the IML was the exact same.
Related
I use an javaws app that comes with a jnlp file. I want to launch it locally and be able to modify the source code on my computer to fit my exact needs. I use Eclipse as IDE.
I've opened the jnlp file and downloaded all the jar files, then I have used JD-GUI and CFR to decompile the app.
In Eclipse, I've imported all the different ressources jar and put the app decompiled source code within the src folder. I've tried to correct every mistake done by both softwares but the app still crashes due to their mistakes.
Note, if i just import the app as a jar file, it works as expected but i can't edit the files, indeed it's a class file.
I have a selenium script written in Java. I exported it as a .jar file to my system and I can run that from my command line. But I need to send this across my team. The problem with the script is the task requires to get files from my computer using the file path and it need to do some conversion and save it back to a particular folder. I have written code with all the file paths for my computer. How can that run in another remote computer? Is there any way to do that? Also when i give the chromedriver path in my script it wont work on remote computer because they save chromedriver in different file location.
I tried using parameter but problem is it is a time consuming process. It would be great if some one can edit the jar file as a one time process. I used tools to open Jar file but the code is not seen it displays symbols.
You can try keeping all the required files (your files in your computer, chromedriver, etc) in the same folder as the jar that you are executing. This way, you can reference all the required files using a relative path, instead of an absolute one, i.e. ./your_required_file.txt
So, you can send the whole directory to your team to execute it.
That being said, I honestly recommend that you take some time on reading up on Java and Selenium's documentation.
I have this, perhaps, easy problem, but I don't know how to handle this.
I have my Java program and it works pretty well when I call it via terminal (Java command).
The program uses 4 text files from the hard disk which can't be added as resources to the project.
How to do this right so I could build jar file only with main class and files from hard disk (first one is a config file and it has paths to other files so the program knows where they are)?
I'm using IntelliJ IDEA 14.1.4 on Arch Linux.
I did it based on this blog, but it's not working without txt files in src folder.
Also "jar cvf" command builds jar file, but it's not working outside my computer (for example on windows or OSX).
Can anyone help me?
I prefer step by step instruction so I would understand what is going on in here.
I recommend to build your application with Maven and create a Maven Assembly which contains your JAR file as well as the config.txt file.
I had no problem running my java code in eclipse last week and I have no problem creating a new java application in eclipse. However, I am unable to open any of the java program files in eclipse that I saved. I checked to see if my jdk se development kit was removed from my computer by mistake and it is still there. What do you think is wrong? Why can't I open my old files? All of my java programs are saved as CLASS files.
Source files are normally saved with a .java extension. Once you compile your source files, javac will generate you some files with a .class extension. These are not source files, and are usually deleted and recreated every time you compile your code. If you want to find your source code, you'll need to look for the .java files on your disk.
If you've deleted your .java files by accident, it is usually possible to decompile the class files into something resembling the original source, but much of the original formatting will be lost - comments etc. This approach is far from ideal, but may help you recover the situation if you cannot recover the original source files. A good decompiler can be found at http://jd.benow.ca/ - you can either download the standalone application, or it has plugins for Eclipse and IntelliJ.
Hi once you compile the source java files .java extn the class files will be created. Check your workspace in your disk there will be a folder as package as you created in eclipse under src folder.
I'm working on a java project that requires constantly running the code, to see if it builds properly.
So I'm trying to reference external jar files, without having to launch the project from the command line (I'm running in TextMate).
Any advice?