GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - danielearwicker/cppjvm: C++/JVM - making it really easy to call Java from C++

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
java
java
 
 
morkfiles
morkfiles
 
 
testing
testing
 
 
thirdparty/jvm
thirdparty/jvm
 
 
.gitignore
.gitignore
 
 
README
README
 
 
build2008.bat
build2008.bat
 
 
build2010.bat
build2010.bat
 
 
buildver.bat
buildver.bat
 
 
makefile
makefile
 
 

Repository files navigation

C++/JVM (a.k.a cppjvm)
----------------------

Copyright (C) 2011 Daniel Earwicker <[email protected]>


Inspired by the lacklustre response to this question:

  http://stackoverflow.com/questions/7537822/

Also inspired by C++/CLI (hence the name). You can include Java classes
in your C++ program:

   #include <java/util/regex/Pattern.hpp>
   #include <java/util/regex/Matcher.hpp>
   #include <java/lang/CharSequence.hpp>

You can import the corresponding namespaces:

    using namespace java::lang;
    using namespace java::util::regex;

You can call methods of those classes in your C++ code, exactly as 
you'd expect:

    Pattern pattern = Pattern::compile("\\{[a-z]*\\}");

    Matcher matcher = pattern.matcher(
      String("Some of the {words} in this {sentence} are {special}"));

    while (matcher.find())
      std::cout << matcher.group().str() << std::endl;

To get started, make sure you have a JDK installed, and you've added the
JDK and JRE bin directories to your PATH environment variable. You must
also set JAVA_HOME to point to the JDK directory itself.

On Windows you'll need Cygwin installed, as GNU make is used.

Once you have these prerequisites, just run make to build everything.
If it's successful, you'll see a "Perfect :)" message when the tests
run.



PUBLIC LICENSE

Copyright (C) 2011 Daniel Earwicker <[email protected]>

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it in any way you wish, as long as you do not
attribute the modifications to the original author.



About

C++/JVM - making it really easy to call Java from C++

www.earwicker.com/cppjvm

Resources

Readme
Activity

Stars

43 stars

Watchers

6 watching

Forks

68 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.