Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7888823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:56:06+00:00 2026-06-03T05:56:06+00:00

enter code here I’ve created a simple code for mount virtual disk into system

  • 0

enter code hereI’ve created a simple code for mount virtual disk into system using example from standart instalation package. Java Example. So, After it I’ve created a few unit tests, the first is mounting disc into system and check that disck was mounted the second trying to mount disk and try to create simple file for check/handle events of creating/open and so on files, so, if I am using just a one test all is working good, if two I’m receiving error no jnicbfs in java.library.path Could some one help me to fix this problem ?
P.S.
– License is trial
– Simple code below

  @Override
    public boolean createVirtualDisk(String diskLetter) {

        CallbackFileSystem callbackFileSystem;
        boolean isCreated = true;

        try {

            // create CbFS instance
            callbackFileSystem = new CallbackFileSystem(new CloudFileSystemEventHandler());

            //initialize system properties
            initCallBackFileSystemProperties(diskLetter, callbackFileSystem);

            // mount point
            callbackFileSystem.mountMedia(0);

        } catch (ECBFSError e) {
            LOGGER.error(e.getMessage(), e);
            isCreated = false;
        }

        return isCreated;
    }

    private void initCallBackFileSystemProperties(String volumeKey, CallbackFileSystem callbackFileSystem) throws ECBFSError {
        callbackFileSystem.setRegistrationKey(cloudFileSystemProperties.getLicenseKey());
        callbackFileSystem.setSerializeCallbacks(cloudFileSystemProperties.isSerializeCallbacks());
        callbackFileSystem.setThreadPoolSize(cloudFileSystemProperties.getThreadPoolSize());
        callbackFileSystem.setProcessRestrictionsEnabled(cloudFileSystemProperties.isProcessRestrictionsEnabled());
        callbackFileSystem.createStorage();
        callbackFileSystem.disableMetaDataCache(cloudFileSystemProperties.isMetaDataCacheDisable());
        callbackFileSystem.addMountingPoint(volumeKey);
    }

tests
1:

        CbFSProperties cbFSProperties = createCloudFileSystemProperties();
        // create CloudFileSystemImpl context
        CloudFileSystemContext cloudFileSystemContext = new CloudFileSystemContext(cbFSProperties);


        // create volume
        CloudFileSystem cloudFileSystem = new CloudFileSystemImpl(cloudFileSystemContext);
//
        boolean isCreated = cloudFileSystem.createVirtualDisk("R:");

        // check if volume was created correctly
        CallbackFileSystem callbackFileSystem = new CallbackFileSystem();
        callbackFileSystem.setRegistrationKey(cbFSProperties.getLicenseKey());

        // check created or not
        Assert.assertEquals(true, isCreated);

        // the same assertion
        Assert.assertEquals("R", callbackFileSystem.getMountingPoint(0));

2:

 CbFSProperties cbFSProperties = createCloudFileSystemProperties();
// create CloudFileSystemImpl context
CloudFileSystemContext cloudFileSystemContext = new CloudFileSystemContext(cbFSProperties);

// create volume
CloudFileSystem cloudFileSystem = new CloudFileSystemImpl(cloudFileSystemContext);

boolean isCreated = cloudFileSystem.createVirtualDisk("S:");

if (isCreated)
    createFileOnDisk("S:\\test.txt");
else
    Assert.assertTrue("The disk was not created.", false);

Maven File with java.library.path

http://maven.apache.org/maven-v4_0_0.xsd”>

<dependencies>

    <dependency>
        <groupId>eldos</groupId>
        <artifactId>eldos.cbfs</artifactId>
        <version>1.0.0</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.4</version>
    </dependency>

    <!--&lt;!&ndash; Testing&ndash;&gt;-->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
    </dependency>
    <!--Other -->
</dependencies>


<build>
    <resources>
        <!-- standard Maven folder -->
        <resource>
            <directory>src/main/resources</directory>
        </resource>
        <!-- plus root folder -->
        <resource>
            <directory>.</directory>
            <includes>
                <include>plugin.xml</include>
                <include>META-INF/*</include>
            </includes>
        </resource>
        <resource>
            <directory>${basedir}/target/dependency</directory>
            <targetPath>.</targetPath>
        </resource>
    </resources>

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>${source.target.version}</source>
                <target>${source.target.version}</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
                <execution>
                    <id>unpack</id>
                    <phase>compile</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>eldos</groupId>
                                <artifactId>eldos.cbfs</artifactId>
                                <version>1.0.0</version>
                                <!--<classifier>eldos.cbfs</classifier>-->
                                <type>jar</type>
                                <overWrite>true</overWrite>
                                <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <systemProperties>
                    <property>
                        <name>java.library.path</name>
                        <value>target/lib/</value>
                    </property>
                </systemProperties>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <useDefaultManifestFile>true</useDefaultManifestFile>
            </configuration>
        </plugin>
    </plugins>
</build>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:56:07+00:00Added an answer on June 3, 2026 at 5:56 am

    I’ve used system properties but java.library.path is not setuped, after this I’ve tried to use special properties and all are working, described in blog

    working maven plugin is

    <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
             <forkMode>once</forkMode>
             <workingDirectory>target</workingDirectory>
            <argLine>-Djava.library.path=${basedir}/lib</argLine>
        </configuration>
    </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

enter code here Hi All, I have a simple windows service application that connects
enter code here I'm reading a stream from a device in Linux which contains
enter code here i am using dev c++ for my programming. as i am
enter code here I have a table on SQL server 2005 with bigint primary
enter code here I have a ListView that have a different Layout XML for
enter code here My problem is this: in this database the junction table contains
I check like this: enter code here var point = new g.LatLng(parseFloat(lat),parseFloat(lng)); var bounds
I have <.ImageView> enter code here s(icons) in my android layout xml file, which
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
My system allows a user to enter a code to add points to their

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.