First mac user in a corporate environment

Joined
Oct 30, 2012
Messages
3
Reaction score
0
Points
1
I've been a linux user for several years, but I'm afraid my windows experience is somewhat limited in that I haven't worked in many windows-centric environments. I'm also relatively new to the mac. (it is a pretty awesome OS though, I'm totally becoming a convert)

I'm basically the test dummy for a pilot program to start people using macs in the environment here at work. My first roadblock: several of our java jar files use hard coded urls such as
Code:
"Y:\Whatever\The\Path\Is"
. What I'd like to do is find a way to create simlinks or something like that such that we don't need to modify all those currently existing java projects to check to see if the path exists before opening the files.

Also, I'm having a hard time finding a mac-beginner irc channel where I can ask simple questions like this. Is there one?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
This is actually indicative of a larger coding problem. Not to critique your entire development team but using hard coded paths just about kills any chance of not only portability but it also makes your apps incredibly inflexible. Relative paths are the key. Okay, rant over. ;)

Paths, as you've come to learn, are of an entirely different form. However, as long as the Windows share is mounted, you can symlink to that without issue. Where is the "Y drive" mounted to on your Mac right now?
 
OP
F
Joined
Oct 30, 2012
Messages
3
Reaction score
0
Points
1
This is actually indicative of a larger coding problem. Not to critique your entire development team but using hard coded paths just about kills any chance of not only portability but it also makes your apps incredibly inflexible. Relative paths are the key. Okay, rant over. ;)

Paths, as you've come to learn, are of an entirely different form. However, as long as the Windows share is mounted, you can symlink to that without issue. Where is the "Y drive" mounted to on your Mac right now?

I just started here a week ago, it's not my fault :p

It's actually not mountable on the mac.... thus far I've had to go in via parallels to access the drive - something about conflicting versions of AES encryption available on the windows server and the mac. The mac version is better than what the windows server can handle, resulting in automatic lock outs after viewing the directory in finder 5 times :Confused:

I'm afraid I'll just have to go into the repositories and see if I can modify all the hard coded paths (assuming I'll have permission to do so)
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,770
Reaction score
2,110
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If the Java file has hardcoded string paths in the form you've shown, those will only work in Windows. From your Linux experience you know that the paths there are different..more like "/opt/local/whatever/whoever/" or "/usr/local/share" and so on..

OS X follows a similar scheme and uses things like "/Library/path" and so on..

Where are the files going to be located on the Mac that you are trying to symlink to?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I just started here a week ago, it's not my fault :p
Oh, I wasn't blaming you. I was just engaging in a pre-coffee rant. ;)

It's actually not mountable on the mac.... thus far I've had to go in via parallels to access the drive - something about conflicting versions of AES encryption available on the windows server and the mac. The mac version is better than what the windows server can handle, resulting in automatic lock outs after viewing the directory in finder 5 times :Confused:
If you've been accessing this drive from Parallels, can you not just run the Java application from the virtual machine? That would solve any path related issues.
 
OP
F
Joined
Oct 30, 2012
Messages
3
Reaction score
0
Points
1
Oh, I wasn't blaming you. I was just engaging in a pre-coffee rant. ;)

If you've been accessing this drive from Parallels, can you not just run the Java application from the virtual machine? That would solve any path related issues.

Yeah, I'm aware that I can solve the problem by running the application in parallels. I'd just rather not have to run the app in the jvm in a vm... It gets sort of inception-y. Actually the real issue here is just that I'd rather not touch windows if I can help it, but c'est la vie. I'll deal with it, I was just hoping for a magic trick from the mac community :)
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
The problem is not something that can be solved unfortunately since Windows path formats make absolutely no sense in any non-Windows environment (unlike, for instance, various paths in Linux which works well with the OS X file system structure). It's for this reason that symlinking won't work - symlinks require two valid path formats. Thus, because the paths have been hard coded, you're out of luck.

Note for clarification: my first post about symlinking to a mount path doesn't make sense in light of the fact that paths are hard coded into the application. That's what I get for trying to answer a question before I've had a coffee.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top