File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
test/hotspot/jtreg/runtime/LoadClass Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2013, 2023 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2013, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
40
40
public class LoadClassNegative {
41
41
42
42
public static void main (String args []) throws Exception {
43
- String bootCP = "-Xbootclasspath/a:" + System .getProperty ("test.src" )
44
- + File .separator + "dummy.jar" ;
43
+
44
+ // Create an empty file in the scratch directory
45
+ final String filename = "empty.jar" ;
46
+ File emptyJar = new File (filename );
47
+ emptyJar .createNewFile ();
48
+
49
+ // Explicitly tell to use it for class loading
50
+ String bootCP = "-Xbootclasspath/a:" + emptyJar .getAbsolutePath ();
51
+
45
52
ProcessBuilder pb = ProcessTools .createLimitedTestJavaProcessBuilder (
46
53
bootCP ,
47
54
"TestForName" );
You can’t perform that action at this time.
0 commit comments