Is there a way to make Windows-like paths accessible from Linux? - java

Recently I've installed Kali Linux 2020.1b for Windows C: partition as a second OS, because as I know kali-rolling repo has a lot of packages, unlike Ubuntu, Debian, ... repos. Windows 10 and Kali Linux can be loaded from the Grub now, and I got a problem when I tried to open my Eclipse IDE (Eclipse Java Photon) Workspace from NTFS partition D:. I got many errors, eclipse can't find build path jars, because they are located at D:\...\spigot-1.15.2\spigot-api-....jar. I don't want to change build path every time, when I boot to another OS. How to make Windows-like paths (like C:\ProgramData\... or D:\Java\EPModule\...) accessible from Linux? I mean exactly such paths, not their alternatives like /media/(my username)/(partition id or label)/(my files here)/.

Related

How can I share my workspace with two platforms (OS X and Win)?

I have a my java workspace stored in Dropbox. I have Eclipse galileo on my Windows PC. I have a Mac and I want to build my application also with this new computer. So I have installed Eclipse galileo, Dropbox. Now there is a problem when I try to open one project. The problem is:
Path of Library (in windows I have library on D:\Dropbox\workspace\library; in Mac I have user\dropbox\workspace\library)
Version of JVM (in my windows pc I have JVM 1.7 and in my Mac I have 1.6
I have read some article to do this, and in one of these I have read to use selected sync of Dropbox and not sync .metadata folder. I have do this and one problem is fixed, now when I try to open the eclipse I don't see some project modify, open closed. Then it's ok.
The two problems that I have described above. So, how can I share my workspace and use it on both the computers?
Consider a 5 year old post here. The conclusion it is not really possible and practical to have one workspace shared between the platforms. Which problem are you trying to solve? The general way would be to get a repository e.g. git or svn, store your application there and keep in in-sync with different eclipse installations via versioning plugins.

Java OpenCV UnsatisfiedLinkError, Ubuntu

I'm attempting to run the Java version of OpenCV on a hosted Ubuntu server. I have an existing application built using Eclipse from my own windows environment and i want to move it over to my server to run it there. However i am having several issues with it.
The problem is that when i try to run it i receive the following error:
Now there are existing question with varying answer to this problem already on SO, the problem being the UnsatisfiedLinkError, but i have tried to follow them to no avail.
I have eclipse pointing the native library location to where opencv is located on the server itself as so;
But i still have the same problem. I am compiling this project as a Runnable Jar File if that makes any difference.
The paths must match (between Windows and Linux) and you must have the right native file for each system included (and tested for).
Currently in your Eclipse environment you are pointing to a Windows implementation of OpenCV - how will Linux know where to look?
I would make sure Eclipse includes all libraries when creating a runnable jar file (it is a checkable option), and make sure that your .dll and .so files all go into the same location regardless of system (so make sure the opencv dll is in c:\var\lib\opencv and libopencv_java249 is in /var/lib/opencv on the linux box)
In your program, since versions may not be the same, when loading the library in - do it this way too:
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
That way it will use whatever version is current on your system.

Setting the JVM to use with Ant when using the command line

I have to build a project using Ant from the command line. It is an EAR to be deployed on weblogic 8.1 and as such the classpath is set on the correct jrockit, shipped with the 8.1 server. However, the tool keeps using the jre7 (also installed on my machine), going as far as not even starting if i uninstall the jre7 and leading to problems such as "Cannot find class Object", and so on.
Before running ant, I run the %WEBLOGIC_HOME%/server/bin/setWLSenv.cmd file in the same console session. Both %WEBLOGIC_HOME% and %JAVA_HOME% are correctly set. The jre7, as far as I know, is not referenced in any environment variable nor in any of the build files. I am not permitted to modify the build.xml file, also I can't use Eclipse or any other GUI to build the project.
So, how can I persuade ant to use the correct JVM?

Eclipse plugin compiled in linux work on windows?

I have developed an eclipse plugin, which is compiled linux using maven Tycho plugin. But for some reason, I am not able to see the plugin in the eclipse running on windows. I am not finding anything in the log file.
As I am new to plugin development, Is there any difference does a cross platform compiled plugin would cause?
One dilemma I have in my mind is that, Does it really matter if I use windows based eclipse installation on linux, (as it is just a zip, extract it and use it) machine for compiling and building my plugin? Well, to me it appears that it does matters. I should use linux based eclipse for compiling a plugin in linux operating system.
But isn't this what is against java principle? Compile and Run anywhere?
as far as I know, if you are using UI stuff inside that plugin then you have to export it for multiple OSes ... and you need some libraries from eclipse website to export your application in linux...
If you are exporting only the plugin then you need nothing... OSGI takes care of everything
Some of the Eclipse packages are system dependent. To take one example, org.eclipse.core.resources.win32.x86 would work only on a 32 bit Windows workstation.
Check your plug-in and see if you have any of these system dependent Eclipse packages.
If you do, you have to export your plug-in with the appropriate Eclipse packages for each of the environments you want your plug-in to run.
Write once, run anywhere is a myth. Ask any Android programmer. :-)

how to solve a groovy/grails tool suite reference?

I've been working on my desktop computer which has openjdk 7.
When I copy a Grails project onto my laptop, which has Oracle's JDK v7, I'm having a problem with the classpath.
I've checked the classpath and everything seems fine.
Here's the text that GGTS shows:
The archive: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar which is
referenced by the classpath, does not exist
I set the JAVA_HOME inside /etc/profile.
I installed gvm in order to make easier Groovy and Grails setup.
I hope you could help me
:)
I then went to the RUN menu option at the top and selected run configuration
It was on : Grails \ {Myproject} (run-app)
On the right for this run-app there is JRE options
under JRE ensure you have the same JRE defined as project in this case 1.6
I'm guessing that your JRE reference in your project is bad. Is your desktop windows and your laptop a mac or linux (or vice versa)?
Try these things:
Does the /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar path exist on the broken system?
Can you create other kinds of projects on the broken system?
Can you create a new Grails project from scratch inside of the broken GGTS?
What happens if you run Grails -> Refresh dependencies on the project?

Categories

Resources