Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: How to run a C++ code using java?

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 2 Times in 1 Post

    Default How to run a C++ code using java?

    I have a c++ source code which I dont want to modify......I want to run it using java ....at the same time the C++ source code should not be able to modify any of the files already on my computer...Does java provide some security or permission control over file writing by a process?????

    Please can anyone help????

  2. The Following 2 Users Say Thank You to progfool For This Useful Post:

    martin10 (August 19th, 2013), tiffany10 (August 26th, 2013)


  3. #2
    Senile Half-Wit Freaky Chris's Avatar
    Join Date
    Mar 2009
    Posts
    834
    My Mood
    Cynical
    Thanks
    7
    Thanked 105 Times in 90 Posts

    Default Re: How to run a C++ code safely

    If you have the source code, why don't you just change it to suit you rather than trying to restricted functionality using Java. Also how are you 'running' the C++ code. Are you compiling it down into a DLL and it is alreadt set up for use with JNI? or are you meerly running a compiled C++ as an exe and then trying to restrict File Access?

    Chris

  4. The Following 2 Users Say Thank You to Freaky Chris For This Useful Post:

    martin10 (August 19th, 2013), tiffany10 (August 26th, 2013)

  5. #3
    Member Cronus's Avatar
    Join Date
    Feb 2013
    Location
    Gothenburg, Sweden
    Posts
    41
    My Mood
    Inspired
    Thanks
    6
    Thanked 7 Times in 6 Posts

    Default Re: How to run a C++ code using java?

    Quote Originally Posted by progfool View Post
    I have a c++ source code which I dont want to modify......I want to run it using java ....at the same time the C++ source code should not be able to modify any of the files already on my computer...Does java provide some security or permission control over file writing by a process?????

    Please can anyone help????
    Here is a great article: Java Tip 17: Integrating Java with C++ - JavaWorld

  6. The Following 2 Users Say Thank You to Cronus For This Useful Post:

    martin10 (August 19th, 2013), tiffany10 (August 26th, 2013)

  7. #4
    Banned
    Join Date
    Jul 2013
    Posts
    49
    Thanks
    1
    Thanked 5 Times in 4 Posts

    Default Re: How to run a C++ code using java?

    Great article Cronus....

  8. The Following 2 Users Say Thank You to Asad Inaam For This Useful Post:

    martin10 (August 19th, 2013), tiffany10 (August 26th, 2013)

  9. #5
    Member
    Join Date
    May 2011
    Location
    west palm beach, FL
    Posts
    189
    My Mood
    Tired
    Thanks
    41
    Thanked 11 Times in 10 Posts

    Default Re: How to run a C++ code using java?

    lol this thread was made in 2009 and the OP still has 1 post...i dont think hes going to see any replies

  10. The Following 2 Users Say Thank You to derekxec For This Useful Post:

    martin10 (August 19th, 2013), tiffany10 (August 26th, 2013)

  11. #6
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: How to run a C++ code using java?

    Quote Originally Posted by derekxec View Post
    lol this thread was made in 2009 and the OP still has 1 post...i dont think hes going to see any replies
    irony hurts my head
    thread locked to prevent future comedy

    ...at least on this thread

  12. The Following 2 Users Say Thank You to jps For This Useful Post:

    martin10 (August 19th, 2013), tiffany10 (August 26th, 2013)