Brief: How to setup a project on a remote server?
I have been trying to work on Java code on a remote server by logging into it using Putty on windows and editing it using a basic text editor. I intend to move to Eclipse/Remote system explorer. I did just that and I could use Eclipse as an editor, but compile on the remote server.
Problem:
1. I am trying to get the features of Eclipse where it suggests me the available methods for a n object; however, I get this error: This compilation unit is not in the build path of a java project"
As I understand, I haven't set it up as a project. Can someone point me in the right direction?
Thanks.
I personally haven't tried that , but this could be useful to you :)
http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35
Related
I try to build and run a apache ignite example in binary package on Intelij idea IDE. When I run example, there are so many errors. please any one can help me to run a simple example ?
I have installed java python and maven on my laptop. I am very new to apache ignite and java. i follow to run example according to the instruction in official grid gain website(Ignite Quick Start Guide for Java) but still I couldn't run a even a example. please help me to find what is the correct way to do this?
This image is IDE with Errors:
I think the issue is Safe Mode. IDEA does not trust the build scripts (Maven configuration) of this project as a safety precaution.
This means it will not download the appropriate dependencies and apply the plugins specified therein, effectively not building the project.
If you trust the project and/or have verified that there's nothing malicious in the build script or its plugins, then you can disable safe mode by clicking "Trust project ..." in the banner on top of the editor window.
I'm building a simple calculator app from a tutorial/class on Pluralsight (Java Fundamentals class), which starts with a Main.java file, and adds a class file later, MathEquation.java.
I created a Git repo to track my progress, and uploaded to Github: JavaFundamentalsClass. I used GitIgnore.IO to find a Java IntelliJ .gitignore file, and everything seemed to be working fine on the original PC I was using.
However, after switching over to a different PC, with a fresh install of IDEA, I cloned down the repo from Github, and found that the project would not build and/or run. I get this error:
"C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.191-1\bin\java.exe" -Dfile.encoding=windows-1252 -jar ""
Error: Unable to access jarfile
Process finished with exit code 1
I suspect that there is something in the .gitigore file that is keeping some of the project, dependency, or build information from being saved in the repo that keeps IDEA from having all the info it needs to build and run the Main.java correctly.
Can anyone help? You should be able to download the project from the repo linked above in it's currently broken state, including the .gitignore file.
Additional Info
I wiped my repo clean and recloned and I forgot, originally it doesn't even give me the run button (it is grayed out). I had to do a procedure with "Add Configuration" from a search I did for that to show up to get the error above.
Also, I did install java from the OpenJDK, rather than oracle. I figured with Oracle cutting off commercial development maybe start the switch now as I'm learning, but maybe that's the issue (normal Java on my other PC).
It's working, but...
First thing - Intellij needs to know where Java is. It appears that if the SDK/JDK is not installed prior to Intellij, you will need to tell it where Java is after installing. Or if you use OpenJDK instead of Oracle Java SDK. You can do that at View/Open Library Settings, under Platform Settings / SDKs (select the JDK home path).
Then, after setting up Java, I am able to get everything working in Intellij IDEA if I find the Main.java file, right-click, and choose "Run main.main()". This runs the program okay, and also creates a Main configuration in the Run/Debug configuration area, and finally the "Run" button becomes available.
So I can get it working, but if I wipe all the files and clone it fresh from the remote repo, I have to go through running the Main.java file directly again to recreate the configuration.
So, this still doesn't answer my original question. Why doesn't this configuration get saved in the repo? What file is this information saved in? Is there something in the .gitignore file that is keeping this information from being saved to the repo?
Look like you have a different java version on your second machine.
First of all, check your java version
Update the configuration of your project, right now it pointing to java 1.8
https://github.com/LightCC/JavaFundamentalsClass/blob/master/.idea/misc.xml
I think it might be because of java not installed on the other PC you were trying. If it is installed just check whether the path mentioned has java executable file.
The first part is ensuring Java is setup, and that Intellij IDEA knows where Java is, per the other answers, comments, and addendums to the question.
The second part is setting up the run/debug configuration, per the "It's working but.." section of the question. This can be created automatically by right-clicking the file that has the main class to be run (usually Main()...), and selecting the "Run Main.main()" option (replacing Main and main() with the file and function which needs to be run)
The final piece is that to get the run/debug configurations to save to the repo, you either need to:
Share the workspace.xml file (i.e. make sure this is not in the .gitignore file). However, there is a lot of user-specific stuff in that file, so it should normally be excluded from the repo.
Or, edit the configuration and checkmark the "Share" box in the upper right-hand corner (just right of the "Name" field). This will put the configuration into a separate folder inside the .idea folder, which should not be excluded from the repo by .gitignore.
Im a frontend developer & love working with sublime (MAC). I have started working with other developers that work with java on Eclipse/IDEA on a project using Maven GIT & a Tomcat local host. The problem is im having to use Eclipse/IDEA in conjunction to work with these guys. Does anyone know of the best way I can use Sublime to access and edit the HTML CSS & JS in the best way. Any help would be well apreciated
The best solution I found was:
Integrate Sublime Text with Tomcat
But I had to activate "build automatically" too in order to make it work.
Good luck
If you are looking for a more stylized syntax, I would recommend using package control to get JS, HTML, and CSS specific packages. If you are looking to use sublime to build Maven, then use package control to get Maven.
Assuming you already have package control installed, here are the steps to get the Maven package in sublime on a Windows or Linux machine.
ctrl+shift+p
click install package
type in Maven
hit enter
With reference to VHD Java library , I tried to use libguestfs.. but I am unable to get it work. At the first glance it seems that it is not working on the windows environment.
But for the try I am stuck at first point only, how to get jar file for com.redhat.et.libguestfs.* classes. I might be wrong in my execution plan.. kindly help.
Is there any better way to achieve my goal of creating , mounting , unmounting VHD's through java program.
Thanks in advance...
The Java bindings, which contain the com.redhat.et.libguestfs package, are available as part of the source distribution tarball. This can be obtained from the libguestfs download page; select the latest version, currently 1.18.8.
Alternatively, a pre-compiled JAR might be available from the Maven repository.
Either way, on Windows you likely have to compile the native libguestfs library yourself.
I want my Java application to make a growl notification. My IDEs are Eclipse and Netbeans, and I am trying to implement a library in either (so far it worked it neither). How can I just add the library to my project and then reference the classes from within my own classes? Moreover, where can I find an appropriate library?
Thanks in advance!
EDIT: Ok, now I have somehow managed to implement the library ^^ However: the following command fails:
System.loadLibrary("growl");
It returns following error:
Message: no growl in java.library.path
How can I fix this?
About an appropriate library you should just google it. I found this one (that is tested on 10.5 so maybe it will need some tweaks): http://www.cocoaforge.com/viewtopic.php?f=6&t=17320
To add the library to your project in Eclipse copy it into the project folder (this is not necessary, you could just copy it wherever you want, also in extension folder of the JDK) and then add it through the project settings:
open project properties by right clicking the project and choosing Properties
go to Java Build Path option
go to Libraries and add it
It's possible to use AppleScript script engine in Java 6 on OS X to communicate with Growl. Here's a blog post describing how to do it.
You can use the network binding like in https://github.com/chamerling/JavaGrowl or https://github.com/aerofs/growljavabindings
Maybe this can help you.
If your classes are packaged in a JAR file, just like a 3rd party library, you should be able to put it in your project /lib directory and add it to the CLASSPATH using the IDE. That should be all you have to do (if I understand your question correctly).