aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/launcher/java_launcher.cc
Commit message (Collapse)AuthorAge
* Windows,JNI: more robust nativeCreateJunctionGravatar Laszlo Csomor2018-07-09
| | | | | | | | | | | | | | | | | | | | | | | | Rewrite the CreateJunction function in the Windows JNI library. The new implementation's improvements: - succeeds if the junction already exists with the desired target; hopefully this will fix issue https://github.com/bazelbuild/bazel/issues/5433 - tolerant to concurrent filesystem modifications, e.g. if the junction's path suddenly disappears, the function reports the error correctly Fixes https://github.com/bazelbuild/bazel/issues/5433 Change-Id: I58a2314a00f6edaa7c36c35ba54616168b44eb7d Closes #5528. Change-Id: I9f5dc9237b70a433d0d8c2578a826de3d462d110 PiperOrigin-RevId: 203744515
* Windows: Native launcher now works with unicode.Gravatar Yun Peng2018-06-25
| | | | | | | | | | | | | | The native launcher can now launch Java and Bash binary in directory with non-English characters. Unfortunately, python doesn't support running python zip file under directory with non-English characters. eg. python ./??/bin.zip will still fail. See https://github.com/bazelbuild/bazel/issues/4473 Change-Id: I77fe9cdaabffc2e0d25c7097da5c0c9333a9c4a3 PiperOrigin-RevId: 201939391
* [launcher] Don't pass std::string to C varargs functionGravatar Loo Rong Jie2018-06-07
| | | | | | | | | | | | | `die` passes parameters to `vfprintf`. Passing `std::string` to this function might crash the program. Found by Clang on Windows. /cc @meteorcloudy Closes #5339. Change-Id: Iff7aa766770771262f91990774ff4d8de1fbeb5c PiperOrigin-RevId: 199630717
* Move path-manipulation functions to own library file.Gravatar ccalvarin2018-06-05
| | | | | | | | | | | Leave functions that make file accesses in the file library, and general blaze utilities in the blaze_util file, but move the functions that boil down to string manipulation and path formatting to their own file. (With the exception of getCWD, since absolute path syntax is relevant here.) Doing this largely to consolidate all Windows path control into a single place, so that it's easier to notice inconsistencies. For instance, ConvertPath currently makes Windows paths absolute, but not Posix paths, and MakeAbsolute relies on this behavior. In addition, JoinPath assumes Posix path syntax, which leads to some odd looking paths. These will be fixed in a followup change. (Found these issues while working on #4502, trying to fix the windows-specific system bazelrc.) RELNOTES: None. PiperOrigin-RevId: 199368226
* Windows, Java launcher: Support jar files under different drivesGravatar Yun Peng2018-05-14
| | | | | | | | | Create junctions to jar's directory when java launcher and its jar are under different drives Fixed https://github.com/bazelbuild/bazel/issues/5135 Change-Id: I21c5b28f5f36c1fe234f8b781fe40d526db846cc PiperOrigin-RevId: 196477704
* Windows: java launcher no longer calls cmd.exeGravatar Laszlo Csomor2018-04-12
| | | | | | | | | See https://github.com/bazelbuild/bazel/issues/2190 Closes #5005. Change-Id: If665af264a23be0219c75ae087dd25db74d5e386 PiperOrigin-RevId: 192575414
* Windows, Java launcher: Use relativize paths in classpath jarGravatar Yun Peng2018-01-11
| | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/4408 Change-Id: Id62b25e675822bbed91a448e70bdcb76e722721e PiperOrigin-RevId: 181591585
* Windows Launcher: Fix argument passingGravatar Yun Peng2017-12-11
| | | | | | | | | | Make sure the actual binary recieves exactly the same argument passed to Windows exe launcher. Fixed https://github.com/bazelbuild/bazel/issues/4001 Change-Id: I5db2d7c2f78de8865abc04a2d5b65d69685d43db PiperOrigin-RevId: 178610493
* Java Launcher: Create classpath jar with a random nameGravatar Yun Peng2017-09-18
| | | | | | | | | | | | | | | When the classpath is too long, the launcher creates a jar file to pass the classpath value. This change makes the jar file's name random. It fixed the bug that when running multiple instances of the same java binary, they all try to create the same classpath jar file. For example, when running java_test with shard_count > 1. Also, we delete the classpath jar file after the program finishes, so that we don't leave any garbages behind. Change-Id: I67926b3ef76dcb1806797e977ecaa7c6763c5cf2 PiperOrigin-RevId: 169087032
* Prepend workspace name when finding Jar path by RlocationGravatar pcloudy2017-08-25
| | | | | | | Fix https://github.com/bazelbuild/bazel/issues/3620 RELNOTES: None. PiperOrigin-RevId: 166472158
* Windows: Implement Java native launcherGravatar Yun Peng2017-08-25
| | | | | | | | | | | Now Bazel build a Windows exe binary to launch JVM for java_binary and java_test. The Java native launcher is implemented with the same logic and functionalities as the original java shell stub script. Change-Id: Ida40579bce82425f3506f9376b7256aa3edc265e PiperOrigin-RevId: 166346445
* Windows: Implement native binary launcherGravatar Yun Peng2017-07-24
The native launcher is implemented based on this design doc: https://docs.google.com/document/d/1z6Xv95CJYNYNYylcRklA6xBeesNLc54dqXfri0z0e14/edit?usp=sharing Change-Id: I83bae844f792a587ce0e342a3c0f238b760afeaa PiperOrigin-RevId: 162736269