Skip to content

Commit

Permalink
Adds support for java 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed May 9, 2019
1 parent f659b8c commit cd9c5aa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ice4j</artifactId>
<version>2.0.0-20190327.160542-32</version>
<version>2.0.0-20190509.132540-35</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jicoco</artifactId>
<version>1.1-20190409.112040-14</version>
<version>1.1-20190509.130302-15</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -251,7 +251,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
2 changes: 1 addition & 1 deletion resources/install/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Homepage: https://jitsi.org/videobridge

Package: jitsi-videobridge
Architecture: any
Pre-Depends: openjdk-8-jre-headless
Pre-Depends: openjdk-8-jre-headless | openjdk-11-jre-headless
Depends: ${misc:Depends}, procps
Description: WebRTC compatible Selective Forwarding Unit (SFU)
Jitsi Videobridge is a WebRTC compatible Selective Forwarding Unit
Expand Down
39 changes: 18 additions & 21 deletions src/test/java/org/jitsi/videobridge/OSGiHandler.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
/*
* Jicofo, the Jitsi Conference Focus.
*
* Copyright @ 2018 - present 8x8, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jitsi.videobridge;

import net.java.sip.communicator.util.*;
import org.jitsi.meet.*;
import org.jitsi.videobridge.osgi.*;
import org.osgi.framework.*;

import java.lang.reflect.*;

/**
*
*/
Expand All @@ -25,7 +40,7 @@ public void start()
"net.java.sip.communicator.impl.configuration.USE_PROPFILE_CONFIG",
"true");
OSGi.setBundleConfig(new JvbBundleConfig());
OSGi.setClassLoader(getPlatformClassLoader());
OSGi.setClassLoader(ClassLoader.getSystemClassLoader());

activator =
new BundleActivator()
Expand Down Expand Up @@ -84,24 +99,6 @@ public BundleContext getBundleContext()
return bc;
}

private ClassLoader getPlatformClassLoader() {
ClassLoader cl;
//JDK 9
try
{
Method getPlatformClassLoader =
ClassLoader.class.getMethod("getPlatformClassLoader");
cl = (ClassLoader) getPlatformClassLoader.invoke(null);
}
catch (NoSuchMethodException | IllegalAccessException |
InvocationTargetException t)
{
// pre-JDK9
cl = ClassLoader.getSystemClassLoader();
}
return cl;
}

public <T> T getService(Class<T> serviceClass)
{
return ServiceUtils.getService(bc, serviceClass);
Expand Down

0 comments on commit cd9c5aa

Please sign in to comment.